--- a/app/app.pro Fri Jun 11 13:36:36 2010 +0300
+++ b/app/app.pro Wed Jun 23 18:10:13 2010 +0300
@@ -16,25 +16,18 @@
SERVICEAPP = app
TARGET = musicplayer
-ICON = resources/qtg_large_music_player.svg
-DEPENDPATH += .
-INCLUDEPATH += . \
- inc \
- ../inc \
- ../musicservices/inc
-INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
-
CONFIG += hb
-
symbian: {
TARGET.UID2 = 0x100039CE
TARGET.UID3 = 0x10207C62
TARGET.EPOCSTACKSIZE = 0x14000
TARGET.EPOCHEAPSIZE = 0x020000 0x1F00000
TARGET.CAPABILITY = CAP_APPLICATION NetworkControl DRM
+ SKINICON = qtg_large_music_player
BLD_INF_RULES.prj_exports += \
"../sis/musicplayer_stub.sis /epoc32/data/z/system/install/musicplayer_stub.sis"
+
}
# Service provider specific configuration.
@@ -46,33 +39,34 @@
CONFIG += service
# Service provider specific configuration ends
+DEPENDPATH += .
+INCLUDEPATH += . \
+ inc \
+ ../inc \
+ ../musicservices/inc
+INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
+
+LIBS += -lecom \
+ -lestor \
+ -lfbscli \
+ -lxqplugins \
+ -lmpxviewframeworkqt \
+ -lxqservice \
+ -lxqserviceutil \
+ -lmusicservices \
+ -lmpsettingsmanager \
+ -lmpengine
+
# Input
-LIBS += -lecom.dll \
- -lestor.dll \
- -lfbscli.dll \
- -lxqplugins.dll \
- -lmpxviewframeworkqt.dll \
- -lxqservice \
- -lxqserviceutil \
- -lmusicservices \
- -lmpsettingsmanager \
- -lmpengine
-
+HEADERS += inc/mpmainwindow.h \
+ inc/mpglobalpopuphandler.h \
+ inc/mpmtpinfolink.h
SOURCES += src/main.cpp \
- src/mpmainwindow.cpp
-
-HEADERS = inc/mpmainwindow.h
-
-MMP_RULES+=EXPORTUNFROZEN
+ src/mpmainwindow.cpp \
+ src/mpglobalpopuphandler.cpp \
+ src/mpmtpinfolink.cpp
-symbian: {
- addImages.sources = images/*.png \
- resources/*.xml
- DEPLOYMENT += addImages
- }
-
-RESOURCES += resources/musiplayerapp.qrc
TRANSLATIONS = musicplayer.ts
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/inc/mpglobalpopuphandler.h Wed Jun 23 18:10:13 2010 +0300
@@ -0,0 +1,68 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Music Player global popup handler.
+*
+*/
+
+#ifndef MPGLOBALPOPUPHANDLER_H
+#define MPGLOBALPOPUPHANDLER_H
+
+#include <QObject>
+
+class HbPopup;
+class HbAction;
+class MpEngine;
+class MpSongScanner;
+
+class MpGlobalPopupHandler : public QObject
+{
+ Q_OBJECT
+
+public:
+ MpGlobalPopupHandler( QObject *parent = 0 );
+ virtual ~MpGlobalPopupHandler();
+
+ void cancelOngoingPopup();
+
+public slots:
+
+ // Scanning related dialogs
+ void handleLibraryAboutToUpdate();
+ void launchScanDialog();
+ void scanCountChanged( int count );
+ void handleScanFinished( int error, int itemsAdded );
+
+ // Usb related dialogs
+ void launchUnableToCotinueDueUsb();
+ void launchUsbBlockingNote();
+ void closeUsbBlockingNote();
+ void launchRefreshLibraryRequest();
+ void launchMTPInfoDialog();
+ void hanldeMTPInfoDialogFinished( HbAction *selectedAction );
+
+ void outstandingPopupClosing();
+
+private:
+ void launchScanFinishedDialog( bool ok, int itemsAdded );
+ void launchDiskFullDialog();
+ void setOutstandingPopup( HbPopup *popup );
+
+private:
+ HbPopup *mOutstandingPopup; // Own
+ MpEngine *mMpEngine; // Not own
+ MpSongScanner *mMpSongScanner; // Not own
+};
+
+#endif // MPGLOBALPOPUPHANDLER_H
+
--- a/app/inc/mpmainwindow.h Fri Jun 11 13:36:36 2010 +0300
+++ b/app/inc/mpmainwindow.h Wed Jun 23 18:10:13 2010 +0300
@@ -28,6 +28,7 @@
// Forward declarations
class MpxViewPlugin;
class MusicServices;
+class MpGlobalPopupHandler;
// Class declaration
class MpMainWindow: public MpxViewFramework
@@ -78,7 +79,8 @@
MpxViewPlugin *mMediaWallViewPlugin; // Own
MpxViewPlugin *mCurrentViewPlugin; // Own
ViewType mVerticalViewType;
- MusicServices *mMusicServices; // Own
+ MusicServices *mMusicServices; // Own
+ MpGlobalPopupHandler *mPopupHandler; // Own
};
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/inc/mpmtpinfolink.h Wed Jun 23 18:10:13 2010 +0300
@@ -0,0 +1,44 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Music Player MTP info link.
+*
+*/
+
+
+#ifndef MPMTPINFOLINK_H
+#define MPMTPINFOLINK_H
+
+#include <hblabel.h>
+
+class QGraphicsSceneMouseEvent;
+
+class MpMtpInfoLink : public HbLabel
+{
+ Q_OBJECT
+
+public:
+ explicit MpMtpInfoLink();
+ virtual ~MpMtpInfoLink();
+
+protected:
+ void mousePressEvent( QGraphicsSceneMouseEvent *event );
+ void mouseReleaseEvent( QGraphicsSceneMouseEvent *event );
+
+private:
+ void setMtpInfoText();
+
+};
+
+#endif // MPMTPINFOLINK_H
+
--- a/app/resources/musiplayerapp.qrc Fri Jun 11 13:36:36 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-<RCC>
- <qresource prefix="/appeffects" >
- <file alias="slide_out_to_top.fxml">slide_out_to_top.fxml</file>
- <file alias="slide_out_to_right.fxml">slide_out_to_right.fxml</file>
- <file alias="slide_out_to_left.fxml">slide_out_to_left.fxml</file>
- <file alias="slide_in_to_top_and_fade_in.fxml">slide_in_to_top_and_fade_in.fxml</file>
- <file alias="slide_in_to_right_and_fade_in.fxml">slide_in_to_right_and_fade_in.fxml</file>
- <file alias="slide_in_to_left_and_fade_in.fxml">slide_in_to_left_and_fade_in.fxml</file>
- </qresource>
-</RCC>
--- a/app/resources/qtg_large_music_player.svg Fri Jun 11 13:36:36 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
-<svg baseProfile="tiny" height="60" viewBox="0 0 60 60" width="60" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
-<rect fill="none" height="60" width="60"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_1" x1="29.87" x2="30.09" y1="8.18" y2="51.03">
-<stop offset="0" stop-color="#D1D7D9"/>
-<stop offset="0.69" stop-color="#808A8C"/>
-<stop offset="1" stop-color="#A4ACAE"/>
-</linearGradient>
-<path d="M29.889,7.958C18.055,8.02,8.511,17.661,8.571,29.495 c0.061,11.833,9.704,21.377,21.537,21.317c11.833-0.06,21.378-9.702,21.317-21.536C51.363,17.443,41.723,7.898,29.889,7.958z M30.025,34.895c-3.043,0.016-5.522-2.438-5.538-5.481c-0.014-3.043,2.438-5.522,5.481-5.539c3.042-0.016,5.523,2.439,5.539,5.482 S33.07,34.879,30.025,34.895z" fill="url(#SVGID_1)"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_2" x1="29.93" x2="30.02" y1="20.37" y2="38.59">
-<stop offset="0" stop-color="#FFFFFF"/>
-<stop offset="1" stop-color="#CFCFCF"/>
-</linearGradient>
-<path d="M29.951,20.203c-5.072,0.026-9.163,4.158-9.136,9.23c0.026,5.071,4.157,9.161,9.229,9.135 c5.072-0.024,9.162-4.157,9.136-9.229C39.154,24.266,35.023,20.176,29.951,20.203z M30.023,34.282 c-2.705,0.014-4.909-2.168-4.923-4.872c-0.013-2.705,2.168-4.909,4.873-4.923c2.705-0.012,4.91,2.169,4.923,4.874 C34.908,32.065,32.728,34.27,30.023,34.282z" fill="url(#SVGID_2)"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_3" x1="50.84" x2="9.32" y1="39.88" y2="40.09">
-<stop offset="0" stop-color="#A0A7A9"/>
-<stop offset="0.5" stop-color="#FFFFFF"/>
-<stop offset="1" stop-color="#A0A7A9"/>
-</linearGradient>
-<path d="M30.101,49.703 C18.785,49.761,9.541,40.75,9.247,29.492c-0.002,0.147-0.01,0.295-0.008,0.446c0.059,11.464,9.4,20.713,20.867,20.657 c11.468-0.06,20.719-9.401,20.658-20.868c-0.002-0.149-0.01-0.297-0.014-0.445C50.57,40.541,41.419,49.646,30.101,49.703z" fill="url(#SVGID_3)" fill-opacity="0.3" stroke-opacity="0.3"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_4" x1="25.09" x2="34.89" y1="31.65" y2="31.6">
-<stop offset="0" stop-color="#848C8E"/>
-<stop offset="0.5" stop-color="#FFFFFF"/>
-<stop offset="1" stop-color="#848C8E"/>
-</linearGradient>
-<path d="M30.023,34.282c2.705-0.013,4.885-2.217,4.873-4.922c-0.001-0.155-0.011-0.309-0.026-0.459 c-0.217,2.49-2.301,4.603-4.85,4.615c-2.55,0.013-4.654-2.078-4.897-4.565c-0.013,0.151-0.022,0.305-0.021,0.459 C25.114,32.114,27.318,34.296,30.023,34.282z" fill="url(#SVGID_4)"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_5" x1="30" x2="30" y1="8.88" y2="50.2">
-<stop offset="0" stop-color="#36B5FF"/>
-<stop offset="1" stop-color="#1B66D8"/>
-</linearGradient>
-<path d="M29.891,8.571C18.395,8.629,9.124,17.996,9.183,29.491 c0.06,11.496,9.427,20.765,20.921,20.708c11.496-0.059,20.767-9.424,20.708-20.919C50.754,17.783,41.386,8.512,29.891,8.571z M30.043,38.215c-4.877,0.025-8.851-3.908-8.875-8.785h-0.002c-0.025-4.877,3.909-8.85,8.787-8.875 c4.878-0.025,8.85,3.908,8.875,8.785h0.003C38.854,34.218,34.92,38.191,30.043,38.215z" fill="url(#SVGID_5)"/>
-<path d="M10.215,33.473C8.057,23.053,14.406,12.693,24.67,9.886 c1.672-0.457,3.401-0.693,5.133-0.701c8.607-0.044,16.546,5.571,19.313,13.654l0.21,0.617l-10.387,2.838l-0.205-0.502 c-1.441-3.524-4.975-5.879-8.794-5.859c-0.819,0.004-1.639,0.116-2.434,0.333c-4.6,1.258-7.546,5.759-6.855,10.47l0.079,0.535 l-10.385,2.841L10.215,33.473z" fill="#FFFFFF" fill-opacity="0.2" stroke-opacity="0.2"/>
-<g transform="matrix(0.5 0 0 0.5 30 30)">
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_1_" x1="30" x2="30" y1="8.47" y2="51.32">
-<stop offset="0" stop-color="#F2F2F2"/>
-<stop offset="0.12" stop-color="#F2F2F2"/>
-<stop offset="0.55" stop-color="#ADB2B5"/>
-<stop offset="1" stop-color="#E6E9E8"/>
-</linearGradient>
-<path d="M29.998,51.425c-11.816,0-21.427-9.61-21.427-21.427c0-11.814,9.611-21.427,21.427-21.427 c11.813,0,21.427,9.613,21.427,21.427C51.425,41.814,41.812,51.425,29.998,51.425L29.998,51.425z" fill="url(#SVGID_1_)"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_2_" x1="30" x2="30" y1="9.18" y2="51.73">
-<stop offset="0" stop-color="#DDE3E6"/>
-<stop offset="0.48" stop-color="#C9CED1"/>
-<stop offset="1" stop-color="#899396"/>
-</linearGradient>
-<path d="M50.813,29.998c0,11.498-9.322,20.814-20.814,20.814c-11.499,0-20.815-9.316-20.815-20.814 c0-11.493,9.317-20.815,20.815-20.815C41.491,9.183,50.813,18.505,50.813,29.998z" fill="url(#SVGID_2_)"/>
-<polygon fill="#6D6E70" points="22.886,17.958 41.74,28.789 22.886,39.837 "/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_3_" x1="32.38" x2="32.38" y1="39.27" y2="19.91">
-<stop offset="0" stop-color="#FFFFFF"/>
-<stop offset="1" stop-color="#F5F6F6"/>
-</linearGradient>
-<polygon fill="url(#SVGID_3_)" points="24.046,19.963 40.724,29.593 24.046,39.221 "/>
-</g>
-<g transform="matrix(0.5 0 0 0.5 0 0)">
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_1__" x1="28.13" x2="28.13" y1="12.29" y2="51.26">
-<stop offset="0" stop-color="#8CFF24"/>
-<stop offset="1" stop-color="#15570B"/>
-</linearGradient>
-<path d="M48.631,13.079l-3.08-7.497L27.85,13.46l0.028,23.917c-2.712-1.771-6.708-2.354-10.768-1.254 c-6.405,1.725-10.542,6.951-9.247,11.665c1.3,4.718,7.543,7.142,13.944,5.415c5.412-1.461,9.159-5.324,9.138-9.451 c-0.018-4.129,0.033-15.338,0-23.445L48.631,13.079z" fill="url(#SVGID_1__)"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_2__" x1="27.86" x2="27.86" y1="9.02" y2="18.75">
-<stop offset="0" stop-color="#36B5FF"/>
-<stop offset="1" stop-color="#1B66D8"/>
-</linearGradient>
-<polygon fill="url(#SVGID_2__)" points="27.878,33.26 27.857,13.46 27.85,13.46 27.872,33.258 "/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_3__" x1="39.79" x2="39.79" y1="9.02" y2="18.75">
-<stop offset="0" stop-color="#9EFF47"/>
-<stop offset="1" stop-color="#11470A"/>
-</linearGradient>
-<path d="M30.945,19.08c0.007,1.306,0.01-0.201,0.012,1.223l17.674-7.225l-0.436-1.108L30.945,19.08z" fill="url(#SVGID_3__)"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_4_" x1="36.64" x2="36.76" y1="12.18" y2="36.51">
-<stop offset="0" stop-color="#B3FF6E"/>
-<stop offset="1" stop-color="#11470A"/>
-</linearGradient>
-<polygon fill="url(#SVGID_4_)" points="28.142,38.062 28.142,14.143 45.891,6.413 45.551,5.582 27.454,13.46 27.454,37.378 "/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_5_" x1="19.29" x2="19.29" y1="37.91" y2="52.09">
-<stop offset="0" stop-color="#B2F56E"/>
-<stop offset="0.47" stop-color="#40AD00"/>
-<stop offset="1" stop-color="#074D00"/>
-</linearGradient>
-<path d="M17.625,52.389c-4.258,0.021-7.653-1.941-8.447-4.885c-0.484-1.785,0.028-3.761,1.444-5.555 c1.55-1.964,3.944-3.454,6.747-4.191c1.187-0.317,2.386-0.477,3.573-0.484c4.258-0.021,7.651,1.943,8.45,4.885 c1.058,3.9-2.618,8.272-8.196,9.748C20.012,52.221,18.808,52.381,17.625,52.389L17.625,52.389z" fill="url(#SVGID_5_)"/>
-<rect fill="none" height="59.996" width="59.996"/>
-</g>
-</svg>
--- a/app/resources/slide_in_to_left_and_fade_in.fxml Fri Jun 11 13:36:36 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-<layers>
- <visual>
-
- <param name="translation_x" type="anim">
- <duration>.6</duration>
- <!--style>inoutcubic</style-->
- <keyframe at="0.0">0.0</keyframe>
- <keyframe at="1.0">1.0</keyframe>
- <start ref="screen.right">.3</start>
- <end ref="screen.left">1</end>
- </param>
-
- <param name="opacity" type="anim">
- <duration>.6</duration>
- <!--style>inoutcubic</style-->
- <keyframe at="0.0">0.0</keyframe>
- <keyframe at="1.0">1.0</keyframe>
- </param>
-
- </visual>
-</layers>
\ No newline at end of file
--- a/app/resources/slide_in_to_right_and_fade_in.fxml Fri Jun 11 13:36:36 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-<layers>
- <visual>
-
- <param name="translation_x" type="anim">
- <duration>.6</duration>
- <!--style>inoutcubic</style-->
- <keyframe at="0.0">0.0</keyframe>
- <keyframe at="1.0">1.0</keyframe>
- <start ref="screen.right">-.3</start>
- <end ref="screen.left">1</end>
- </param>
-
- <param name="opacity" type="anim">
- <duration>.6</duration>
- <!--style>inoutcubic</style-->
- <keyframe at="0.0">0.0</keyframe>
- <keyframe at="1.0">1.0</keyframe>
- </param>
-
- </visual>
-</layers>
\ No newline at end of file
--- a/app/resources/slide_in_to_top_and_fade_in.fxml Fri Jun 11 13:36:36 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-<layers>
- <visual>
-
- <param name="translation_y" type="anim">
- <duration>.6</duration>
- <!--style>inoutcubic</style-->
- <keyframe at="0.0">0.0</keyframe>
- <keyframe at="1.0">1.0</keyframe>
- <start ref="screen.bottom">.3</start>
- <end ref="screen.top">1</end>
- </param>
-
- <param name="opacity" type="anim">
- <duration>.6</duration>
- <!--style>inoutcubic</style-->
- <keyframe at="0.0">0.0</keyframe>
- <keyframe at="1.0">1.0</keyframe>
- </param>
-
- </visual>
-</layers>
\ No newline at end of file
--- a/app/resources/slide_out_to_left.fxml Fri Jun 11 13:36:36 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-<layers>
- <visual>
-
- <param name="translation_x" type="anim">
- <duration>.6</duration>
- <!--style>inoutcubic</style-->
- <keyframe at="0.0">0.0</keyframe>
- <keyframe at="1.0">1.0</keyframe>
- <start ref="screen.left">1</start>
- <end ref="screen.right">-0.3</end>
- </param>
-
- <param name="opacity" type="anim">
- <duration>.6</duration>
- <!--style>inoutcubic</style-->
- <keyframe at="0.0">1.0</keyframe>
- <keyframe at="1.0">0.0</keyframe>
- </param>
-
- </visual>
-</layers>
\ No newline at end of file
--- a/app/resources/slide_out_to_right.fxml Fri Jun 11 13:36:36 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-<layers>
- <visual>
-
- <param name="translation_x" type="anim">
- <duration>.6</duration>
- <!--style>inoutcubic</style-->
- <keyframe at="0.0">0.0</keyframe>
- <keyframe at="1.0">1.0</keyframe>
- <start ref="screen.left">1</start>
- <end ref="screen.right">0.3</end>
- </param>
-
- <param name="opacity" type="anim">
- <duration>.6</duration>
- <!--style>inoutcubic</style-->
- <keyframe at="0.0">1.0</keyframe>
- <keyframe at="1.0">0.0</keyframe>
- </param>
-
- </visual>
-</layers>
\ No newline at end of file
--- a/app/resources/slide_out_to_top.fxml Fri Jun 11 13:36:36 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-<layers>
- <visual>
-
- <param name="translation_y" type="anim">
- <duration>.6</duration>
- <!--style>inoutcubic</style-->
- <keyframe at="0.0">0.0</keyframe>
- <keyframe at="1.0">1.0</keyframe>
- <start ref="screen.top">1</start>
- <end ref="screen.bottom">-0.3</end>
- </param>
-
- <param name="opacity" type="anim">
- <duration>.6</duration>
- <!--style>inoutcubic</style-->
- <keyframe at="0.0">1.0</keyframe>
- <keyframe at="1.0">0.0</keyframe>
- </param>
-
- </visual>
-</layers>
\ No newline at end of file
--- a/app/src/main.cpp Fri Jun 11 13:36:36 2010 +0300
+++ b/app/src/main.cpp Wed Jun 23 18:10:13 2010 +0300
@@ -17,6 +17,7 @@
#include <QtGui>
#include <hbapplication.h>
+#include <hbtranslator.h>
#include "mpmainwindow.h"
#include "mptrace.h"
@@ -53,6 +54,8 @@
// Initialization
HbApplication app(argc, argv);
QVariantHash params = app.activateParams();
+ HbTranslator translator;
+ translator.loadCommon();
MpMainWindow::ActivityMode mode;
if ( !params.value( "activityname" ).toString().compare( "MusicNowPlayingView" ) ) {
@@ -74,12 +77,12 @@
mainWindow.viewport()->grabGesture(Qt::PanGesture);
mainWindow.viewport()->grabGesture(Qt::TapGesture);
mainWindow.viewport()->grabGesture(Qt::TapAndHoldGesture);
- mainWindow.setOptimizationFlag(QGraphicsView::DontSavePainterState);
mainWindow.initialize( mode );
mainWindow.show();
// Enter event loop
TX_EXIT
- return app.exec();
-
+ return app.exec();
+
}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/src/mpglobalpopuphandler.cpp Wed Jun 23 18:10:13 2010 +0300
@@ -0,0 +1,374 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Music Player global popup handler.
+*
+*/
+
+// INCLUDE FILES
+#include <hblabel.h>
+#include <hbaction.h>
+#include <hbfontspec.h>
+#include <hbmessagebox.h>
+#include <hbprogressdialog.h>
+#include <hbnotificationdialog.h>
+
+#include "mpglobalpopuphandler.h"
+#include "mpsettingsmanager.h"
+#include "mpenginefactory.h"
+#include "mpsongscanner.h"
+#include "mpmtpinfolink.h"
+#include "mptrace.h"
+
+/*!
+ \class MpGlobalPopupHandler
+ \brief Music Player global popup handler.
+
+ This class controls the asynchronous operation of all global dialogs.
+*/
+
+// Popups launched by this class
+const QString KScanProgressDialog = QString( "ScanProgressDialog" );
+const QString KDiskFullDialog = QString( "DiskFullDialog" );
+const QString KScanFinished = QString( "ScanFinishedDialog" );
+const QString KUnableToContinueDueUSB = QString( "UnableToContinueDueUSB" );
+const QString KUsbBlockingNote = QString( "UsbBlockingNote" );
+const QString KPromptRefresh = QString( "PromptRefresh" );
+const QString KMTPInfoDialog = QString( "MTPInfoDialog" );
+
+// Popups Actions
+const QString KYes = QString( "yes" );
+const QString KNo = QString( "no" );
+
+/*!
+ Constructs the collection popup handler.
+ */
+MpGlobalPopupHandler::MpGlobalPopupHandler( QObject *parent )
+ : QObject( parent ),
+ mOutstandingPopup( 0 ),
+ mMpEngine( 0 ),
+ mMpSongScanner( 0 )
+{
+ TX_ENTRY
+ mMpEngine = MpEngineFactory::sharedEngine();
+ connect( mMpEngine, SIGNAL( libraryAboutToUpdate() ), this, SLOT( handleLibraryAboutToUpdate() ) );
+ connect( mMpEngine, SIGNAL( unableToCotinueDueUSB() ), this, SLOT( launchUnableToCotinueDueUsb() ) );
+ connect( mMpEngine, SIGNAL( usbSynchronizationStarted() ), this, SLOT( launchUsbBlockingNote() ) );
+ connect( mMpEngine, SIGNAL( usbSynchronizationFinished() ), this, SLOT( closeUsbBlockingNote() ) );
+ connect( mMpEngine, SIGNAL( libraryRefreshNeeded() ), this, SLOT( launchRefreshLibraryRequest() ) );
+ TX_EXIT
+}
+
+/*!
+ Destructs the collection popup handler.
+ */
+MpGlobalPopupHandler::~MpGlobalPopupHandler()
+{
+ TX_ENTRY
+ delete mOutstandingPopup;
+ TX_EXIT
+}
+
+/*!
+ Closes any active popup
+ */
+void MpGlobalPopupHandler::cancelOngoingPopup()
+{
+ TX_ENTRY
+ if ( mOutstandingPopup ) {
+ mOutstandingPopup->close();
+ }
+ TX_EXIT
+}
+
+/*!
+ Slot called upon MpEngine signal libraryAboutToUpdate(). Used to connect with SongScanner.
+ */
+void MpGlobalPopupHandler::handleLibraryAboutToUpdate()
+{
+ TX_ENTRY
+ if ( !mMpSongScanner && mMpEngine->songScanner() ) {
+ mMpSongScanner = mMpEngine->songScanner();
+ connect( mMpSongScanner, SIGNAL( scanStarted() ), this, SLOT( launchScanDialog() ) );
+ connect( mMpSongScanner, SIGNAL( scanCountChanged( int ) ), this, SLOT( scanCountChanged( int ) ) );
+ connect( mMpSongScanner, SIGNAL( scanFinished( int, int ) ),
+ this, SLOT( handleScanFinished( int, int ) ) );
+ }
+ TX_EXIT
+}
+
+/*!
+ Slot called upon notification from MpSongScanner indicating start of
+ scanning process.
+ */
+void MpGlobalPopupHandler::launchScanDialog()
+{
+ TX_ENTRY
+ HbProgressDialog* scanProgressDialog = new HbProgressDialog( HbProgressDialog::WaitDialog );
+ connect( scanProgressDialog, SIGNAL( cancelled() ), mMpSongScanner, SLOT( cancelScan() ) );
+ scanProgressDialog->setModal( true );
+ HbLabel *title = new HbLabel( hbTrId( "txt_mus_title_refreshing" ) );
+ title->setFontSpec(HbFontSpec(HbFontSpec::Primary));
+
+ scanProgressDialog->setHeadingWidget( title );
+ scanProgressDialog->setText( QString("") );
+ scanProgressDialog->setAttribute( Qt::WA_DeleteOnClose );
+ scanProgressDialog->setObjectName( KScanProgressDialog );
+ setOutstandingPopup( scanProgressDialog );
+ scanProgressDialog->show();
+ TX_EXIT
+}
+
+/*!
+ Slot called upon notification from MpSongScanner indicating the number of
+ songs scanned so far.
+ */
+void MpGlobalPopupHandler::scanCountChanged(int count)
+{
+ TX_ENTRY_ARGS("count " << count )
+ if ( mOutstandingPopup && ( mOutstandingPopup->objectName() == KScanProgressDialog ) ) {
+ HbProgressDialog *dialog = qobject_cast<HbProgressDialog *>( mOutstandingPopup );
+ QString added;
+ added = hbTrId( "txt_mus_info_ln_songs_added" , count );
+ dialog->setText( added );
+ }
+ TX_EXIT
+}
+
+/*!
+ Slot called upon notification from MpSongScanner. Used to close current scan progress note,
+ and display scan results.
+
+ */
+void MpGlobalPopupHandler::handleScanFinished( int error, int itemsAdded )
+{
+ TX_ENTRY_ARGS("error: " << error << " Items added: " << itemsAdded )
+ if ( mOutstandingPopup && ( mOutstandingPopup->objectName() == KScanProgressDialog ) ) {
+ HbProgressDialog *dialog = qobject_cast<HbProgressDialog *>( mOutstandingPopup );
+ disconnect( dialog, SIGNAL( aboutToClose() ), this, SLOT( outstandingPopupClosing() ) );
+ mOutstandingPopup = 0;
+ dialog->close();
+ }
+
+ switch( error ) {
+ case MpSongScanner::ScanErrorNone :
+ launchScanFinishedDialog( true, itemsAdded );
+ break;
+ case MpSongScanner::ScanGeneralError :
+ launchScanFinishedDialog( false, itemsAdded );
+ break;
+ case MpSongScanner::ScanErrorDiskFull :
+ launchDiskFullDialog();
+ break;
+ case MpSongScanner::ScanInterrupted :
+ default:
+ //When scan interrupted (DiskEvent) just dimsiss the scanning progress note.
+ break;
+ }
+ TX_EXIT
+}
+
+/*!
+ Slot called when MpEngine emits unableToCotinueDueUSB() signal
+ */
+void MpGlobalPopupHandler::launchUnableToCotinueDueUsb()
+{
+ HbMessageBox *dialog = new HbMessageBox( HbMessageBox::MessageTypeInformation );
+ dialog->setText( hbTrId( "txt_mus_info_usb_conn_in_progress" ) );
+ dialog->setModal( true );
+ dialog->setAttribute( Qt::WA_DeleteOnClose );
+ dialog->setObjectName( KUnableToContinueDueUSB );
+ setOutstandingPopup( dialog );
+ dialog->show();
+}
+
+/*!
+ Slot called when MpEngine emits usbSynchronizationStarted() signal
+ */
+void MpGlobalPopupHandler::launchUsbBlockingNote()
+{
+ HbProgressDialog *usbBlockingNote = new HbProgressDialog( HbProgressDialog::WaitDialog );
+ usbBlockingNote->setModal( true );
+ if ( usbBlockingNote->actions().count() ) {
+ //Hide cancel action.
+ usbBlockingNote->actions().at( 0 )->setVisible( false );
+ }
+ usbBlockingNote->setDismissPolicy( HbPopup::NoDismiss );
+ usbBlockingNote->setText( hbTrId( "txt_mus_info_usb_conn_in_progress" ) );
+ usbBlockingNote->setAttribute( Qt::WA_DeleteOnClose );
+ usbBlockingNote->setObjectName( KUsbBlockingNote );
+ setOutstandingPopup( usbBlockingNote );
+ usbBlockingNote->show();
+}
+
+/*!
+ Slot called when MpEngine emits usbSynchronizationFinished() signal
+ */
+void MpGlobalPopupHandler::closeUsbBlockingNote()
+{
+ if ( mOutstandingPopup && ( mOutstandingPopup->objectName() == KUsbBlockingNote ) ) {
+ HbProgressDialog *dialog = qobject_cast<HbProgressDialog *>( mOutstandingPopup );
+ dialog->cancel();
+ }
+}
+
+/*!
+ Slot called when MpEngine emits libraryRefreshNeeded() signal
+ */
+void MpGlobalPopupHandler::launchRefreshLibraryRequest()
+{
+ HbAction *action;
+ HbMessageBox *promptRefresh = new HbMessageBox( HbMessageBox::MessageTypeQuestion );
+ promptRefresh->setText( hbTrId( "txt_mus_info_music_may_need_to_be_refreshed" ) );
+ promptRefresh->setTimeout( HbPopup::NoTimeout );
+ promptRefresh->setModal( true );
+ promptRefresh->clearActions();
+ action = new HbAction( hbTrId( "txt_common_button_yes" ) );
+ action->setObjectName( KYes );
+ connect( action, SIGNAL( triggered() ), mMpEngine, SLOT( refreshLibrary() ) );
+ promptRefresh->addAction( action );
+ action = new HbAction( hbTrId( "txt_common_button_no" ) );
+ action->setObjectName( KNo );
+ promptRefresh->addAction( action );
+ promptRefresh->setAttribute( Qt::WA_DeleteOnClose );
+ promptRefresh->setObjectName( KPromptRefresh );
+ setOutstandingPopup( promptRefresh );
+ promptRefresh->show();
+}
+
+/*!
+ Slot to launch the MTP educating info dialog
+ */
+void MpGlobalPopupHandler::launchMTPInfoDialog()
+{
+ TX_ENTRY
+ HbDialog *dialog = new HbDialog();
+ dialog->setContentWidget( new MpMtpInfoLink() );
+ dialog->setModal( true );
+ dialog->setDismissPolicy( HbPopup::NoDismiss);
+ dialog->setTimeout( HbPopup::NoTimeout );
+ HbAction *action;
+ action = new HbAction( hbTrId( "txt_common_button_yes" ) );
+ action->setObjectName( KYes );
+ dialog->addAction( action );
+ action = new HbAction( hbTrId( "txt_common_button_no" ) );
+ action->setObjectName( KNo );
+ dialog->addAction( action );
+ dialog->setAttribute( Qt::WA_DeleteOnClose );
+ dialog->setObjectName( KMTPInfoDialog );
+ setOutstandingPopup( dialog );
+ dialog->open( this, SLOT( hanldeMTPInfoDialogFinished( HbAction* ) ) );
+ TX_EXIT
+}
+
+/*!
+ Slot to be called when MtpInfoDialog has finished.
+ */
+void MpGlobalPopupHandler::hanldeMTPInfoDialogFinished( HbAction *selectedAction )
+{
+ TX_ENTRY
+ if ( selectedAction && selectedAction->objectName() == KNo ) {
+ MpSettingsManager::instance()->stopShowingMtpInfo();
+ }
+ TX_EXIT
+}
+
+/*!
+ Slot to be called when a popup is getting closed. Usefull when a dialog is closed before it finishes
+ (dialog not closed by a direct user action).
+ */
+void MpGlobalPopupHandler::outstandingPopupClosing()
+{
+ TX_ENTRY
+ HbPopup *popup = qobject_cast<HbPopup *>( sender() );
+ if ( popup ) {
+ Q_ASSERT( popup == mOutstandingPopup );
+ mOutstandingPopup = 0;
+ }
+ TX_EXIT
+}
+
+/*!
+ \internal
+ Launches Scan Finished Notification.
+ */
+void MpGlobalPopupHandler::launchScanFinishedDialog( bool ok, int itemsAdded )
+{
+ QString added;
+ HbNotificationDialog *finishedDialog = new HbNotificationDialog();
+ finishedDialog->setModal(true);
+ added = hbTrId( "txt_mus_dpopinfo_ln_songs_added", itemsAdded );
+ finishedDialog->setText( added );
+ finishedDialog->setAttribute( Qt::WA_DeleteOnClose );
+ finishedDialog->setObjectName( KScanFinished );
+ // Connect aboutToClose with outstandingPopupClosing() first, and then with launchMTPInfoDialog
+ // in order to get finishDialog cleared before MtpInfoDialog is launched.
+ setOutstandingPopup( finishedDialog );
+
+ if( ok ) {
+ finishedDialog->setIcon( HbIcon( QString("qtg_large_ok") ) );
+ finishedDialog->setTitle( hbTrId( "txt_mus_dpophead_refresh_complete" ) );
+ if ( MpSettingsManager::showMtpInfo() && !mMpSongScanner->isAutomaticScan() ) {
+ connect( finishedDialog, SIGNAL( aboutToClose() ), this, SLOT( launchMTPInfoDialog() ) );
+ }
+ }
+ else {
+ finishedDialog->setIcon( HbIcon( QString("qtg_small_fail") ) );
+ finishedDialog->setTitle( hbTrId( "txt_mus_dpophead_refresh_cancelled" ) );
+ }
+
+ finishedDialog->show();
+}
+
+/*!
+ \internal
+ Launches DiskFull Notification
+ */
+void MpGlobalPopupHandler::launchDiskFullDialog()
+{
+ TX_ENTRY
+ QString diskfull;
+ diskfull = hbTrId( "txt_mus_title_refresh_cancelled" );
+ diskfull.append(" ");
+ diskfull.append( hbTrId( "txt_mus_info_out_of_disk_space" ) );
+ HbMessageBox *diskFullDialog = new HbMessageBox();
+ diskFullDialog->setIcon( HbIcon( QString("qtg_small_fail") ) );
+ diskFullDialog->setText( diskfull );
+ diskFullDialog->setTimeout( HbPopup::NoTimeout);
+ diskFullDialog->setAttribute( Qt::WA_DeleteOnClose );
+ diskFullDialog->setObjectName( KDiskFullDialog );
+ setOutstandingPopup( diskFullDialog );
+ diskFullDialog->show();
+ TX_EXIT
+}
+
+/*!
+ \internal
+ sets \a popup as the current outstanding popup and cancels any other previous popup.
+ */
+void MpGlobalPopupHandler::setOutstandingPopup( HbPopup *popup )
+{
+ TX_ENTRY
+ if ( mOutstandingPopup ) {
+ TX_LOG_ARGS( "Warning: Multiple popups attempted to be displayed" );
+ if ( mOutstandingPopup->objectName() == KScanFinished ) {
+ disconnect( mOutstandingPopup, SIGNAL( aboutToClose() ), this, SLOT( launchMTPInfoDialog() ) );
+ }
+ mOutstandingPopup->close();
+ }
+
+ connect( popup, SIGNAL( aboutToClose() ), this, SLOT( outstandingPopupClosing() ) );
+ mOutstandingPopup = popup;
+ TX_EXIT
+}
+
--- a/app/src/mpmainwindow.cpp Fri Jun 11 13:36:36 2010 +0300
+++ b/app/src/mpmainwindow.cpp Wed Jun 23 18:10:13 2010 +0300
@@ -24,14 +24,13 @@
#include <xqplugininfo.h>
#include <xqserviceutil.h>
#include <xqsharablefile.h>
-#include <QTranslator>
-#include <QLocale>
#include "mpmainwindow.h"
#include "mpviewbase.h"
#include "musicservices.h"
#include "mpenginefactory.h"
#include "mpsettingsmanager.h"
+#include "mpglobalpopuphandler.h"
#include "mptrace.h"
/*!
@@ -55,7 +54,8 @@
mMediaWallViewPlugin(0),
mCurrentViewPlugin(0),
mVerticalViewType( CollectionView ),
- mMusicServices(0)
+ mMusicServices(0),
+ mPopupHandler(0)
{
TX_LOG
}
@@ -104,18 +104,6 @@
{
TX_ENTRY
- //Load musicplayer translator
- QTranslator translator;
- QString lang = QLocale::system().name();
- QString path = QString("z:/resource/qt/translations/");
-
- bool translatorLoaded = false;
- translatorLoaded = translator.load(path + "musicplayer_" + lang);
- TX_LOG_ARGS("Loading musicplayer translator ok=" << translatorLoaded);
- if ( translatorLoaded ) {
- qApp->installTranslator( &translator );
- }
-
#ifdef _DEBUG
QList<XQPluginInfo> impls;
XQPluginLoader::listImplementations("org.nokia.mmdt.MpxViewPlugin/1.0", impls);
@@ -136,6 +124,7 @@
if ( !mMusicServices ) {
MpEngineFactory::createSharedEngine();
+ mPopupHandler = new MpGlobalPopupHandler( this );
if ( orientation() == Qt::Vertical ) {
// If first startup ignore shuffleAll and send to collection view to refresh library
if ( mode == MusicMainView || MpSettingsManager::firstStartup() ) {
@@ -174,6 +163,10 @@
else {
setOrientation(Qt::Vertical, true);//This sould prevent media wall activation.
}
+ //since we only have one landscape view, media wall, disable automatic
+ //orientation transitions, they look like a flicker.
+ //This will make the view switch faster.
+ setAutomaticOrientationEffectEnabled( false );
TX_EXIT
}
@@ -340,6 +333,7 @@
case MusicServices::EUriFetcher:
{
MpEngineFactory::createSharedEngine( hostUid , MpEngine::Fetch );
+ mPopupHandler = new MpGlobalPopupHandler( this );
loadView( CollectionView, MpCommon::FetchView );
MpViewBase* collectionView = reinterpret_cast<MpViewBase*>(mCollectionViewPlugin->getView());
connect(collectionView, SIGNAL(songSelected(QString)), mMusicServices, SLOT(itemSelected(QString)));
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/src/mpmtpinfolink.cpp Wed Jun 23 18:10:13 2010 +0300
@@ -0,0 +1,98 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Music Player MTP info link. This class is used to provide a link
+* to educate the user about MTP after a successful manual refresh.
+* Basically this class inherits from HbLabel and catches mouse events,
+* when clicked it opens a url already specified in settings.
+*
+*/
+
+//Qt
+#include <QUrl>
+#include <QDesktopServices>
+#include <QGraphicsSceneMouseEvent>
+
+//Orbit
+#include <hbparameterlengthlimiter.h>
+
+//Local
+#include "mpsettingsmanager.h"
+#include "mpmtpinfolink.h"
+#include "mptrace.h"
+
+/*!
+ \class MpMtpInfoLink
+ \brief MpMtpInfoLink provides a label that can handle mouse events.
+
+ When label is clicked it opens a URL containing MTP information.
+*/
+
+/*!
+ Constructs MpMtpInfoLink.
+ */
+MpMtpInfoLink::MpMtpInfoLink()
+{
+ TX_ENTRY
+ setTextWrapping( Hb::TextWrapAnywhere );
+ setMtpInfoText();
+ TX_EXIT
+}
+
+/*!
+ Destructs the MpMtpInfoLink.
+ */
+MpMtpInfoLink::~MpMtpInfoLink()
+{
+ TX_LOG
+}
+
+/*!
+ Catches mouse press events.
+ */
+void MpMtpInfoLink::mousePressEvent( QGraphicsSceneMouseEvent *event )
+{
+ Q_UNUSED( event );
+}
+
+/*!
+ Catches mouse release event.
+ */
+void MpMtpInfoLink::mouseReleaseEvent( QGraphicsSceneMouseEvent *event )
+{
+ TX_ENTRY
+ QRectF itemRect = boundingRect();
+ QPointF releasePoint = event->lastPos();
+ if ( itemRect.contains( releasePoint ) ) {
+ QUrl url( MpSettingsManager::instance()->mtpInfoUrl() );
+ QDesktopServices::openUrl( url );
+ }
+ TX_EXIT
+}
+
+/*!
+ \internal
+ Set text to be shown in html format
+ */
+void MpMtpInfoLink::setMtpInfoText()
+{
+ TX_ENTRY
+ QString url = MpSettingsManager::instance()->mtpInfoUrl();
+ QString text = HbParameterLengthLimiter( "txt_mus_info_please_note_that_using_media_transfer" ).arg( url );
+ QString htmlLink = "<a href=\"" + url + "\">" + url + "</a>" ;
+ text.replace( url, htmlLink );
+ text = "<p>" + text + "</p>" ;
+ setHtml( text );
+ TX_EXIT
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/tsrc/tsrc.pro Wed Jun 23 18:10:13 2010 +0300
@@ -0,0 +1,20 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+TEMPLATE = subdirs
+
+SUBDIRS = unittest_mpmtpinfolink
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/tsrc/unittest_mpmtpinfolink/inc/unittest_mpmtpinfolink.h Wed Jun 23 18:10:13 2010 +0300
@@ -0,0 +1,53 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Unit test for MpMtpInfoLink
+*
+*/
+
+#ifndef TESTMPMTPINFOLINK_H
+#define TESTMPMTPINFOLINK_H
+
+#include <QtTest/QtTest>
+
+class MpMtpInfoLink;
+
+class TestMpMtpInfoLink : public QObject
+{
+ Q_OBJECT
+
+public:
+ TestMpMtpInfoLink();
+ virtual ~TestMpMtpInfoLink();
+
+public slots:
+
+ void initTestCase();
+ void cleanupTestCase();
+ void init();
+ void cleanup();
+
+private slots:
+
+ void testConstructor();
+ void testMousePressEvent();
+ void testMouseReleaseEvent();
+ void testSetMtpInfoText();
+
+private:
+ MpMtpInfoLink *mTest;
+
+};
+
+#endif // TESTMPMTPINFOLINK_H
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/tsrc/unittest_mpmtpinfolink/src/unittest_mpmtpinfolink.cpp Wed Jun 23 18:10:13 2010 +0300
@@ -0,0 +1,149 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Unit test for MpMtpInfoLink
+*
+*/
+
+#include <QGraphicsSceneMouseEvent>
+
+#include "stub/inc/hblabel.h"
+#include "stub/inc/qdesktopservices.h"
+#include "stub/inc/mpsettingsmanager.h"
+#include "unittest_mpmtpinfolink.h"
+
+
+// Do this so we can access all member variables.
+#define private public
+#define protected public
+#include "mpmtpinfolink.h"
+#undef protected
+#undef private
+
+//This so we can test private functions
+#include "../../src/mpmtpinfolink.cpp"
+
+
+/*!
+ Make our test case a stand-alone executable that runs all the test functions.
+ */
+int main(int argc, char *argv[])
+{
+ TestMpMtpInfoLink tv;
+
+ if ( argc > 1 ) {
+ return QTest::qExec( &tv, argc, argv);
+ }
+ else {
+ char *pass[3];
+ pass[0] = argv[0];
+ pass[1] = "-o";
+ pass[2] = "c:\\data\\unittest_mpmtpinfolink.txt";
+
+ return QTest::qExec(&tv, 3, pass);
+ }
+}
+
+TestMpMtpInfoLink::TestMpMtpInfoLink()
+ : mTest( 0 )
+{
+}
+
+TestMpMtpInfoLink::~TestMpMtpInfoLink()
+{
+ delete mTest;
+}
+
+/*!
+ Called before the first testfunction is executed.
+ */
+void TestMpMtpInfoLink::initTestCase()
+{
+}
+
+/*!
+ Called after the last testfunction was executed.
+ */
+void TestMpMtpInfoLink::cleanupTestCase()
+{
+}
+
+/*!
+ Called before each testfunction is executed.
+ */
+void TestMpMtpInfoLink::init()
+{
+ mTest = new MpMtpInfoLink();
+}
+
+/*!
+ Called after every testfunction.
+ */
+void TestMpMtpInfoLink::cleanup()
+{
+ delete mTest;
+ mTest = 0;
+}
+
+/*!
+ Tests constructor.
+*/
+void TestMpMtpInfoLink::testConstructor()
+{
+ QVERIFY(mTest->textWrapping() == Hb::TextWrapAnywhere );
+}
+
+/*!
+ testMousePressEvent.
+ */
+void TestMpMtpInfoLink::testMousePressEvent()
+{
+ //MpMtpInfoLink::mousePressEvent does nothing, included just to cover all functions.
+ QGraphicsSceneMouseEvent *event = new QGraphicsSceneMouseEvent();
+ mTest->mousePressEvent( event );
+ QVERIFY( mTest );
+}
+
+/*!
+ Tests HandleOpen.
+ */
+void TestMpMtpInfoLink::testMouseReleaseEvent()
+{
+ QGraphicsSceneMouseEvent *event = new QGraphicsSceneMouseEvent();
+
+ //Mock label rect: x=10, y=10, width=10, height=10);
+ QPointF releasePointOut(5,5);
+ QPointF releasePointIn(15,15);
+
+ //Verify releasing the mouse outside the label
+ event->setLastPos( releasePointOut );
+ mTest->mouseReleaseEvent( event );
+ QCOMPARE( QDesktopServices::instance()->mOpenUrlCount, 0);
+ //Verify releasing the mouse inside the label
+ event->setLastPos( releasePointIn );
+ mTest->mouseReleaseEvent( event );
+ QCOMPARE( QDesktopServices::instance()->mOpenUrlCount, 1);
+}
+
+/*!
+ testSetMtpInfoText
+ */
+void TestMpMtpInfoLink::testSetMtpInfoText( )
+{
+ //Verify with an url
+ QVERIFY( mTest->plainText().length() == 0 );
+ QVERIFY( mTest->html().length() > 0 );
+
+}
+
+//end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/tsrc/unittest_mpmtpinfolink/stub/inc/hblabel.h Wed Jun 23 18:10:13 2010 +0300
@@ -0,0 +1,60 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: HbLabel stub for testing MpMtpInfoLink
+*
+*/
+
+#ifndef HBLABEL_H
+#define HBLABEL_H
+
+#include <QGraphicsView>
+
+namespace Hb
+{
+/*!
+ A type definition for text wrapping
+*/
+ enum TextWrapping
+ {
+ TextNoWrap = 0,
+ TextWordWrap = 1,
+ TextWrapAnywhere = 3
+ };
+}
+
+class HbLabel : public QObject
+{
+
+public:
+ explicit HbLabel ();
+ virtual ~HbLabel ();
+
+ QString plainText() const;
+ QString html() const;
+
+ void setTextWrapping(Hb::TextWrapping mode);
+ Hb::TextWrapping textWrapping() const;
+
+ void setPlainText(const QString &text);
+ void setHtml(const QString &text);
+ QRectF boundingRect();
+
+private:
+ QString mText;
+ QString mHtmlText;
+ Hb::TextWrapping mTextWrapping;
+};
+
+
+#endif // HBLABEL_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/tsrc/unittest_mpmtpinfolink/stub/inc/hbparameterlengthlimiter.h Wed Jun 23 18:10:13 2010 +0300
@@ -0,0 +1,25 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: HbLabel stub for testing MpMtpInfoLink
+*
+*/
+
+#ifndef HBPARAMETERLENGTHLIMITER_H
+#define HBPARAMETERLENGTHLIMITER_H
+
+#include <QtCore/qstring.h>
+
+typedef QString HbParameterLengthLimiter;
+
+#endif // HBPARAMETERLENGTHLIMITER_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/tsrc/unittest_mpmtpinfolink/stub/inc/mpsettingsmanager.h Wed Jun 23 18:10:13 2010 +0300
@@ -0,0 +1,45 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: MpSettingsManager stub for testing MpMtpInfoLink.
+*
+*/
+
+#ifndef MPSETTINGSMANAGER_H
+#define MPSETTINGSMANAGER_H
+
+#include<QObject>
+#include <QtGlobal>
+
+class MpSettingsManager: public QObject
+{
+
+Q_OBJECT
+
+private:
+ explicit MpSettingsManager();
+
+public:
+ virtual ~MpSettingsManager();
+ static MpSettingsManager *instance();
+ static void SetUrl( QString url );
+ static QString mtpInfoUrl();
+
+public:
+ QString mMtpInfoUrl;
+
+private:
+ Q_DISABLE_COPY(MpSettingsManager)
+};
+
+#endif // MPSETTINGSMANAGER_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/tsrc/unittest_mpmtpinfolink/stub/inc/qdesktopservices.h Wed Jun 23 18:10:13 2010 +0300
@@ -0,0 +1,39 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: QDesktopServices stub for testing MpMtpInfoLink.
+*
+*/
+
+#ifndef QDESKTOPSERVICES_H
+#define QDESKTOPSERVICES_H
+
+#include <QtCore/qstring.h>
+
+class QUrl;
+
+class QDesktopServices
+{
+private:
+ explicit QDesktopServices();
+
+public:
+ virtual ~QDesktopServices();
+ static QDesktopServices *instance();
+ static bool openUrl( const QUrl &url);
+
+ int mOpenUrlCount;
+
+};
+
+#endif // QDESKTOPSERVICES_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/tsrc/unittest_mpmtpinfolink/stub/src/hblabel.cpp Wed Jun 23 18:10:13 2010 +0300
@@ -0,0 +1,107 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: HbLabel stub for testing MpMtpInfoLink
+*
+*/
+
+#include <QGraphicsSceneMouseEvent>
+
+#include "stub/inc/hblabel.h"
+
+
+/*!
+ Constructs the label
+ */
+HbLabel::HbLabel()
+{
+ mText = QString();
+ mHtmlText = QString();
+ mTextWrapping = Hb::TextNoWrap;
+}
+
+/*!
+ Label destructor.
+ */
+HbLabel::~HbLabel ()
+{
+}
+
+/*!
+ Sets the text wrapping mode to \a mode.
+ \param mode - wrapping mode
+
+ \sa Hb::TextWrapping
+ */
+void HbLabel::setTextWrapping(Hb::TextWrapping mode)
+{
+ mTextWrapping = mode;
+}
+
+/*!
+ \return the label's current text wrapping mode.
+ Default value is NoWrap.
+
+ \sa setTextWrapping()
+ */
+Hb::TextWrapping HbLabel::textWrapping() const
+{
+ return mTextWrapping;
+}
+
+/*!
+ Sets the label contents to plain text containing \a text. Any previous content is cleared.
+ \param text - the plain text that is shown in the label.
+
+ \sa setHtml()
+ */
+void HbLabel::setPlainText(const QString &text)
+{
+ mText = text;
+}
+
+/*!
+ Sets the label contents to html text containing \a text. Any previous content is cleared.
+ \param text - the html text that is shown in the label.
+
+ \sa setPlainText()
+ */
+void HbLabel::setHtml(const QString &text)
+{
+ mHtmlText = text;
+}
+
+/*!
+ Plain text accessor. Returns empty string if not set.
+ */
+QString HbLabel::plainText() const
+{
+ return mText;
+}
+
+/*!
+ Rich text text accessor. Returns empty string if not set.
+ */
+QString HbLabel::html() const
+{
+ return mHtmlText;
+}
+
+/*!
+ Fake widget rectangle accessor.
+ */
+QRectF HbLabel::boundingRect()
+{
+ return QRectF(10, 10, 10, 10);
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/tsrc/unittest_mpmtpinfolink/stub/src/mpsettingsmanager.cpp Wed Jun 23 18:10:13 2010 +0300
@@ -0,0 +1,57 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: MpSettingsManager stub for testing MpMtpInfoLink.
+*
+*/
+
+#include "stub/inc/mpsettingsmanager.h"
+
+
+/*!
+ Constructs the MP Settings Manager.
+ */
+MpSettingsManager::MpSettingsManager()
+{
+ mMtpInfoUrl = QString( "http://nokia.com/" );
+}
+
+/*!
+ Destructs the settings manager.
+ */
+MpSettingsManager::~MpSettingsManager()
+{
+}
+
+/*!
+ Returns the singleton instance to the settings manager.
+ */
+MpSettingsManager * MpSettingsManager::instance()
+{
+ static MpSettingsManager instance;
+ return &instance;
+}
+
+void MpSettingsManager::SetUrl( QString url )
+{
+ instance()->mMtpInfoUrl = url;
+}
+
+/*!
+ Returns mtp info url.
+ */
+QString MpSettingsManager::mtpInfoUrl()
+{
+ return instance()->mMtpInfoUrl;
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/tsrc/unittest_mpmtpinfolink/stub/src/qdesktopservices.cpp Wed Jun 23 18:10:13 2010 +0300
@@ -0,0 +1,53 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: QDesktopServices stub for testing MpMtpInfoLink.
+*
+*/
+
+#include <QUrl>
+
+#include "stub/inc/qdesktopservices.h"
+
+
+/*!
+ Constructs the QDesktopServices.
+ */
+QDesktopServices::QDesktopServices()
+{
+ mOpenUrlCount = 0;
+}
+
+/*!
+ Destructs the QDesktopServices.
+ */
+QDesktopServices::~QDesktopServices()
+{
+}
+
+/*!
+ Returns the singleton instance to the QDesktopServices.
+ */
+QDesktopServices * QDesktopServices::instance()
+{
+ static QDesktopServices instance;
+ return &instance;
+}
+
+bool QDesktopServices::openUrl( const QUrl &url)
+{
+ Q_UNUSED( url );
+ instance()->mOpenUrlCount++;
+ return true;
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/tsrc/unittest_mpmtpinfolink/unittest_mpmtpinfolink.pro Wed Jun 23 18:10:13 2010 +0300
@@ -0,0 +1,45 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+TEMPLATE = app
+CONFIG += qtestlib
+CONFIG += symbian_test
+TARGET = unittest_mpmtpinfolink
+TARGET.CAPABILITY = CAP_APPLICATION
+
+DEPENDPATH += .
+INCLUDEPATH += . \
+ ../../inc \
+ ../../../inc
+
+INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
+
+LIBS += -lestor.dll \
+ -lfbscli.dll
+
+HEADERS += inc/unittest_mpmtpinfolink.h \
+ ../../inc/mpmtpinfolink.h \
+ stub/inc/hblabel.h \
+ stub/inc/hbparameterlengthlimiter.h \
+ stub/inc/mpsettingsmanager.h \
+ stub/inc/qdesktopservices.h
+
+SOURCES += src/unittest_mpmtpinfolink.cpp \
+ ../../src/mpmtpinfolink.cpp \
+ stub/src/hblabel.cpp \
+ stub/src/mpsettingsmanager.cpp \
+ stub/src/qdesktopservices.cpp
+
--- a/inc/mpcollectiondatamodel.h Fri Jun 11 13:36:36 2010 +0300
+++ b/inc/mpcollectiondatamodel.h Wed Jun 23 18:10:13 2010 +0300
@@ -19,6 +19,7 @@
#define MPCOLLECTIONDATAMODEL_H
#include <QAbstractListModel>
+
#include "mpmpxcollectionviewdefs.h"
class MpMpxCollectionData;
@@ -47,6 +48,7 @@
QMimeData *mimeData(const QModelIndexList &indexes) const;
bool dropMimeData(const QMimeData *data, Qt::DropAction action,
int row, int column, const QModelIndex &parent);
+ void setItemVisibility(const QModelIndex &index, bool visible);
MpMpxCollectionData *collectionData();
@@ -68,6 +70,7 @@
MpCollectionAlbumArtManager *mAlbumArtManager; // Own
int mRowCount;
int mAlbumIndexOffset;
+ int mHiddenItemIndex;
};
--- a/inc/mpengine.h Fri Jun 11 13:36:36 2010 +0300
+++ b/inc/mpengine.h Wed Jun 23 18:10:13 2010 +0300
@@ -25,9 +25,8 @@
class QStringList;
-class QTranslator;
-class HbPopup;
class MpMpxHarvesterFrameworkWrapper;
+class MpSongScanner;
class MpMediaKeyHandler;
class MpMpxCollectionFrameworkWrapper;
class MpMpxPlaybackFrameworkWrapper;
@@ -39,7 +38,6 @@
class MpEngineFactory;
class MpAudioEffectsFrameworkWrapper;
class MpEqualizerFrameworkWrapper;
-class MpProgressDialogHandler;
#if defined(BUILD_MPENGINE_LIB)
#define MPENGINE_EXPORT Q_DECL_EXPORT
@@ -62,9 +60,8 @@
Embedded,
MediaBrowsing
};
-
+
private:
-
enum UsbBlockingState {
USB_NotConnected, // Not connected
USB_Connected, // Connected in MTP mode but not synchronizing
@@ -79,9 +76,10 @@
virtual ~MpEngine();
// Harvester related
- bool verifyUsbBlocking( bool showMessage = false );
+ bool verifyUsbBlocking( bool notify = false );
void checkForSystemEvents();
-
+ MpSongScanner *songScanner();
+
// Collection related
void openCollection( TCollectionContext context );
void openCollectionItem( int index );
@@ -102,22 +100,22 @@
void playAlbumSongs( int albumIndex, int songIndex, MpMpxCollectionData* collectionData = 0 );
MpMpxCollectionData *collectionData();
-
+
// Playback related
-
+
MpPlaybackData *playbackData();
-
+
void shuffleAll();
-
+
// Details related
MpSongData *songData();
void retrieveSong();
-
+
// Audio Effects related
int balance();
bool loudness();
-
+
// Equalizer related
void applyPreset( int presetIndex );
void disableEqualizer();
@@ -125,40 +123,44 @@
QStringList presetNames();
signals:
-
+
// Harvester related
void libraryAboutToUpdate();
void libraryUpdated();
void usbBlocked( bool blocked );
-
+ void unableToCotinueDueUSB();
+ void usbSynchronizationStarted();
+ void usbSynchronizationFinished();
+ void libraryRefreshNeeded();
+
// Collection related
void collectionPlaylistOpened();
+ void aboutToAddSongs( int count );
void playlistSaved( bool success );
+ void deleteStarted(TCollectionContext context, int Count);
void songsDeleted( bool success );
void playlistsRenamed( bool success );
-
void isolatedCollectionOpened( MpMpxCollectionData* collectionData );
-
void containerContentsChanged();
-
+
// Equalizer related
void equalizerReady();
public slots:
// Harvester related
- void refreshLibrary();
+ void refreshLibrary( bool automaticRequest = false );
void handleScanStarted();
void handleScanEnded( int count, int error );
void handleDiskEvent( MpxDiskEvents event );
void handleUsbEvent( MpxUsbEvents event );
- void handleOutstandingNoteClosing();
-
+
// Collection related
void reopenCollection();
void reorderPlaylist( int playlistId, int songId, int originalOrdinal, int newOrdinal );
- void handleDeleteStarted();
- void handleDeleteEnded();
+ void handleDeleteStarted( TCollectionContext context, int count );
+ void handleDeleteEnded( bool success );
+ void cancelCollectionRequest();
// Playback related
void playEmbedded( QString aFilename );
@@ -173,14 +175,14 @@
void setPosition( int position );
void setShuffle( bool mode );
void setRepeat( bool mode );
-
+
// Audio Effects related
void setBalance( int balance );
void setLoudness( bool mode );
-
+
// Equalizer related
void handleEqualizerReady();
-
+
private:
void initialize( TUid hostUid, EngineMode mode);
@@ -191,43 +193,37 @@
void handleUsbMtpStartEvent();
void handleUsbMtpEndEvent();
void handleUsbMtpNotActive();
+ void changeUsbBlockingState( UsbBlockingState state );
- void changeUsbBlockingState( UsbBlockingState state );
- void launchBlockingNote();
- void setOutstandingPopup( HbPopup *popup );
-
private:
Q_DISABLE_COPY( MpEngine )
// Harvesting related
MpMpxHarvesterFrameworkWrapper *mMpxHarvesterWrapper; // Own
+ MpSongScanner *mSongScanner; // Own
MpMediaKeyHandler *mMediaKeyHandler; // Own
- HbPopup *mUsbOutstandingNote; // Own
-
+
// Collection related
MpMpxCollectionFrameworkWrapper *mMpxCollectionWrapper; //Own
// Playback related
MpMpxPlaybackFrameworkWrapper *mMpxPlaybackWrapper; //Own
-
+
// Details related
MpMpxDetailsFrameworkWrapper *mMpxDetailsWrapper; // Own
-
+
// Audio Effects related
MpAudioEffectsFrameworkWrapper *mAudioEffectsWrapper; // Own
-
+
// Equalizer related
MpEqualizerFrameworkWrapper *mEqualizerWrapper; // Own
int mCurrentPresetIndex;
-
+
// General
- QTranslator *mMpTranslator; // Own
UsbBlockingState mUsbBlockingState;
UsbBlockingState mPreviousUsbState;
TUid mHostUid;
- MpProgressDialogHandler *mProgressDialogHandler; // Own
-
};
#endif // MPENGINE_H
--- a/inc/mpsettingsmanager.h Fri Jun 11 13:36:36 2010 +0300
+++ b/inc/mpsettingsmanager.h Wed Jun 23 18:10:13 2010 +0300
@@ -46,6 +46,8 @@
static int preset();
static bool inspireMe();
static bool songDetailsGb();
+ static bool showMtpInfo();
+ static QString mtpInfoUrl();
public slots:
void valueChanged(const XQSettingsKey& key, const QVariant& value);
@@ -54,6 +56,7 @@
static void setPreset(int preset);
static void setInspireMe(bool inspireme);
static void setSongDetailsGb(bool songdetails);
+ static void stopShowingMtpInfo();
signals:
void shuffleChanged(bool shuffle);
@@ -65,12 +68,14 @@
private:
Q_DISABLE_COPY(MpSettingsManager)
XQSettingsManager* mSettingsManager;
- bool mFirstStartup;
- bool mShuffle;
- bool mRepeat;
- int mPreset;
- bool mInspireMe;
- bool mSongDetailsGb;
+ bool mFirstStartup;
+ bool mShuffle;
+ bool mRepeat;
+ int mPreset;
+ bool mInspireMe;
+ bool mSongDetailsGb;
+ bool mShowMtpInfo;
+ QString mMtpInfoUrl;
};
#endif // MPSETTINGSMANAGER_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/inc/mpsongscanner.h Wed Jun 23 18:10:13 2010 +0300
@@ -0,0 +1,71 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Music Player song scanner.
+*
+*/
+
+
+#ifndef MPSONGSCANNER_H
+#define MPSONGSCANNER_H
+
+class MpMpxHarvesterFrameworkWrapper;
+
+#include <QObject>
+#include "mpmpxcommondefs.h"
+
+#if defined(BUILD_MPENGINE_LIB)
+#define MPENGINE_EXPORT Q_DECL_EXPORT
+#else
+#define MPENGINE_EXPORT Q_DECL_IMPORT
+#endif
+
+class MPENGINE_EXPORT MpSongScanner : public QObject
+{
+ Q_OBJECT
+
+public:
+
+ enum ScanError{
+ ScanErrorNone,
+ ScanGeneralError,
+ ScanErrorDiskFull,
+ ScanInterrupted
+ };
+
+ explicit MpSongScanner( MpMpxHarvesterFrameworkWrapper *wrapper, QObject *parent = 0 );
+ virtual ~MpSongScanner();
+
+ void scan( bool automaticScan );
+ bool isAutomaticScan();
+
+signals:
+ void scanStarted();
+ void scanCountChanged( int count );
+ void scanFinished( int error, int itemsAdded );
+
+public slots:
+ void cancelScan();
+ void handleScanEnded( int numItemsAdded, int error );
+ void handleDiskEvent( MpxDiskEvents event );
+
+private:
+
+ MpMpxHarvesterFrameworkWrapper *mMpxHarvesterWrapper; // Not own
+ bool mScanning;
+ bool mAutomaticScan;
+
+};
+
+#endif // MPSONGSCANNER_H
+
--- a/mpdata/bwins/mpdatau.def Fri Jun 11 13:36:36 2010 +0300
+++ b/mpdata/bwins/mpdatau.def Wed Jun 23 18:10:13 2010 +0300
@@ -114,76 +114,77 @@
?rowCount@MpCollectionTBoneListDataModel@@UBEHABVQModelIndex@@@Z @ 113 NONAME ; int MpCollectionTBoneListDataModel::rowCount(class QModelIndex const &) const
?dataChanged@MpMpxCollectionData@@IAEXXZ @ 114 NONAME ; void MpMpxCollectionData::dataChanged(void)
?trUtf8@MpCollectionTBoneListDataModel@@SA?AVQString@@PBD0H@Z @ 115 NONAME ; class QString MpCollectionTBoneListDataModel::trUtf8(char const *, char const *, int)
- ?getStaticMetaObject@MpSongData@@SAABUQMetaObject@@XZ @ 116 NONAME ; struct QMetaObject const & MpSongData::getStaticMetaObject(void)
- ?songDetailInfoChanged@MpSongData@@IAEXXZ @ 117 NONAME ; void MpSongData::songDetailInfoChanged(void)
- ?mimeTypes@MpCollectionDataModel@@UBE?AVQStringList@@XZ @ 118 NONAME ; class QStringList MpCollectionDataModel::mimeTypes(void) const
- ?albumArt@MpSongData@@QBEXAAVHbIcon@@@Z @ 119 NONAME ; void MpSongData::albumArt(class HbIcon &) const
- ?isDrmProtected@MpSongData@@QBE_NXZ @ 120 NONAME ; bool MpSongData::isDrmProtected(void) const
- ?collectionTitle@MpMpxCollectionData@@QBE?AVQString@@XZ @ 121 NONAME ; class QString MpMpxCollectionData::collectionTitle(void) const
- ?albumTrack@MpSongData@@QBE?AVQString@@XZ @ 122 NONAME ; class QString MpSongData::albumTrack(void) const
- ?setArtist@MpSongData@@QAE_NABVQString@@@Z @ 123 NONAME ; bool MpSongData::setArtist(class QString const &)
- ?tr@MpPlaybackData@@SA?AVQString@@PBD0@Z @ 124 NONAME ; class QString MpPlaybackData::tr(char const *, char const *)
- ?setYear@MpSongData@@QAE_NH@Z @ 125 NONAME ; bool MpSongData::setYear(int)
- ?qt_metacall@MpPlaybackData@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 126 NONAME ; int MpPlaybackData::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?albumSongData@MpMpxCollectionData@@QBE?AVQString@@HW4DataType@1@@Z @ 127 NONAME ; class QString MpMpxCollectionData::albumSongData(int, enum MpMpxCollectionData::DataType) const
- ?playbackInfoChanged@MpSongData@@IAEXXZ @ 128 NONAME ; void MpSongData::playbackInfoChanged(void)
- ?insertCachedItem@MpMpxCollectionData@@QAEXH@Z @ 129 NONAME ; void MpMpxCollectionData::insertCachedItem(int)
- ?setComposer@MpSongData@@QAE_NABVQString@@@Z @ 130 NONAME ; bool MpSongData::setComposer(class QString const &)
- ?setAlbumContent@MpMpxCollectionData@@QAEXABVCMPXMedia@@@Z @ 131 NONAME ; void MpMpxCollectionData::setAlbumContent(class CMPXMedia const &)
- ??0MpMpxCollectionData@@QAE@PAVQObject@@@Z @ 132 NONAME ; MpMpxCollectionData::MpMpxCollectionData(class QObject *)
- ?setArtist@MpPlaybackData@@QAE_NABVQString@@@Z @ 133 NONAME ; bool MpPlaybackData::setArtist(class QString const &)
- ?trUtf8@MpSongData@@SA?AVQString@@PBD0@Z @ 134 NONAME ; class QString MpSongData::trUtf8(char const *, char const *)
- ?albumId@MpPlaybackData@@QAEHXZ @ 135 NONAME ; int MpPlaybackData::albumId(void)
- ??1MpMpxCollectionData@@UAE@XZ @ 136 NONAME ; MpMpxCollectionData::~MpMpxCollectionData(void)
- ??0MpPlaybackData@@QAE@PAVQObject@@@Z @ 137 NONAME ; MpPlaybackData::MpPlaybackData(class QObject *)
- ?trUtf8@MpCollectionDataModel@@SA?AVQString@@PBD0H@Z @ 138 NONAME ; class QString MpCollectionDataModel::trUtf8(char const *, char const *, int)
- ?metaObject@MpMpxCollectionData@@UBEPBUQMetaObject@@XZ @ 139 NONAME ; struct QMetaObject const * MpMpxCollectionData::metaObject(void) const
- ?qt_metacast@MpMpxCollectionData@@UAEPAXPBD@Z @ 140 NONAME ; void * MpMpxCollectionData::qt_metacast(char const *)
- ?qt_metacast@MpPlaybackData@@UAEPAXPBD@Z @ 141 NONAME ; void * MpPlaybackData::qt_metacast(char const *)
- ?size@MpSongData@@QBE?AVQString@@XZ @ 142 NONAME ; class QString MpSongData::size(void) const
- ??_EMpSongData@@UAE@I@Z @ 143 NONAME ; MpSongData::~MpSongData(unsigned int)
- ?containerId@MpMpxCollectionData@@QAEHXZ @ 144 NONAME ; int MpMpxCollectionData::containerId(void)
- ?containerMedia@MpMpxCollectionData@@QAEABVCMPXMedia@@XZ @ 145 NONAME ; class CMPXMedia const & MpMpxCollectionData::containerMedia(void)
- ?setDuration@MpSongData@@QAE_NH@Z @ 146 NONAME ; bool MpSongData::setDuration(int)
- ??_EMpCollectionTBoneListDataModel@@UAE@I@Z @ 147 NONAME ; MpCollectionTBoneListDataModel::~MpCollectionTBoneListDataModel(unsigned int)
- ??1MpCollectionDataModel@@UAE@XZ @ 148 NONAME ; MpCollectionDataModel::~MpCollectionDataModel(void)
- ?setSize@MpSongData@@QAE_NH@Z @ 149 NONAME ; bool MpSongData::setSize(int)
- ?thumbnailReady@MpSongData@@QAEXABVQPixmap@@PAXHH@Z @ 150 NONAME ; void MpSongData::thumbnailReady(class QPixmap const &, void *, int, int)
- ?tr@MpCollectionDataModel@@SA?AVQString@@PBD0H@Z @ 151 NONAME ; class QString MpCollectionDataModel::tr(char const *, char const *, int)
- ?reloadData@MpCollectionDataModel@@QAEXXZ @ 152 NONAME ; void MpCollectionDataModel::reloadData(void)
- ?commitSongDetailInfo@MpSongData@@QAEXXZ @ 153 NONAME ; void MpSongData::commitSongDetailInfo(void)
- ??1MpCollectionTBoneListDataModel@@UAE@XZ @ 154 NONAME ; MpCollectionTBoneListDataModel::~MpCollectionTBoneListDataModel(void)
- ?qt_metacall@MpSongData@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 155 NONAME ; int MpSongData::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?reservedLength@MpSongData@@QBEHXZ @ 156 NONAME ; int MpSongData::reservedLength(void) const
- ?collectionData@MpCollectionDataModel@@QAEPAVMpMpxCollectionData@@XZ @ 157 NONAME ; class MpMpxCollectionData * MpCollectionDataModel::collectionData(void)
- ?trUtf8@MpMpxCollectionData@@SA?AVQString@@PBD0@Z @ 158 NONAME ; class QString MpMpxCollectionData::trUtf8(char const *, char const *)
- ?setPosition@MpPlaybackData@@QAEXH@Z @ 159 NONAME ; void MpPlaybackData::setPosition(int)
- ??1MpPlaybackData@@UAE@XZ @ 160 NONAME ; MpPlaybackData::~MpPlaybackData(void)
- ?tr@MpSongData@@SA?AVQString@@PBD0@Z @ 161 NONAME ; class QString MpSongData::tr(char const *, char const *)
- ?setPlaybackState@MpPlaybackData@@QAEXW4SimplifiedState@1@@Z @ 162 NONAME ; void MpPlaybackData::setPlaybackState(enum MpPlaybackData::SimplifiedState)
- ?refreshAlbumSongs@MpMpxCollectionData@@IAEXXZ @ 163 NONAME ; void MpMpxCollectionData::refreshAlbumSongs(void)
- ?trUtf8@MpPlaybackData@@SA?AVQString@@PBD0@Z @ 164 NONAME ; class QString MpPlaybackData::trUtf8(char const *, char const *)
- ?albumDataChanged@MpCollectionTBoneListDataModel@@IAEXXZ @ 165 NONAME ; void MpCollectionTBoneListDataModel::albumDataChanged(void)
- ?comment@MpSongData@@QBE?AVQString@@XZ @ 166 NONAME ; class QString MpSongData::comment(void) const
- ?year@MpSongData@@QBE?AVQString@@XZ @ 167 NONAME ; class QString MpSongData::year(void) const
- ?data@MpCollectionTBoneListDataModel@@UBE?AVQVariant@@ABVQModelIndex@@H@Z @ 168 NONAME ; class QVariant MpCollectionTBoneListDataModel::data(class QModelIndex const &, int) const
- ?setAlbum@MpSongData@@QAE_NABVQString@@@Z @ 169 NONAME ; bool MpSongData::setAlbum(class QString const &)
- ?albumSongIndex@MpMpxCollectionData@@QAEHH@Z @ 170 NONAME ; int MpMpxCollectionData::albumSongIndex(int)
- ?getStaticMetaObject@MpPlaybackData@@SAABUQMetaObject@@XZ @ 171 NONAME ; struct QMetaObject const & MpPlaybackData::getStaticMetaObject(void)
- ?composer@MpSongData@@QBE?AVQString@@XZ @ 172 NONAME ; class QString MpSongData::composer(void) const
- ?albumArt@MpPlaybackData@@QBEXAAVHbIcon@@@Z @ 173 NONAME ; void MpPlaybackData::albumArt(class HbIcon &) const
- ?commitPlaybackInfo@MpPlaybackData@@QAEXXZ @ 174 NONAME ; void MpPlaybackData::commitPlaybackInfo(void)
- ?removeRows@MpCollectionDataModel@@UAE_NHHABVQModelIndex@@@Z @ 175 NONAME ; bool MpCollectionDataModel::removeRows(int, int, class QModelIndex const &)
- ?albumSongId@MpMpxCollectionData@@QAEHH@Z @ 176 NONAME ; int MpMpxCollectionData::albumSongId(int)
- ?id@MpPlaybackData@@QAEHXZ @ 177 NONAME ; int MpPlaybackData::id(void)
- ?album@MpSongData@@QBE?AVQString@@XZ @ 178 NONAME ; class QString MpSongData::album(void) const
- ?albumArtBase64@MpSongData@@QBE?AVQString@@XZ @ 179 NONAME ; class QString MpSongData::albumArtBase64(void) const
- ?playbackInfoChanged@MpPlaybackData@@IAEXXZ @ 180 NONAME ; void MpPlaybackData::playbackInfoChanged(void)
- ?itemData@MpMpxCollectionData@@QBE?AVQString@@HW4DataType@1@@Z @ 181 NONAME ; class QString MpMpxCollectionData::itemData(int, enum MpMpxCollectionData::DataType) const
- ?link@MpSongData@@QBE?AVQString@@XZ @ 182 NONAME ; class QString MpSongData::link(void) const
- ?trUtf8@MpCollectionTBoneListDataModel@@SA?AVQString@@PBD0@Z @ 183 NONAME ; class QString MpCollectionTBoneListDataModel::trUtf8(char const *, char const *)
- ?updateSong@MpCollectionTBoneListDataModel@@QAEXXZ @ 184 NONAME ; void MpCollectionTBoneListDataModel::updateSong(void)
- ?setId@MpPlaybackData@@QAE_NH@Z @ 185 NONAME ; bool MpPlaybackData::setId(int)
- ?metaObject@MpCollectionDataModel@@UBEPBUQMetaObject@@XZ @ 186 NONAME ; struct QMetaObject const * MpCollectionDataModel::metaObject(void) const
- ?metaObject@MpSongData@@UBEPBUQMetaObject@@XZ @ 187 NONAME ; struct QMetaObject const * MpSongData::metaObject(void) const
+ ?setItemVisibility@MpCollectionDataModel@@QAEXABVQModelIndex@@_N@Z @ 116 NONAME ; void MpCollectionDataModel::setItemVisibility(class QModelIndex const &, bool)
+ ?getStaticMetaObject@MpSongData@@SAABUQMetaObject@@XZ @ 117 NONAME ; struct QMetaObject const & MpSongData::getStaticMetaObject(void)
+ ?songDetailInfoChanged@MpSongData@@IAEXXZ @ 118 NONAME ; void MpSongData::songDetailInfoChanged(void)
+ ?mimeTypes@MpCollectionDataModel@@UBE?AVQStringList@@XZ @ 119 NONAME ; class QStringList MpCollectionDataModel::mimeTypes(void) const
+ ?albumArt@MpSongData@@QBEXAAVHbIcon@@@Z @ 120 NONAME ; void MpSongData::albumArt(class HbIcon &) const
+ ?isDrmProtected@MpSongData@@QBE_NXZ @ 121 NONAME ; bool MpSongData::isDrmProtected(void) const
+ ?collectionTitle@MpMpxCollectionData@@QBE?AVQString@@XZ @ 122 NONAME ; class QString MpMpxCollectionData::collectionTitle(void) const
+ ?albumTrack@MpSongData@@QBE?AVQString@@XZ @ 123 NONAME ; class QString MpSongData::albumTrack(void) const
+ ?setArtist@MpSongData@@QAE_NABVQString@@@Z @ 124 NONAME ; bool MpSongData::setArtist(class QString const &)
+ ?tr@MpPlaybackData@@SA?AVQString@@PBD0@Z @ 125 NONAME ; class QString MpPlaybackData::tr(char const *, char const *)
+ ?setYear@MpSongData@@QAE_NH@Z @ 126 NONAME ; bool MpSongData::setYear(int)
+ ?qt_metacall@MpPlaybackData@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 127 NONAME ; int MpPlaybackData::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?albumSongData@MpMpxCollectionData@@QBE?AVQString@@HW4DataType@1@@Z @ 128 NONAME ; class QString MpMpxCollectionData::albumSongData(int, enum MpMpxCollectionData::DataType) const
+ ?playbackInfoChanged@MpSongData@@IAEXXZ @ 129 NONAME ; void MpSongData::playbackInfoChanged(void)
+ ?insertCachedItem@MpMpxCollectionData@@QAEXH@Z @ 130 NONAME ; void MpMpxCollectionData::insertCachedItem(int)
+ ?setComposer@MpSongData@@QAE_NABVQString@@@Z @ 131 NONAME ; bool MpSongData::setComposer(class QString const &)
+ ?setAlbumContent@MpMpxCollectionData@@QAEXABVCMPXMedia@@@Z @ 132 NONAME ; void MpMpxCollectionData::setAlbumContent(class CMPXMedia const &)
+ ??0MpMpxCollectionData@@QAE@PAVQObject@@@Z @ 133 NONAME ; MpMpxCollectionData::MpMpxCollectionData(class QObject *)
+ ?setArtist@MpPlaybackData@@QAE_NABVQString@@@Z @ 134 NONAME ; bool MpPlaybackData::setArtist(class QString const &)
+ ?trUtf8@MpSongData@@SA?AVQString@@PBD0@Z @ 135 NONAME ; class QString MpSongData::trUtf8(char const *, char const *)
+ ?albumId@MpPlaybackData@@QAEHXZ @ 136 NONAME ; int MpPlaybackData::albumId(void)
+ ??1MpMpxCollectionData@@UAE@XZ @ 137 NONAME ; MpMpxCollectionData::~MpMpxCollectionData(void)
+ ??0MpPlaybackData@@QAE@PAVQObject@@@Z @ 138 NONAME ; MpPlaybackData::MpPlaybackData(class QObject *)
+ ?trUtf8@MpCollectionDataModel@@SA?AVQString@@PBD0H@Z @ 139 NONAME ; class QString MpCollectionDataModel::trUtf8(char const *, char const *, int)
+ ?metaObject@MpMpxCollectionData@@UBEPBUQMetaObject@@XZ @ 140 NONAME ; struct QMetaObject const * MpMpxCollectionData::metaObject(void) const
+ ?qt_metacast@MpMpxCollectionData@@UAEPAXPBD@Z @ 141 NONAME ; void * MpMpxCollectionData::qt_metacast(char const *)
+ ?qt_metacast@MpPlaybackData@@UAEPAXPBD@Z @ 142 NONAME ; void * MpPlaybackData::qt_metacast(char const *)
+ ?size@MpSongData@@QBE?AVQString@@XZ @ 143 NONAME ; class QString MpSongData::size(void) const
+ ??_EMpSongData@@UAE@I@Z @ 144 NONAME ; MpSongData::~MpSongData(unsigned int)
+ ?containerId@MpMpxCollectionData@@QAEHXZ @ 145 NONAME ; int MpMpxCollectionData::containerId(void)
+ ?containerMedia@MpMpxCollectionData@@QAEABVCMPXMedia@@XZ @ 146 NONAME ; class CMPXMedia const & MpMpxCollectionData::containerMedia(void)
+ ?setDuration@MpSongData@@QAE_NH@Z @ 147 NONAME ; bool MpSongData::setDuration(int)
+ ??_EMpCollectionTBoneListDataModel@@UAE@I@Z @ 148 NONAME ; MpCollectionTBoneListDataModel::~MpCollectionTBoneListDataModel(unsigned int)
+ ??1MpCollectionDataModel@@UAE@XZ @ 149 NONAME ; MpCollectionDataModel::~MpCollectionDataModel(void)
+ ?setSize@MpSongData@@QAE_NH@Z @ 150 NONAME ; bool MpSongData::setSize(int)
+ ?thumbnailReady@MpSongData@@QAEXABVQPixmap@@PAXHH@Z @ 151 NONAME ; void MpSongData::thumbnailReady(class QPixmap const &, void *, int, int)
+ ?tr@MpCollectionDataModel@@SA?AVQString@@PBD0H@Z @ 152 NONAME ; class QString MpCollectionDataModel::tr(char const *, char const *, int)
+ ?reloadData@MpCollectionDataModel@@QAEXXZ @ 153 NONAME ; void MpCollectionDataModel::reloadData(void)
+ ?commitSongDetailInfo@MpSongData@@QAEXXZ @ 154 NONAME ; void MpSongData::commitSongDetailInfo(void)
+ ??1MpCollectionTBoneListDataModel@@UAE@XZ @ 155 NONAME ; MpCollectionTBoneListDataModel::~MpCollectionTBoneListDataModel(void)
+ ?qt_metacall@MpSongData@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 156 NONAME ; int MpSongData::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?reservedLength@MpSongData@@QBEHXZ @ 157 NONAME ; int MpSongData::reservedLength(void) const
+ ?collectionData@MpCollectionDataModel@@QAEPAVMpMpxCollectionData@@XZ @ 158 NONAME ; class MpMpxCollectionData * MpCollectionDataModel::collectionData(void)
+ ?trUtf8@MpMpxCollectionData@@SA?AVQString@@PBD0@Z @ 159 NONAME ; class QString MpMpxCollectionData::trUtf8(char const *, char const *)
+ ?setPosition@MpPlaybackData@@QAEXH@Z @ 160 NONAME ; void MpPlaybackData::setPosition(int)
+ ??1MpPlaybackData@@UAE@XZ @ 161 NONAME ; MpPlaybackData::~MpPlaybackData(void)
+ ?tr@MpSongData@@SA?AVQString@@PBD0@Z @ 162 NONAME ; class QString MpSongData::tr(char const *, char const *)
+ ?setPlaybackState@MpPlaybackData@@QAEXW4SimplifiedState@1@@Z @ 163 NONAME ; void MpPlaybackData::setPlaybackState(enum MpPlaybackData::SimplifiedState)
+ ?refreshAlbumSongs@MpMpxCollectionData@@IAEXXZ @ 164 NONAME ; void MpMpxCollectionData::refreshAlbumSongs(void)
+ ?trUtf8@MpPlaybackData@@SA?AVQString@@PBD0@Z @ 165 NONAME ; class QString MpPlaybackData::trUtf8(char const *, char const *)
+ ?albumDataChanged@MpCollectionTBoneListDataModel@@IAEXXZ @ 166 NONAME ; void MpCollectionTBoneListDataModel::albumDataChanged(void)
+ ?comment@MpSongData@@QBE?AVQString@@XZ @ 167 NONAME ; class QString MpSongData::comment(void) const
+ ?year@MpSongData@@QBE?AVQString@@XZ @ 168 NONAME ; class QString MpSongData::year(void) const
+ ?data@MpCollectionTBoneListDataModel@@UBE?AVQVariant@@ABVQModelIndex@@H@Z @ 169 NONAME ; class QVariant MpCollectionTBoneListDataModel::data(class QModelIndex const &, int) const
+ ?setAlbum@MpSongData@@QAE_NABVQString@@@Z @ 170 NONAME ; bool MpSongData::setAlbum(class QString const &)
+ ?albumSongIndex@MpMpxCollectionData@@QAEHH@Z @ 171 NONAME ; int MpMpxCollectionData::albumSongIndex(int)
+ ?getStaticMetaObject@MpPlaybackData@@SAABUQMetaObject@@XZ @ 172 NONAME ; struct QMetaObject const & MpPlaybackData::getStaticMetaObject(void)
+ ?composer@MpSongData@@QBE?AVQString@@XZ @ 173 NONAME ; class QString MpSongData::composer(void) const
+ ?albumArt@MpPlaybackData@@QBEXAAVHbIcon@@@Z @ 174 NONAME ; void MpPlaybackData::albumArt(class HbIcon &) const
+ ?commitPlaybackInfo@MpPlaybackData@@QAEXXZ @ 175 NONAME ; void MpPlaybackData::commitPlaybackInfo(void)
+ ?removeRows@MpCollectionDataModel@@UAE_NHHABVQModelIndex@@@Z @ 176 NONAME ; bool MpCollectionDataModel::removeRows(int, int, class QModelIndex const &)
+ ?albumSongId@MpMpxCollectionData@@QAEHH@Z @ 177 NONAME ; int MpMpxCollectionData::albumSongId(int)
+ ?id@MpPlaybackData@@QAEHXZ @ 178 NONAME ; int MpPlaybackData::id(void)
+ ?album@MpSongData@@QBE?AVQString@@XZ @ 179 NONAME ; class QString MpSongData::album(void) const
+ ?albumArtBase64@MpSongData@@QBE?AVQString@@XZ @ 180 NONAME ; class QString MpSongData::albumArtBase64(void) const
+ ?playbackInfoChanged@MpPlaybackData@@IAEXXZ @ 181 NONAME ; void MpPlaybackData::playbackInfoChanged(void)
+ ?itemData@MpMpxCollectionData@@QBE?AVQString@@HW4DataType@1@@Z @ 182 NONAME ; class QString MpMpxCollectionData::itemData(int, enum MpMpxCollectionData::DataType) const
+ ?link@MpSongData@@QBE?AVQString@@XZ @ 183 NONAME ; class QString MpSongData::link(void) const
+ ?trUtf8@MpCollectionTBoneListDataModel@@SA?AVQString@@PBD0@Z @ 184 NONAME ; class QString MpCollectionTBoneListDataModel::trUtf8(char const *, char const *)
+ ?updateSong@MpCollectionTBoneListDataModel@@QAEXXZ @ 185 NONAME ; void MpCollectionTBoneListDataModel::updateSong(void)
+ ?setId@MpPlaybackData@@QAE_NH@Z @ 186 NONAME ; bool MpPlaybackData::setId(int)
+ ?metaObject@MpCollectionDataModel@@UBEPBUQMetaObject@@XZ @ 187 NONAME ; struct QMetaObject const * MpCollectionDataModel::metaObject(void) const
+ ?metaObject@MpSongData@@UBEPBUQMetaObject@@XZ @ 188 NONAME ; struct QMetaObject const * MpSongData::metaObject(void) const
--- a/mpdata/eabi/mpdatau.def Fri Jun 11 13:36:36 2010 +0300
+++ b/mpdata/eabi/mpdatau.def Wed Jun 23 18:10:13 2010 +0300
@@ -106,83 +106,84 @@
_ZN21MpCollectionDataModel14collectionDataEv @ 105 NONAME
_ZN21MpCollectionDataModel14updateAlbumArtEi @ 106 NONAME
_ZN21MpCollectionDataModel16staticMetaObjectE @ 107 NONAME DATA 16
- _ZN21MpCollectionDataModel19getStaticMetaObjectEv @ 108 NONAME
- _ZN21MpCollectionDataModelC1EP19MpMpxCollectionDataP7QObject @ 109 NONAME
- _ZN21MpCollectionDataModelC2EP19MpMpxCollectionDataP7QObject @ 110 NONAME
- _ZN21MpCollectionDataModelD0Ev @ 111 NONAME
- _ZN21MpCollectionDataModelD1Ev @ 112 NONAME
- _ZN21MpCollectionDataModelD2Ev @ 113 NONAME
- _ZN30MpCollectionTBoneListDataModel10updateSongEv @ 114 NONAME
- _ZN30MpCollectionTBoneListDataModel11qt_metacallEN11QMetaObject4CallEiPPv @ 115 NONAME
- _ZN30MpCollectionTBoneListDataModel11qt_metacastEPKc @ 116 NONAME
- _ZN30MpCollectionTBoneListDataModel12refreshModelEv @ 117 NONAME
- _ZN30MpCollectionTBoneListDataModel16albumDataChangedEv @ 118 NONAME
- _ZN30MpCollectionTBoneListDataModel16staticMetaObjectE @ 119 NONAME DATA 16
- _ZN30MpCollectionTBoneListDataModel18albumDataAvailableEv @ 120 NONAME
- _ZN30MpCollectionTBoneListDataModel19getStaticMetaObjectEv @ 121 NONAME
- _ZN30MpCollectionTBoneListDataModel19updatePlaybackStateEv @ 122 NONAME
- _ZN30MpCollectionTBoneListDataModelC1EP19MpMpxCollectionDataP14MpPlaybackDataP7QObject @ 123 NONAME
- _ZN30MpCollectionTBoneListDataModelC2EP19MpMpxCollectionDataP14MpPlaybackDataP7QObject @ 124 NONAME
- _ZN30MpCollectionTBoneListDataModelD0Ev @ 125 NONAME
- _ZN30MpCollectionTBoneListDataModelD1Ev @ 126 NONAME
- _ZN30MpCollectionTBoneListDataModelD2Ev @ 127 NONAME
- _ZNK10MpSongData10albumTrackEv @ 128 NONAME
- _ZNK10MpSongData10metaObjectEv @ 129 NONAME
- _ZNK10MpSongData10sampleRateEv @ 130 NONAME
- _ZNK10MpSongData14albumArtBase64Ev @ 131 NONAME
- _ZNK10MpSongData14isDrmProtectedEv @ 132 NONAME
- _ZNK10MpSongData18removeAlbumArtFileEv @ 133 NONAME
- _ZNK10MpSongData4linkEv @ 134 NONAME
- _ZNK10MpSongData4sizeEv @ 135 NONAME
- _ZNK10MpSongData4yearEv @ 136 NONAME
- _ZNK10MpSongData5albumEv @ 137 NONAME
- _ZNK10MpSongData5genreEv @ 138 NONAME
- _ZNK10MpSongData5titleEv @ 139 NONAME
- _ZNK10MpSongData6artistEv @ 140 NONAME
- _ZNK10MpSongData7bitRateEv @ 141 NONAME
- _ZNK10MpSongData7commentEv @ 142 NONAME
- _ZNK10MpSongData8albumArtER6HbIcon @ 143 NONAME
- _ZNK10MpSongData8composerEv @ 144 NONAME
- _ZNK10MpSongData8durationEv @ 145 NONAME
- _ZNK10MpSongData8fileNameEv @ 146 NONAME
- _ZNK10MpSongData8mimeTypeEv @ 147 NONAME
- _ZNK10MpSongData8modifiedEv @ 148 NONAME
- _ZNK10MpSongData8musicURLEv @ 149 NONAME
- _ZNK10MpSongData9copyrightEv @ 150 NONAME
- _ZNK14MpPlaybackData10metaObjectEv @ 151 NONAME
- _ZNK14MpPlaybackData13playbackStateEv @ 152 NONAME
- _ZNK14MpPlaybackData3uriEv @ 153 NONAME
- _ZNK14MpPlaybackData5albumEv @ 154 NONAME
- _ZNK14MpPlaybackData5titleEv @ 155 NONAME
- _ZNK14MpPlaybackData6artistEv @ 156 NONAME
- _ZNK14MpPlaybackData8albumArtER6HbIcon @ 157 NONAME
- _ZNK14MpPlaybackData8durationEv @ 158 NONAME
- _ZNK14MpPlaybackData8positionEv @ 159 NONAME
- _ZNK19MpMpxCollectionData10metaObjectEv @ 160 NONAME
- _ZNK19MpMpxCollectionData13albumSongDataEiNS_8DataTypeE @ 161 NONAME
- _ZNK19MpMpxCollectionData15albumSongsCountEv @ 162 NONAME
- _ZNK19MpMpxCollectionData15collectionTitleEv @ 163 NONAME
- _ZNK19MpMpxCollectionData17currentAlbumIndexEv @ 164 NONAME
- _ZNK19MpMpxCollectionData5countEv @ 165 NONAME
- _ZNK19MpMpxCollectionData7contextEv @ 166 NONAME
- _ZNK19MpMpxCollectionData8itemDataEiNS_8DataTypeE @ 167 NONAME
- _ZNK21MpCollectionDataModel10metaObjectEv @ 168 NONAME
- _ZNK21MpCollectionDataModel20supportedDropActionsEv @ 169 NONAME
- _ZNK21MpCollectionDataModel4dataERK11QModelIndexi @ 170 NONAME
- _ZNK21MpCollectionDataModel8mimeDataERK5QListI11QModelIndexE @ 171 NONAME
- _ZNK21MpCollectionDataModel8rowCountERK11QModelIndex @ 172 NONAME
- _ZNK21MpCollectionDataModel9mimeTypesEv @ 173 NONAME
- _ZNK30MpCollectionTBoneListDataModel10metaObjectEv @ 174 NONAME
- _ZNK30MpCollectionTBoneListDataModel4dataERK11QModelIndexi @ 175 NONAME
- _ZNK30MpCollectionTBoneListDataModel8rowCountERK11QModelIndex @ 176 NONAME
- _ZTI10MpSongData @ 177 NONAME
- _ZTI14MpPlaybackData @ 178 NONAME
- _ZTI19MpMpxCollectionData @ 179 NONAME
- _ZTI21MpCollectionDataModel @ 180 NONAME
- _ZTI30MpCollectionTBoneListDataModel @ 181 NONAME
- _ZTV10MpSongData @ 182 NONAME
- _ZTV14MpPlaybackData @ 183 NONAME
- _ZTV19MpMpxCollectionData @ 184 NONAME
- _ZTV21MpCollectionDataModel @ 185 NONAME
- _ZTV30MpCollectionTBoneListDataModel @ 186 NONAME
+ _ZN21MpCollectionDataModel17setItemVisibilityERK11QModelIndexb @ 108 NONAME
+ _ZN21MpCollectionDataModel19getStaticMetaObjectEv @ 109 NONAME
+ _ZN21MpCollectionDataModelC1EP19MpMpxCollectionDataP7QObject @ 110 NONAME
+ _ZN21MpCollectionDataModelC2EP19MpMpxCollectionDataP7QObject @ 111 NONAME
+ _ZN21MpCollectionDataModelD0Ev @ 112 NONAME
+ _ZN21MpCollectionDataModelD1Ev @ 113 NONAME
+ _ZN21MpCollectionDataModelD2Ev @ 114 NONAME
+ _ZN30MpCollectionTBoneListDataModel10updateSongEv @ 115 NONAME
+ _ZN30MpCollectionTBoneListDataModel11qt_metacallEN11QMetaObject4CallEiPPv @ 116 NONAME
+ _ZN30MpCollectionTBoneListDataModel11qt_metacastEPKc @ 117 NONAME
+ _ZN30MpCollectionTBoneListDataModel12refreshModelEv @ 118 NONAME
+ _ZN30MpCollectionTBoneListDataModel16albumDataChangedEv @ 119 NONAME
+ _ZN30MpCollectionTBoneListDataModel16staticMetaObjectE @ 120 NONAME DATA 16
+ _ZN30MpCollectionTBoneListDataModel18albumDataAvailableEv @ 121 NONAME
+ _ZN30MpCollectionTBoneListDataModel19getStaticMetaObjectEv @ 122 NONAME
+ _ZN30MpCollectionTBoneListDataModel19updatePlaybackStateEv @ 123 NONAME
+ _ZN30MpCollectionTBoneListDataModelC1EP19MpMpxCollectionDataP14MpPlaybackDataP7QObject @ 124 NONAME
+ _ZN30MpCollectionTBoneListDataModelC2EP19MpMpxCollectionDataP14MpPlaybackDataP7QObject @ 125 NONAME
+ _ZN30MpCollectionTBoneListDataModelD0Ev @ 126 NONAME
+ _ZN30MpCollectionTBoneListDataModelD1Ev @ 127 NONAME
+ _ZN30MpCollectionTBoneListDataModelD2Ev @ 128 NONAME
+ _ZNK10MpSongData10albumTrackEv @ 129 NONAME
+ _ZNK10MpSongData10metaObjectEv @ 130 NONAME
+ _ZNK10MpSongData10sampleRateEv @ 131 NONAME
+ _ZNK10MpSongData14albumArtBase64Ev @ 132 NONAME
+ _ZNK10MpSongData14isDrmProtectedEv @ 133 NONAME
+ _ZNK10MpSongData18removeAlbumArtFileEv @ 134 NONAME
+ _ZNK10MpSongData4linkEv @ 135 NONAME
+ _ZNK10MpSongData4sizeEv @ 136 NONAME
+ _ZNK10MpSongData4yearEv @ 137 NONAME
+ _ZNK10MpSongData5albumEv @ 138 NONAME
+ _ZNK10MpSongData5genreEv @ 139 NONAME
+ _ZNK10MpSongData5titleEv @ 140 NONAME
+ _ZNK10MpSongData6artistEv @ 141 NONAME
+ _ZNK10MpSongData7bitRateEv @ 142 NONAME
+ _ZNK10MpSongData7commentEv @ 143 NONAME
+ _ZNK10MpSongData8albumArtER6HbIcon @ 144 NONAME
+ _ZNK10MpSongData8composerEv @ 145 NONAME
+ _ZNK10MpSongData8durationEv @ 146 NONAME
+ _ZNK10MpSongData8fileNameEv @ 147 NONAME
+ _ZNK10MpSongData8mimeTypeEv @ 148 NONAME
+ _ZNK10MpSongData8modifiedEv @ 149 NONAME
+ _ZNK10MpSongData8musicURLEv @ 150 NONAME
+ _ZNK10MpSongData9copyrightEv @ 151 NONAME
+ _ZNK14MpPlaybackData10metaObjectEv @ 152 NONAME
+ _ZNK14MpPlaybackData13playbackStateEv @ 153 NONAME
+ _ZNK14MpPlaybackData3uriEv @ 154 NONAME
+ _ZNK14MpPlaybackData5albumEv @ 155 NONAME
+ _ZNK14MpPlaybackData5titleEv @ 156 NONAME
+ _ZNK14MpPlaybackData6artistEv @ 157 NONAME
+ _ZNK14MpPlaybackData8albumArtER6HbIcon @ 158 NONAME
+ _ZNK14MpPlaybackData8durationEv @ 159 NONAME
+ _ZNK14MpPlaybackData8positionEv @ 160 NONAME
+ _ZNK19MpMpxCollectionData10metaObjectEv @ 161 NONAME
+ _ZNK19MpMpxCollectionData13albumSongDataEiNS_8DataTypeE @ 162 NONAME
+ _ZNK19MpMpxCollectionData15albumSongsCountEv @ 163 NONAME
+ _ZNK19MpMpxCollectionData15collectionTitleEv @ 164 NONAME
+ _ZNK19MpMpxCollectionData17currentAlbumIndexEv @ 165 NONAME
+ _ZNK19MpMpxCollectionData5countEv @ 166 NONAME
+ _ZNK19MpMpxCollectionData7contextEv @ 167 NONAME
+ _ZNK19MpMpxCollectionData8itemDataEiNS_8DataTypeE @ 168 NONAME
+ _ZNK21MpCollectionDataModel10metaObjectEv @ 169 NONAME
+ _ZNK21MpCollectionDataModel20supportedDropActionsEv @ 170 NONAME
+ _ZNK21MpCollectionDataModel4dataERK11QModelIndexi @ 171 NONAME
+ _ZNK21MpCollectionDataModel8mimeDataERK5QListI11QModelIndexE @ 172 NONAME
+ _ZNK21MpCollectionDataModel8rowCountERK11QModelIndex @ 173 NONAME
+ _ZNK21MpCollectionDataModel9mimeTypesEv @ 174 NONAME
+ _ZNK30MpCollectionTBoneListDataModel10metaObjectEv @ 175 NONAME
+ _ZNK30MpCollectionTBoneListDataModel4dataERK11QModelIndexi @ 176 NONAME
+ _ZNK30MpCollectionTBoneListDataModel8rowCountERK11QModelIndex @ 177 NONAME
+ _ZTI10MpSongData @ 178 NONAME
+ _ZTI14MpPlaybackData @ 179 NONAME
+ _ZTI19MpMpxCollectionData @ 180 NONAME
+ _ZTI21MpCollectionDataModel @ 181 NONAME
+ _ZTI30MpCollectionTBoneListDataModel @ 182 NONAME
+ _ZTV10MpSongData @ 183 NONAME
+ _ZTV14MpPlaybackData @ 184 NONAME
+ _ZTV19MpMpxCollectionData @ 185 NONAME
+ _ZTV21MpCollectionDataModel @ 186 NONAME
+ _ZTV30MpCollectionTBoneListDataModel @ 187 NONAME
--- a/mpdata/mpdata.pro Fri Jun 11 13:36:36 2010 +0300
+++ b/mpdata/mpdata.pro Wed Jun 23 18:10:13 2010 +0300
@@ -14,25 +14,29 @@
# Description: Project file for Music Player Data.
#
-symbian:TARGET.UID3 = 0x10207C95
-
TEMPLATE = lib
CONFIG += hb
TARGET = mpdata
-
-TARGET.CAPABILITY = CAP_GENERAL_DLL
+symbian: {
+ TARGET.UID3 = 0x10207C95
+ MMP_RULES += "DEFFILE mpdata.def"
+ defFilePath = .
+ TARGET.CAPABILITY = CAP_GENERAL_DLL
+ TARGET.EPOCALLOWDLLDATA = 1
+}
+DEFINES += BUILD_MPDATA_LIB
INCLUDEPATH += . \
- inc \
- ../inc
-INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
+ inc \
+ ../inc
+INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
+INCLUDEPATH += $$MW_LAYER_PUBLIC_EXPORT_PATH(hgwidgets)
-LIBS += -lestor.dll \
- -lmpxcommon.dll \
- -lthumbnailmanagerqt.dll
-
-symbian:TARGET.EPOCALLOWDLLDATA = 1
+LIBS += -lestor \
+ -lmpxcommon \
+ -lthumbnailmanagerqt
+# Input
HEADERS += ../inc/mpmpxcollectiondata.h \
inc/mpmpxcollectiondata_p.h \
../inc/mpcollectiondatamodel.h \
@@ -48,13 +52,4 @@
src/mpcollectionalbumartmanager.cpp \
src/mpplaybackdata.cpp \
src/mpsongdata.cpp
-
-DEFINES += BUILD_MPDATA_LIB
-myDefInclude = "NOSTRICTDEF" \
-"$${LITERAL_HASH}if defined(WINS)"\
-"DEFFILE bwins/mpdatau.def "\
-"$${LITERAL_HASH}else "\
-"DEFFILE eabi/mpdatau.def "\
-"$${LITERAL_HASH}endif"
-MMP_RULES += myDefInclude
--- a/mpdata/src/mpcollectiondatamodel.cpp Fri Jun 11 13:36:36 2010 +0300
+++ b/mpdata/src/mpcollectiondatamodel.cpp Wed Jun 23 18:10:13 2010 +0300
@@ -21,6 +21,9 @@
#include <hbicon.h>
#include <hbnamespace.h>
+#include <hgwidgets.h>
+
+
#include "mpcollectiondatamodel.h"
#include "mpcollectionalbumartmanager.h"
#include "mpmpxcollectiondata.h"
@@ -65,10 +68,11 @@
Constructs the collection data model.
*/
MpCollectionDataModel::MpCollectionDataModel( MpMpxCollectionData *data, QObject *parent )
- : QAbstractListModel(parent),
- mCollectionData(data),
- mRowCount(0),
- mAlbumIndexOffset(0)
+ : QAbstractListModel( parent ),
+ mCollectionData( data ),
+ mRowCount( 0 ),
+ mAlbumIndexOffset( 0 ),
+ mHiddenItemIndex( -1 )
{
TX_ENTRY
connect( mCollectionData, SIGNAL(contextChanged(TCollectionContext)), this, SLOT(setContext(TCollectionContext)) );
@@ -242,6 +246,10 @@
}
returnValue = feedbackIndex;
}
+ else if ( role == HgWidget::HgVisibilityRole
+ && context == ECollectionContextAlbumsMediaWall) {
+ returnValue = !( row == mHiddenItemIndex );
+ }
TX_EXIT
return returnValue;
}
@@ -346,6 +354,18 @@
return true;
}
+/*!
+ Sets the item visibility, model will report \a visible value as
+ HgWidget::HgVisibilityRole for the item at \a index.
+ datachanged() signal is emited when calling this function.
+ Currently this is only used by Media Wall View.
+*/
+void MpCollectionDataModel::setItemVisibility(const QModelIndex &index, bool visible)
+{
+ mHiddenItemIndex = visible ? -1 : index.row();
+ emit dataChanged(index, index);
+}
+
/*!
Returns pointer to MpMpxCollectionData, which is the collection data.
*/
--- a/mpdata/src/mpcollectiontbonelistdatamodel.cpp Fri Jun 11 13:36:36 2010 +0300
+++ b/mpdata/src/mpcollectiontbonelistdatamodel.cpp Wed Jun 23 18:10:13 2010 +0300
@@ -73,8 +73,9 @@
: QAbstractListModel( parent ),
mCollectionData( collectionData ),
mPlaybackData( playbackData ),
- mRowCount(0),
- mCurrentSongId(0)
+ mRowCount( 0 ),
+ mCurrentSongId( 0 ),
+ mPlaybackActive( false )
{
TX_ENTRY
connect( mCollectionData, SIGNAL(refreshAlbumSongs()),
@@ -140,13 +141,12 @@
}
}
else if ( role == Qt::DecorationRole ) {
- if ( mPlaybackData
- && mPlaybackActive
- && mPlaybackData->id() == mCollectionData->albumSongId( index.row() ) ) {
+ if ( mPlaybackActive
+ && mPlaybackData->id() == mCollectionData->albumSongId( row ) ) {
QList<QVariant> iconList;
iconList << QVariant(); //primary icon is not used.
- //TODO: Replace for qtg_small_speaker when available.
- iconList << HbIcon("qtg_graf_hspage_highlight");
+
+ iconList << HbIcon("qtg_small_speaker");
returnValue = iconList;
}
}
@@ -177,10 +177,10 @@
if ( mCurrentSongId && newSongId != mCurrentSongId) {
//Attempt to remove old song icon.
- QModelIndex OldSongIndex;
- OldSongIndex = index( mCollectionData->albumSongIndex( mCurrentSongId ) );
- if ( OldSongIndex.isValid() ) {
- emit dataChanged( OldSongIndex, OldSongIndex );
+ QModelIndex oldSongIndex;
+ oldSongIndex = index( mCollectionData->albumSongIndex( mCurrentSongId ) );
+ if ( oldSongIndex.isValid() ) {
+ emit dataChanged( oldSongIndex, oldSongIndex );
}
}
--- a/mpdata/tsrc/unittest_mpcollectiondatamodel/unittest_mpcollectiondatamodel.pro Fri Jun 11 13:36:36 2010 +0300
+++ b/mpdata/tsrc/unittest_mpcollectiondatamodel/unittest_mpcollectiondatamodel.pro Wed Jun 23 18:10:13 2010 +0300
@@ -25,6 +25,7 @@
../../inc \
../../../inc
INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
+INCLUDEPATH += $$MW_LAYER_PUBLIC_EXPORT_PATH(hgwidgets)
LIBS += -lestor.dll \
-lfbscli.dll
--- a/mpengine/bwins/mpengineu.def Fri Jun 11 13:36:36 2010 +0300
+++ b/mpengine/bwins/mpengineu.def Wed Jun 23 18:10:13 2010 +0300
@@ -1,103 +1,128 @@
EXPORTS
?metaObject@MpEngine@@UBEPBUQMetaObject@@XZ @ 1 NONAME ; struct QMetaObject const * MpEngine::metaObject(void) const
- ?refreshLibrary@MpEngine@@QAEXXZ @ 2 NONAME ; void MpEngine::refreshLibrary(void)
- ?instance@MpEngineFactory@@SAPAV1@XZ @ 3 NONAME ; class MpEngineFactory * MpEngineFactory::instance(void)
- ?createIsolatedEngine@MpEngineFactory@@SAPAVMpEngine@@W4EngineMode@2@@Z @ 4 NONAME ; class MpEngine * MpEngineFactory::createIsolatedEngine(enum MpEngine::EngineMode)
+ ?instance@MpEngineFactory@@SAPAV1@XZ @ 2 NONAME ; class MpEngineFactory * MpEngineFactory::instance(void)
+ ?createIsolatedEngine@MpEngineFactory@@SAPAVMpEngine@@W4EngineMode@2@@Z @ 3 NONAME ; class MpEngine * MpEngineFactory::createIsolatedEngine(enum MpEngine::EngineMode)
+ ??_EMpSongScanner@@UAE@I@Z @ 4 NONAME ; MpSongScanner::~MpSongScanner(unsigned int)
?findAlbumSongs@MpEngine@@QAEXH@Z @ 5 NONAME ; void MpEngine::findAlbumSongs(int)
?equalizerReady@MpEngine@@IAEXXZ @ 6 NONAME ; void MpEngine::equalizerReady(void)
?setPosition@MpEngine@@QAEXH@Z @ 7 NONAME ; void MpEngine::setPosition(int)
?saveToCurrentPlaylist@MpEngine@@QAEXAAV?$QList@H@@PAVMpMpxCollectionData@@@Z @ 8 NONAME ; void MpEngine::saveToCurrentPlaylist(class QList<int> &, class MpMpxCollectionData *)
?metaObject@MpEngineFactory@@UBEPBUQMetaObject@@XZ @ 9 NONAME ; struct QMetaObject const * MpEngineFactory::metaObject(void) const
- ?handleEqualizerReady@MpEngine@@QAEXXZ @ 10 NONAME ; void MpEngine::handleEqualizerReady(void)
- ?collectionData@MpEngine@@QAEPAVMpMpxCollectionData@@XZ @ 11 NONAME ; class MpMpxCollectionData * MpEngine::collectionData(void)
- ?createPlaylist@MpEngine@@QAEXAAVQString@@AAV?$QList@H@@PAVMpMpxCollectionData@@@Z @ 12 NONAME ; void MpEngine::createPlaylist(class QString &, class QList<int> &, class MpMpxCollectionData *)
- ?collectionPlaylistOpened@MpEngine@@IAEXXZ @ 13 NONAME ; void MpEngine::collectionPlaylistOpened(void)
- ?renamePlaylist@MpEngine@@QAEXAAVQString@@H@Z @ 14 NONAME ; void MpEngine::renamePlaylist(class QString &, int)
- ?handleUsbMtpEndEvent@MpEngine@@AAEXXZ @ 15 NONAME ; void MpEngine::handleUsbMtpEndEvent(void)
- ?setBalance@MpEngine@@QAEXH@Z @ 16 NONAME ; void MpEngine::setBalance(int)
- ?songData@MpEngine@@QAEPAVMpSongData@@XZ @ 17 NONAME ; class MpSongData * MpEngine::songData(void)
- ?skipForward@MpEngine@@QAEXXZ @ 18 NONAME ; void MpEngine::skipForward(void)
- ??_EMpEngineFactory@@UAE@I@Z @ 19 NONAME ; MpEngineFactory::~MpEngineFactory(unsigned int)
- ?playAlbumSongs@MpEngine@@QAEXHHPAVMpMpxCollectionData@@@Z @ 20 NONAME ; void MpEngine::playAlbumSongs(int, int, class MpMpxCollectionData *)
- ?setShuffle@MpEngine@@QAEX_N@Z @ 21 NONAME ; void MpEngine::setShuffle(bool)
- ?openIsolatedCollection@MpEngine@@QAEXW4TCollectionContext@@@Z @ 22 NONAME ; void MpEngine::openIsolatedCollection(enum TCollectionContext)
- ?close@MpEngineFactory@@SAXXZ @ 23 NONAME ; void MpEngineFactory::close(void)
- ?qt_metacall@MpEngine@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 24 NONAME ; int MpEngine::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?playlistSaved@MpEngine@@IAEX_N@Z @ 25 NONAME ; void MpEngine::playlistSaved(bool)
- ?playbackData@MpEngine@@QAEPAVMpPlaybackData@@XZ @ 26 NONAME ; class MpPlaybackData * MpEngine::playbackData(void)
- ?stop@MpEngine@@QAEXXZ @ 27 NONAME ; void MpEngine::stop(void)
- ?setOutstandingPopup@MpEngine@@AAEXPAVHbPopup@@@Z @ 28 NONAME ; void MpEngine::setOutstandingPopup(class HbPopup *)
- ?retrieveSong@MpEngine@@QAEXXZ @ 29 NONAME ; void MpEngine::retrieveSong(void)
- ?libraryAboutToUpdate@MpEngine@@IAEXXZ @ 30 NONAME ; void MpEngine::libraryAboutToUpdate(void)
- ?openCollection@MpEngine@@QAEXW4TCollectionContext@@@Z @ 31 NONAME ; void MpEngine::openCollection(enum TCollectionContext)
- ?trUtf8@MpEngine@@SA?AVQString@@PBD0H@Z @ 32 NONAME ; class QString MpEngine::trUtf8(char const *, char const *, int)
- ?reopenCollection@MpEngine@@QAEXXZ @ 33 NONAME ; void MpEngine::reopenCollection(void)
- ?songsDeleted@MpEngine@@IAEX_N@Z @ 34 NONAME ; void MpEngine::songsDeleted(bool)
- ??0MpEngineFactory@@AAE@XZ @ 35 NONAME ; MpEngineFactory::MpEngineFactory(void)
- ?qt_metacast@MpEngine@@UAEPAXPBD@Z @ 36 NONAME ; void * MpEngine::qt_metacast(char const *)
- ?startSeekForward@MpEngine@@QAEXXZ @ 37 NONAME ; void MpEngine::startSeekForward(void)
- ?saveToPlaylist@MpEngine@@QAEXHAAV?$QList@H@@@Z @ 38 NONAME ; void MpEngine::saveToPlaylist(int, class QList<int> &)
- ?qt_metacall@MpEngineFactory@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 39 NONAME ; int MpEngineFactory::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?tr@MpEngineFactory@@SA?AVQString@@PBD0H@Z @ 40 NONAME ; class QString MpEngineFactory::tr(char const *, char const *, int)
- ?tr@MpEngine@@SA?AVQString@@PBD0H@Z @ 41 NONAME ; class QString MpEngine::tr(char const *, char const *, int)
- ?trUtf8@MpEngine@@SA?AVQString@@PBD0@Z @ 42 NONAME ; class QString MpEngine::trUtf8(char const *, char const *)
- ?findPlaylists@MpEngine@@QAEXAAVQStringList@@@Z @ 43 NONAME ; void MpEngine::findPlaylists(class QStringList &)
- ?presetNames@MpEngine@@QAE?AVQStringList@@XZ @ 44 NONAME ; class QStringList MpEngine::presetNames(void)
- ??1MpEngineFactory@@UAE@XZ @ 45 NONAME ; MpEngineFactory::~MpEngineFactory(void)
- ?previewItem@MpEngine@@QAEXH@Z @ 46 NONAME ; void MpEngine::previewItem(int)
- ?loudness@MpEngine@@QAE_NXZ @ 47 NONAME ; bool MpEngine::loudness(void)
- ?staticMetaObject@MpEngineFactory@@2UQMetaObject@@B @ 48 NONAME ; struct QMetaObject const MpEngineFactory::staticMetaObject
- ?deleteSongs@MpEngine@@QAEXAAV?$QList@H@@@Z @ 49 NONAME ; void MpEngine::deleteSongs(class QList<int> &)
- ?releaseIsolatedCollection@MpEngine@@QAEXXZ @ 50 NONAME ; void MpEngine::releaseIsolatedCollection(void)
- ?stopSeeking@MpEngine@@QAEXXZ @ 51 NONAME ; void MpEngine::stopSeeking(void)
- ?launchBlockingNote@MpEngine@@AAEXXZ @ 52 NONAME ; void MpEngine::launchBlockingNote(void)
- ?initialize@MpEngine@@AAEXVTUid@@W4EngineMode@1@@Z @ 53 NONAME ; void MpEngine::initialize(class TUid, enum MpEngine::EngineMode)
- ?playEmbedded@MpEngine@@QAEXVQString@@@Z @ 54 NONAME ; void MpEngine::playEmbedded(class QString)
- ?tr@MpEngine@@SA?AVQString@@PBD0@Z @ 55 NONAME ; class QString MpEngine::tr(char const *, char const *)
- ?disableEqualizer@MpEngine@@QAEXXZ @ 56 NONAME ; void MpEngine::disableEqualizer(void)
- ?getStaticMetaObject@MpEngine@@SAABUQMetaObject@@XZ @ 57 NONAME ; struct QMetaObject const & MpEngine::getStaticMetaObject(void)
- ?shuffleAll@MpEngine@@QAEXXZ @ 58 NONAME ; void MpEngine::shuffleAll(void)
- ?qt_metacast@MpEngineFactory@@UAEPAXPBD@Z @ 59 NONAME ; void * MpEngineFactory::qt_metacast(char const *)
- ?renamePlaylist@MpEngine@@QAEXAAVQString@@@Z @ 60 NONAME ; void MpEngine::renamePlaylist(class QString &)
- ?libraryUpdated@MpEngine@@IAEXXZ @ 61 NONAME ; void MpEngine::libraryUpdated(void)
- ?setRepeat@MpEngine@@QAEX_N@Z @ 62 NONAME ; void MpEngine::setRepeat(bool)
- ?trUtf8@MpEngineFactory@@SA?AVQString@@PBD0@Z @ 63 NONAME ; class QString MpEngineFactory::trUtf8(char const *, char const *)
- ?containerContentsChanged@MpEngine@@IAEXXZ @ 64 NONAME ; void MpEngine::containerContentsChanged(void)
- ?startSeekBackward@MpEngine@@QAEXXZ @ 65 NONAME ; void MpEngine::startSeekBackward(void)
- ?checkForSystemEvents@MpEngine@@QAEXXZ @ 66 NONAME ; void MpEngine::checkForSystemEvents(void)
- ?playPause@MpEngine@@QAEXXZ @ 67 NONAME ; void MpEngine::playPause(void)
- ?playlistsRenamed@MpEngine@@IAEX_N@Z @ 68 NONAME ; void MpEngine::playlistsRenamed(bool)
- ?tr@MpEngineFactory@@SA?AVQString@@PBD0@Z @ 69 NONAME ; class QString MpEngineFactory::tr(char const *, char const *)
- ?applyPreset@MpEngine@@QAEXH@Z @ 70 NONAME ; void MpEngine::applyPreset(int)
- ?playEmbedded@MpEngine@@QAEXABVXQSharableFile@@@Z @ 71 NONAME ; void MpEngine::playEmbedded(class XQSharableFile const &)
- ?trUtf8@MpEngineFactory@@SA?AVQString@@PBD0H@Z @ 72 NONAME ; class QString MpEngineFactory::trUtf8(char const *, char const *, int)
- ?staticMetaObject@MpEngine@@2UQMetaObject@@B @ 73 NONAME ; struct QMetaObject const MpEngine::staticMetaObject
- ?handleUsbMtpStartEvent@MpEngine@@AAEXXZ @ 74 NONAME ; void MpEngine::handleUsbMtpStartEvent(void)
- ?openCollectionItem@MpEngine@@QAEXH@Z @ 75 NONAME ; void MpEngine::openCollectionItem(int)
- ?handleScanStarted@MpEngine@@QAEXXZ @ 76 NONAME ; void MpEngine::handleScanStarted(void)
- ?handleOutstandingNoteClosing@MpEngine@@QAEXXZ @ 77 NONAME ; void MpEngine::handleOutstandingNoteClosing(void)
- ?back@MpEngine@@QAEXXZ @ 78 NONAME ; void MpEngine::back(void)
- ?handleDeleteStarted@MpEngine@@QAEXXZ @ 79 NONAME ; void MpEngine::handleDeleteStarted(void)
- ?activePreset@MpEngine@@QAEHXZ @ 80 NONAME ; int MpEngine::activePreset(void)
- ?handleUsbEvent@MpEngine@@QAEXW4MpxUsbEvents@@@Z @ 81 NONAME ; void MpEngine::handleUsbEvent(enum MpxUsbEvents)
- ?sharedEngine@MpEngineFactory@@SAPAVMpEngine@@XZ @ 82 NONAME ; class MpEngine * MpEngineFactory::sharedEngine(void)
- ?handleUsbMassStorageStartEvent@MpEngine@@AAEXXZ @ 83 NONAME ; void MpEngine::handleUsbMassStorageStartEvent(void)
- ?balance@MpEngine@@QAEHXZ @ 84 NONAME ; int MpEngine::balance(void)
- ?handleDiskEvent@MpEngine@@QAEXW4MpxDiskEvents@@@Z @ 85 NONAME ; void MpEngine::handleDiskEvent(enum MpxDiskEvents)
- ?verifyUsbBlocking@MpEngine@@QAE_N_N@Z @ 86 NONAME ; bool MpEngine::verifyUsbBlocking(bool)
- ?handleUsbMassStorageEndEvent@MpEngine@@AAEXXZ @ 87 NONAME ; void MpEngine::handleUsbMassStorageEndEvent(void)
- ?handleDeleteEnded@MpEngine@@QAEXXZ @ 88 NONAME ; void MpEngine::handleDeleteEnded(void)
- ?createSharedEngine@MpEngineFactory@@SAPAVMpEngine@@VTUid@@W4EngineMode@2@@Z @ 89 NONAME ; class MpEngine * MpEngineFactory::createSharedEngine(class TUid, enum MpEngine::EngineMode)
- ?usbBlocked@MpEngine@@IAEX_N@Z @ 90 NONAME ; void MpEngine::usbBlocked(bool)
- ?getStaticMetaObject@MpEngineFactory@@SAABUQMetaObject@@XZ @ 91 NONAME ; struct QMetaObject const & MpEngineFactory::getStaticMetaObject(void)
- ??0MpEngine@@AAE@XZ @ 92 NONAME ; MpEngine::MpEngine(void)
- ?handleUsbMtpNotActive@MpEngine@@AAEXXZ @ 93 NONAME ; void MpEngine::handleUsbMtpNotActive(void)
- ?isolatedCollectionOpened@MpEngine@@IAEXPAVMpMpxCollectionData@@@Z @ 94 NONAME ; void MpEngine::isolatedCollectionOpened(class MpMpxCollectionData *)
- ?handleScanEnded@MpEngine@@QAEXHH@Z @ 95 NONAME ; void MpEngine::handleScanEnded(int, int)
- ?skipBackward@MpEngine@@QAEXXZ @ 96 NONAME ; void MpEngine::skipBackward(void)
- ??_EMpEngine@@UAE@I@Z @ 97 NONAME ; MpEngine::~MpEngine(unsigned int)
- ??1MpEngine@@UAE@XZ @ 98 NONAME ; MpEngine::~MpEngine(void)
- ?changeUsbBlockingState@MpEngine@@AAEXW4UsbBlockingState@1@@Z @ 99 NONAME ; void MpEngine::changeUsbBlockingState(enum MpEngine::UsbBlockingState)
- ?setLoudness@MpEngine@@QAEX_N@Z @ 100 NONAME ; void MpEngine::setLoudness(bool)
- ?reorderPlaylist@MpEngine@@QAEXHHHH@Z @ 101 NONAME ; void MpEngine::reorderPlaylist(int, int, int, int)
+ ?handleDeleteStarted@MpEngine@@QAEXW4TCollectionContext@@H@Z @ 10 NONAME ; void MpEngine::handleDeleteStarted(enum TCollectionContext, int)
+ ?handleEqualizerReady@MpEngine@@QAEXXZ @ 11 NONAME ; void MpEngine::handleEqualizerReady(void)
+ ?collectionData@MpEngine@@QAEPAVMpMpxCollectionData@@XZ @ 12 NONAME ; class MpMpxCollectionData * MpEngine::collectionData(void)
+ ?createPlaylist@MpEngine@@QAEXAAVQString@@AAV?$QList@H@@PAVMpMpxCollectionData@@@Z @ 13 NONAME ; void MpEngine::createPlaylist(class QString &, class QList<int> &, class MpMpxCollectionData *)
+ ?collectionPlaylistOpened@MpEngine@@IAEXXZ @ 14 NONAME ; void MpEngine::collectionPlaylistOpened(void)
+ ?tr@MpSongScanner@@SA?AVQString@@PBD0@Z @ 15 NONAME ; class QString MpSongScanner::tr(char const *, char const *)
+ ?renamePlaylist@MpEngine@@QAEXAAVQString@@H@Z @ 16 NONAME ; void MpEngine::renamePlaylist(class QString &, int)
+ ?scanCountChanged@MpSongScanner@@IAEXH@Z @ 17 NONAME ; void MpSongScanner::scanCountChanged(int)
+ ?handleUsbMtpEndEvent@MpEngine@@AAEXXZ @ 18 NONAME ; void MpEngine::handleUsbMtpEndEvent(void)
+ ?setBalance@MpEngine@@QAEXH@Z @ 19 NONAME ; void MpEngine::setBalance(int)
+ ?songData@MpEngine@@QAEPAVMpSongData@@XZ @ 20 NONAME ; class MpSongData * MpEngine::songData(void)
+ ?skipForward@MpEngine@@QAEXXZ @ 21 NONAME ; void MpEngine::skipForward(void)
+ ??_EMpEngineFactory@@UAE@I@Z @ 22 NONAME ; MpEngineFactory::~MpEngineFactory(unsigned int)
+ ?playAlbumSongs@MpEngine@@QAEXHHPAVMpMpxCollectionData@@@Z @ 23 NONAME ; void MpEngine::playAlbumSongs(int, int, class MpMpxCollectionData *)
+ ?setShuffle@MpEngine@@QAEX_N@Z @ 24 NONAME ; void MpEngine::setShuffle(bool)
+ ?openIsolatedCollection@MpEngine@@QAEXW4TCollectionContext@@@Z @ 25 NONAME ; void MpEngine::openIsolatedCollection(enum TCollectionContext)
+ ?usbSynchronizationFinished@MpEngine@@IAEXXZ @ 26 NONAME ; void MpEngine::usbSynchronizationFinished(void)
+ ?trUtf8@MpSongScanner@@SA?AVQString@@PBD0H@Z @ 27 NONAME ; class QString MpSongScanner::trUtf8(char const *, char const *, int)
+ ?close@MpEngineFactory@@SAXXZ @ 28 NONAME ; void MpEngineFactory::close(void)
+ ?qt_metacall@MpEngine@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 29 NONAME ; int MpEngine::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?playlistSaved@MpEngine@@IAEX_N@Z @ 30 NONAME ; void MpEngine::playlistSaved(bool)
+ ?playbackData@MpEngine@@QAEPAVMpPlaybackData@@XZ @ 31 NONAME ; class MpPlaybackData * MpEngine::playbackData(void)
+ ?stop@MpEngine@@QAEXXZ @ 32 NONAME ; void MpEngine::stop(void)
+ ?retrieveSong@MpEngine@@QAEXXZ @ 33 NONAME ; void MpEngine::retrieveSong(void)
+ ?libraryAboutToUpdate@MpEngine@@IAEXXZ @ 34 NONAME ; void MpEngine::libraryAboutToUpdate(void)
+ ?scan@MpSongScanner@@QAEX_N@Z @ 35 NONAME ; void MpSongScanner::scan(bool)
+ ?openCollection@MpEngine@@QAEXW4TCollectionContext@@@Z @ 36 NONAME ; void MpEngine::openCollection(enum TCollectionContext)
+ ?trUtf8@MpEngine@@SA?AVQString@@PBD0H@Z @ 37 NONAME ; class QString MpEngine::trUtf8(char const *, char const *, int)
+ ?reopenCollection@MpEngine@@QAEXXZ @ 38 NONAME ; void MpEngine::reopenCollection(void)
+ ?songsDeleted@MpEngine@@IAEX_N@Z @ 39 NONAME ; void MpEngine::songsDeleted(bool)
+ ??0MpEngineFactory@@AAE@XZ @ 40 NONAME ; MpEngineFactory::MpEngineFactory(void)
+ ?refreshLibrary@MpEngine@@QAEX_N@Z @ 41 NONAME ; void MpEngine::refreshLibrary(bool)
+ ?qt_metacast@MpEngine@@UAEPAXPBD@Z @ 42 NONAME ; void * MpEngine::qt_metacast(char const *)
+ ?startSeekForward@MpEngine@@QAEXXZ @ 43 NONAME ; void MpEngine::startSeekForward(void)
+ ?saveToPlaylist@MpEngine@@QAEXHAAV?$QList@H@@@Z @ 44 NONAME ; void MpEngine::saveToPlaylist(int, class QList<int> &)
+ ?qt_metacall@MpEngineFactory@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 45 NONAME ; int MpEngineFactory::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@MpSongScanner@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 46 NONAME ; int MpSongScanner::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?libraryRefreshNeeded@MpEngine@@IAEXXZ @ 47 NONAME ; void MpEngine::libraryRefreshNeeded(void)
+ ?handleDiskEvent@MpSongScanner@@QAEXW4MpxDiskEvents@@@Z @ 48 NONAME ; void MpSongScanner::handleDiskEvent(enum MpxDiskEvents)
+ ?tr@MpEngineFactory@@SA?AVQString@@PBD0H@Z @ 49 NONAME ; class QString MpEngineFactory::tr(char const *, char const *, int)
+ ?tr@MpEngine@@SA?AVQString@@PBD0H@Z @ 50 NONAME ; class QString MpEngine::tr(char const *, char const *, int)
+ ?trUtf8@MpEngine@@SA?AVQString@@PBD0@Z @ 51 NONAME ; class QString MpEngine::trUtf8(char const *, char const *)
+ ?findPlaylists@MpEngine@@QAEXAAVQStringList@@@Z @ 52 NONAME ; void MpEngine::findPlaylists(class QStringList &)
+ ?presetNames@MpEngine@@QAE?AVQStringList@@XZ @ 53 NONAME ; class QStringList MpEngine::presetNames(void)
+ ?isAutomaticScan@MpSongScanner@@QAE_NXZ @ 54 NONAME ; bool MpSongScanner::isAutomaticScan(void)
+ ??1MpEngineFactory@@UAE@XZ @ 55 NONAME ; MpEngineFactory::~MpEngineFactory(void)
+ ?previewItem@MpEngine@@QAEXH@Z @ 56 NONAME ; void MpEngine::previewItem(int)
+ ??1MpSongScanner@@UAE@XZ @ 57 NONAME ; MpSongScanner::~MpSongScanner(void)
+ ?loudness@MpEngine@@QAE_NXZ @ 58 NONAME ; bool MpEngine::loudness(void)
+ ?staticMetaObject@MpEngineFactory@@2UQMetaObject@@B @ 59 NONAME ; struct QMetaObject const MpEngineFactory::staticMetaObject
+ ?deleteSongs@MpEngine@@QAEXAAV?$QList@H@@@Z @ 60 NONAME ; void MpEngine::deleteSongs(class QList<int> &)
+ ?releaseIsolatedCollection@MpEngine@@QAEXXZ @ 61 NONAME ; void MpEngine::releaseIsolatedCollection(void)
+ ?deleteStarted@MpEngine@@IAEXW4TCollectionContext@@H@Z @ 62 NONAME ; void MpEngine::deleteStarted(enum TCollectionContext, int)
+ ?stopSeeking@MpEngine@@QAEXXZ @ 63 NONAME ; void MpEngine::stopSeeking(void)
+ ?playEmbedded@MpEngine@@QAEXVQString@@@Z @ 64 NONAME ; void MpEngine::playEmbedded(class QString)
+ ?initialize@MpEngine@@AAEXVTUid@@W4EngineMode@1@@Z @ 65 NONAME ; void MpEngine::initialize(class TUid, enum MpEngine::EngineMode)
+ ?tr@MpEngine@@SA?AVQString@@PBD0@Z @ 66 NONAME ; class QString MpEngine::tr(char const *, char const *)
+ ?disableEqualizer@MpEngine@@QAEXXZ @ 67 NONAME ; void MpEngine::disableEqualizer(void)
+ ?getStaticMetaObject@MpEngine@@SAABUQMetaObject@@XZ @ 68 NONAME ; struct QMetaObject const & MpEngine::getStaticMetaObject(void)
+ ?shuffleAll@MpEngine@@QAEXXZ @ 69 NONAME ; void MpEngine::shuffleAll(void)
+ ?qt_metacast@MpEngineFactory@@UAEPAXPBD@Z @ 70 NONAME ; void * MpEngineFactory::qt_metacast(char const *)
+ ?renamePlaylist@MpEngine@@QAEXAAVQString@@@Z @ 71 NONAME ; void MpEngine::renamePlaylist(class QString &)
+ ?libraryUpdated@MpEngine@@IAEXXZ @ 72 NONAME ; void MpEngine::libraryUpdated(void)
+ ?metaObject@MpSongScanner@@UBEPBUQMetaObject@@XZ @ 73 NONAME ; struct QMetaObject const * MpSongScanner::metaObject(void) const
+ ?setRepeat@MpEngine@@QAEX_N@Z @ 74 NONAME ; void MpEngine::setRepeat(bool)
+ ?trUtf8@MpEngineFactory@@SA?AVQString@@PBD0@Z @ 75 NONAME ; class QString MpEngineFactory::trUtf8(char const *, char const *)
+ ??0MpSongScanner@@QAE@PAVMpMpxHarvesterFrameworkWrapper@@PAVQObject@@@Z @ 76 NONAME ; MpSongScanner::MpSongScanner(class MpMpxHarvesterFrameworkWrapper *, class QObject *)
+ ?cancelCollectionRequest@MpEngine@@QAEXXZ @ 77 NONAME ; void MpEngine::cancelCollectionRequest(void)
+ ?containerContentsChanged@MpEngine@@IAEXXZ @ 78 NONAME ; void MpEngine::containerContentsChanged(void)
+ ?startSeekBackward@MpEngine@@QAEXXZ @ 79 NONAME ; void MpEngine::startSeekBackward(void)
+ ?playlistsRenamed@MpEngine@@IAEX_N@Z @ 80 NONAME ; void MpEngine::playlistsRenamed(bool)
+ ?playPause@MpEngine@@QAEXXZ @ 81 NONAME ; void MpEngine::playPause(void)
+ ?checkForSystemEvents@MpEngine@@QAEXXZ @ 82 NONAME ; void MpEngine::checkForSystemEvents(void)
+ ?tr@MpEngineFactory@@SA?AVQString@@PBD0@Z @ 83 NONAME ; class QString MpEngineFactory::tr(char const *, char const *)
+ ?applyPreset@MpEngine@@QAEXH@Z @ 84 NONAME ; void MpEngine::applyPreset(int)
+ ?playEmbedded@MpEngine@@QAEXABVXQSharableFile@@@Z @ 85 NONAME ; void MpEngine::playEmbedded(class XQSharableFile const &)
+ ?trUtf8@MpEngineFactory@@SA?AVQString@@PBD0H@Z @ 86 NONAME ; class QString MpEngineFactory::trUtf8(char const *, char const *, int)
+ ?staticMetaObject@MpEngine@@2UQMetaObject@@B @ 87 NONAME ; struct QMetaObject const MpEngine::staticMetaObject
+ ?scanStarted@MpSongScanner@@IAEXXZ @ 88 NONAME ; void MpSongScanner::scanStarted(void)
+ ?unableToCotinueDueUSB@MpEngine@@IAEXXZ @ 89 NONAME ; void MpEngine::unableToCotinueDueUSB(void)
+ ?handleUsbMtpStartEvent@MpEngine@@AAEXXZ @ 90 NONAME ; void MpEngine::handleUsbMtpStartEvent(void)
+ ?openCollectionItem@MpEngine@@QAEXH@Z @ 91 NONAME ; void MpEngine::openCollectionItem(int)
+ ?cancelScan@MpSongScanner@@QAEXXZ @ 92 NONAME ; void MpSongScanner::cancelScan(void)
+ ?trUtf8@MpSongScanner@@SA?AVQString@@PBD0@Z @ 93 NONAME ; class QString MpSongScanner::trUtf8(char const *, char const *)
+ ?handleScanStarted@MpEngine@@QAEXXZ @ 94 NONAME ; void MpEngine::handleScanStarted(void)
+ ?back@MpEngine@@QAEXXZ @ 95 NONAME ; void MpEngine::back(void)
+ ?activePreset@MpEngine@@QAEHXZ @ 96 NONAME ; int MpEngine::activePreset(void)
+ ?tr@MpSongScanner@@SA?AVQString@@PBD0H@Z @ 97 NONAME ; class QString MpSongScanner::tr(char const *, char const *, int)
+ ?handleUsbEvent@MpEngine@@QAEXW4MpxUsbEvents@@@Z @ 98 NONAME ; void MpEngine::handleUsbEvent(enum MpxUsbEvents)
+ ?songScanner@MpEngine@@QAEPAVMpSongScanner@@XZ @ 99 NONAME ; class MpSongScanner * MpEngine::songScanner(void)
+ ?sharedEngine@MpEngineFactory@@SAPAVMpEngine@@XZ @ 100 NONAME ; class MpEngine * MpEngineFactory::sharedEngine(void)
+ ?handleUsbMassStorageStartEvent@MpEngine@@AAEXXZ @ 101 NONAME ; void MpEngine::handleUsbMassStorageStartEvent(void)
+ ?balance@MpEngine@@QAEHXZ @ 102 NONAME ; int MpEngine::balance(void)
+ ?handleDeleteEnded@MpEngine@@QAEX_N@Z @ 103 NONAME ; void MpEngine::handleDeleteEnded(bool)
+ ?handleDiskEvent@MpEngine@@QAEXW4MpxDiskEvents@@@Z @ 104 NONAME ; void MpEngine::handleDiskEvent(enum MpxDiskEvents)
+ ?verifyUsbBlocking@MpEngine@@QAE_N_N@Z @ 105 NONAME ; bool MpEngine::verifyUsbBlocking(bool)
+ ?usbSynchronizationStarted@MpEngine@@IAEXXZ @ 106 NONAME ; void MpEngine::usbSynchronizationStarted(void)
+ ?handleUsbMassStorageEndEvent@MpEngine@@AAEXXZ @ 107 NONAME ; void MpEngine::handleUsbMassStorageEndEvent(void)
+ ?createSharedEngine@MpEngineFactory@@SAPAVMpEngine@@VTUid@@W4EngineMode@2@@Z @ 108 NONAME ; class MpEngine * MpEngineFactory::createSharedEngine(class TUid, enum MpEngine::EngineMode)
+ ?usbBlocked@MpEngine@@IAEX_N@Z @ 109 NONAME ; void MpEngine::usbBlocked(bool)
+ ?getStaticMetaObject@MpSongScanner@@SAABUQMetaObject@@XZ @ 110 NONAME ; struct QMetaObject const & MpSongScanner::getStaticMetaObject(void)
+ ?getStaticMetaObject@MpEngineFactory@@SAABUQMetaObject@@XZ @ 111 NONAME ; struct QMetaObject const & MpEngineFactory::getStaticMetaObject(void)
+ ??0MpEngine@@AAE@XZ @ 112 NONAME ; MpEngine::MpEngine(void)
+ ?handleUsbMtpNotActive@MpEngine@@AAEXXZ @ 113 NONAME ; void MpEngine::handleUsbMtpNotActive(void)
+ ?staticMetaObject@MpSongScanner@@2UQMetaObject@@B @ 114 NONAME ; struct QMetaObject const MpSongScanner::staticMetaObject
+ ?handleScanEnded@MpSongScanner@@QAEXHH@Z @ 115 NONAME ; void MpSongScanner::handleScanEnded(int, int)
+ ?isolatedCollectionOpened@MpEngine@@IAEXPAVMpMpxCollectionData@@@Z @ 116 NONAME ; void MpEngine::isolatedCollectionOpened(class MpMpxCollectionData *)
+ ?handleScanEnded@MpEngine@@QAEXHH@Z @ 117 NONAME ; void MpEngine::handleScanEnded(int, int)
+ ?aboutToAddSongs@MpEngine@@IAEXH@Z @ 118 NONAME ; void MpEngine::aboutToAddSongs(int)
+ ?skipBackward@MpEngine@@QAEXXZ @ 119 NONAME ; void MpEngine::skipBackward(void)
+ ??_EMpEngine@@UAE@I@Z @ 120 NONAME ; MpEngine::~MpEngine(unsigned int)
+ ??1MpEngine@@UAE@XZ @ 121 NONAME ; MpEngine::~MpEngine(void)
+ ?changeUsbBlockingState@MpEngine@@AAEXW4UsbBlockingState@1@@Z @ 122 NONAME ; void MpEngine::changeUsbBlockingState(enum MpEngine::UsbBlockingState)
+ ?setLoudness@MpEngine@@QAEX_N@Z @ 123 NONAME ; void MpEngine::setLoudness(bool)
+ ?scanFinished@MpSongScanner@@IAEXHH@Z @ 124 NONAME ; void MpSongScanner::scanFinished(int, int)
+ ?reorderPlaylist@MpEngine@@QAEXHHHH@Z @ 125 NONAME ; void MpEngine::reorderPlaylist(int, int, int, int)
+ ?qt_metacast@MpSongScanner@@UAEPAXPBD@Z @ 126 NONAME ; void * MpSongScanner::qt_metacast(char const *)
--- a/mpengine/eabi/mpengineu.def Fri Jun 11 13:36:36 2010 +0300
+++ b/mpengine/eabi/mpengineu.def Wed Jun 23 18:10:13 2010 +0300
@@ -1,103 +1,128 @@
EXPORTS
- _ZN15MpEngineFactory11qt_metacallEN11QMetaObject4CallEiPPv @ 1 NONAME
- _ZN15MpEngineFactory11qt_metacastEPKc @ 2 NONAME
- _ZN15MpEngineFactory12sharedEngineEv @ 3 NONAME
- _ZN15MpEngineFactory16staticMetaObjectE @ 4 NONAME DATA 16
- _ZN15MpEngineFactory18createSharedEngineE4TUidN8MpEngine10EngineModeE @ 5 NONAME
- _ZN15MpEngineFactory19getStaticMetaObjectEv @ 6 NONAME
- _ZN15MpEngineFactory20createIsolatedEngineEN8MpEngine10EngineModeE @ 7 NONAME
- _ZN15MpEngineFactory5closeEv @ 8 NONAME
- _ZN15MpEngineFactory8instanceEv @ 9 NONAME
- _ZN15MpEngineFactoryC1Ev @ 10 NONAME
- _ZN15MpEngineFactoryC2Ev @ 11 NONAME
- _ZN15MpEngineFactoryD0Ev @ 12 NONAME
- _ZN15MpEngineFactoryD1Ev @ 13 NONAME
- _ZN15MpEngineFactoryD2Ev @ 14 NONAME
- _ZN8MpEngine10initializeE4TUidNS_10EngineModeE @ 15 NONAME
- _ZN8MpEngine10setBalanceEi @ 16 NONAME
- _ZN8MpEngine10setShuffleEb @ 17 NONAME
- _ZN8MpEngine10shuffleAllEv @ 18 NONAME
- _ZN8MpEngine10usbBlockedEb @ 19 NONAME
- _ZN8MpEngine11applyPresetEi @ 20 NONAME
- _ZN8MpEngine11deleteSongsER5QListIiE @ 21 NONAME
- _ZN8MpEngine11presetNamesEv @ 22 NONAME
- _ZN8MpEngine11previewItemEi @ 23 NONAME
- _ZN8MpEngine11qt_metacallEN11QMetaObject4CallEiPPv @ 24 NONAME
- _ZN8MpEngine11qt_metacastEPKc @ 25 NONAME
- _ZN8MpEngine11setLoudnessEb @ 26 NONAME
- _ZN8MpEngine11setPositionEi @ 27 NONAME
- _ZN8MpEngine11skipForwardEv @ 28 NONAME
- _ZN8MpEngine11stopSeekingEv @ 29 NONAME
- _ZN8MpEngine12activePresetEv @ 30 NONAME
- _ZN8MpEngine12playEmbeddedE7QString @ 31 NONAME
- _ZN8MpEngine12playEmbeddedERK14XQSharableFile @ 32 NONAME
- _ZN8MpEngine12playbackDataEv @ 33 NONAME
- _ZN8MpEngine12retrieveSongEv @ 34 NONAME
- _ZN8MpEngine12skipBackwardEv @ 35 NONAME
- _ZN8MpEngine12songsDeletedEb @ 36 NONAME
- _ZN8MpEngine13findPlaylistsER11QStringList @ 37 NONAME
- _ZN8MpEngine13playlistSavedEb @ 38 NONAME
- _ZN8MpEngine14collectionDataEv @ 39 NONAME
- _ZN8MpEngine14createPlaylistER7QStringR5QListIiEP19MpMpxCollectionData @ 40 NONAME
- _ZN8MpEngine14equalizerReadyEv @ 41 NONAME
- _ZN8MpEngine14findAlbumSongsEi @ 42 NONAME
- _ZN8MpEngine14handleUsbEventE12MpxUsbEvents @ 43 NONAME
- _ZN8MpEngine14libraryUpdatedEv @ 44 NONAME
- _ZN8MpEngine14openCollectionE18TCollectionContext @ 45 NONAME
- _ZN8MpEngine14playAlbumSongsEiiP19MpMpxCollectionData @ 46 NONAME
- _ZN8MpEngine14refreshLibraryEv @ 47 NONAME
- _ZN8MpEngine14renamePlaylistER7QString @ 48 NONAME
- _ZN8MpEngine14renamePlaylistER7QStringi @ 49 NONAME
- _ZN8MpEngine14saveToPlaylistEiR5QListIiE @ 50 NONAME
- _ZN8MpEngine15handleDiskEventE13MpxDiskEvents @ 51 NONAME
- _ZN8MpEngine15handleScanEndedEii @ 52 NONAME
- _ZN8MpEngine15reorderPlaylistEiiii @ 53 NONAME
- _ZN8MpEngine16disableEqualizerEv @ 54 NONAME
- _ZN8MpEngine16playlistsRenamedEb @ 55 NONAME
- _ZN8MpEngine16reopenCollectionEv @ 56 NONAME
- _ZN8MpEngine16startSeekForwardEv @ 57 NONAME
- _ZN8MpEngine16staticMetaObjectE @ 58 NONAME DATA 16
- _ZN8MpEngine17handleDeleteEndedEv @ 59 NONAME
- _ZN8MpEngine17handleScanStartedEv @ 60 NONAME
- _ZN8MpEngine17startSeekBackwardEv @ 61 NONAME
- _ZN8MpEngine17verifyUsbBlockingEb @ 62 NONAME
- _ZN8MpEngine18launchBlockingNoteEv @ 63 NONAME
- _ZN8MpEngine18openCollectionItemEi @ 64 NONAME
- _ZN8MpEngine19getStaticMetaObjectEv @ 65 NONAME
- _ZN8MpEngine19handleDeleteStartedEv @ 66 NONAME
- _ZN8MpEngine19setOutstandingPopupEP7HbPopup @ 67 NONAME
- _ZN8MpEngine20checkForSystemEventsEv @ 68 NONAME
- _ZN8MpEngine20handleEqualizerReadyEv @ 69 NONAME
- _ZN8MpEngine20handleUsbMtpEndEventEv @ 70 NONAME
- _ZN8MpEngine20libraryAboutToUpdateEv @ 71 NONAME
- _ZN8MpEngine21handleUsbMtpNotActiveEv @ 72 NONAME
- _ZN8MpEngine21saveToCurrentPlaylistER5QListIiEP19MpMpxCollectionData @ 73 NONAME
- _ZN8MpEngine22changeUsbBlockingStateENS_16UsbBlockingStateE @ 74 NONAME
- _ZN8MpEngine22handleUsbMtpStartEventEv @ 75 NONAME
- _ZN8MpEngine22openIsolatedCollectionE18TCollectionContext @ 76 NONAME
- _ZN8MpEngine24collectionPlaylistOpenedEv @ 77 NONAME
- _ZN8MpEngine24containerContentsChangedEv @ 78 NONAME
- _ZN8MpEngine24isolatedCollectionOpenedEP19MpMpxCollectionData @ 79 NONAME
- _ZN8MpEngine25releaseIsolatedCollectionEv @ 80 NONAME
- _ZN8MpEngine28handleOutstandingNoteClosingEv @ 81 NONAME
- _ZN8MpEngine28handleUsbMassStorageEndEventEv @ 82 NONAME
- _ZN8MpEngine30handleUsbMassStorageStartEventEv @ 83 NONAME
- _ZN8MpEngine4backEv @ 84 NONAME
- _ZN8MpEngine4stopEv @ 85 NONAME
- _ZN8MpEngine7balanceEv @ 86 NONAME
- _ZN8MpEngine8loudnessEv @ 87 NONAME
- _ZN8MpEngine8songDataEv @ 88 NONAME
- _ZN8MpEngine9playPauseEv @ 89 NONAME
- _ZN8MpEngine9setRepeatEb @ 90 NONAME
- _ZN8MpEngineC1Ev @ 91 NONAME
- _ZN8MpEngineC2Ev @ 92 NONAME
- _ZN8MpEngineD0Ev @ 93 NONAME
- _ZN8MpEngineD1Ev @ 94 NONAME
- _ZN8MpEngineD2Ev @ 95 NONAME
- _ZNK15MpEngineFactory10metaObjectEv @ 96 NONAME
- _ZNK8MpEngine10metaObjectEv @ 97 NONAME
- _ZTI15MpEngineFactory @ 98 NONAME
- _ZTI8MpEngine @ 99 NONAME
- _ZTV15MpEngineFactory @ 100 NONAME
- _ZTV8MpEngine @ 101 NONAME
+ _ZN13MpSongScanner10cancelScanEv @ 1 NONAME
+ _ZN13MpSongScanner11qt_metacallEN11QMetaObject4CallEiPPv @ 2 NONAME
+ _ZN13MpSongScanner11qt_metacastEPKc @ 3 NONAME
+ _ZN13MpSongScanner11scanStartedEv @ 4 NONAME
+ _ZN13MpSongScanner12scanFinishedEii @ 5 NONAME
+ _ZN13MpSongScanner15handleDiskEventE13MpxDiskEvents @ 6 NONAME
+ _ZN13MpSongScanner15handleScanEndedEii @ 7 NONAME
+ _ZN13MpSongScanner15isAutomaticScanEv @ 8 NONAME
+ _ZN13MpSongScanner16scanCountChangedEi @ 9 NONAME
+ _ZN13MpSongScanner16staticMetaObjectE @ 10 NONAME DATA 16
+ _ZN13MpSongScanner19getStaticMetaObjectEv @ 11 NONAME
+ _ZN13MpSongScanner4scanEb @ 12 NONAME
+ _ZN13MpSongScannerC1EP30MpMpxHarvesterFrameworkWrapperP7QObject @ 13 NONAME
+ _ZN13MpSongScannerC2EP30MpMpxHarvesterFrameworkWrapperP7QObject @ 14 NONAME
+ _ZN13MpSongScannerD0Ev @ 15 NONAME
+ _ZN13MpSongScannerD1Ev @ 16 NONAME
+ _ZN13MpSongScannerD2Ev @ 17 NONAME
+ _ZN15MpEngineFactory11qt_metacallEN11QMetaObject4CallEiPPv @ 18 NONAME
+ _ZN15MpEngineFactory11qt_metacastEPKc @ 19 NONAME
+ _ZN15MpEngineFactory12sharedEngineEv @ 20 NONAME
+ _ZN15MpEngineFactory16staticMetaObjectE @ 21 NONAME DATA 16
+ _ZN15MpEngineFactory18createSharedEngineE4TUidN8MpEngine10EngineModeE @ 22 NONAME
+ _ZN15MpEngineFactory19getStaticMetaObjectEv @ 23 NONAME
+ _ZN15MpEngineFactory20createIsolatedEngineEN8MpEngine10EngineModeE @ 24 NONAME
+ _ZN15MpEngineFactory5closeEv @ 25 NONAME
+ _ZN15MpEngineFactory8instanceEv @ 26 NONAME
+ _ZN15MpEngineFactoryC1Ev @ 27 NONAME
+ _ZN15MpEngineFactoryC2Ev @ 28 NONAME
+ _ZN15MpEngineFactoryD0Ev @ 29 NONAME
+ _ZN15MpEngineFactoryD1Ev @ 30 NONAME
+ _ZN15MpEngineFactoryD2Ev @ 31 NONAME
+ _ZN8MpEngine10initializeE4TUidNS_10EngineModeE @ 32 NONAME
+ _ZN8MpEngine10setBalanceEi @ 33 NONAME
+ _ZN8MpEngine10setShuffleEb @ 34 NONAME
+ _ZN8MpEngine10shuffleAllEv @ 35 NONAME
+ _ZN8MpEngine10usbBlockedEb @ 36 NONAME
+ _ZN8MpEngine11applyPresetEi @ 37 NONAME
+ _ZN8MpEngine11deleteSongsER5QListIiE @ 38 NONAME
+ _ZN8MpEngine11presetNamesEv @ 39 NONAME
+ _ZN8MpEngine11previewItemEi @ 40 NONAME
+ _ZN8MpEngine11qt_metacallEN11QMetaObject4CallEiPPv @ 41 NONAME
+ _ZN8MpEngine11qt_metacastEPKc @ 42 NONAME
+ _ZN8MpEngine11setLoudnessEb @ 43 NONAME
+ _ZN8MpEngine11setPositionEi @ 44 NONAME
+ _ZN8MpEngine11skipForwardEv @ 45 NONAME
+ _ZN8MpEngine11songScannerEv @ 46 NONAME
+ _ZN8MpEngine11stopSeekingEv @ 47 NONAME
+ _ZN8MpEngine12activePresetEv @ 48 NONAME
+ _ZN8MpEngine12playEmbeddedE7QString @ 49 NONAME
+ _ZN8MpEngine12playEmbeddedERK14XQSharableFile @ 50 NONAME
+ _ZN8MpEngine12playbackDataEv @ 51 NONAME
+ _ZN8MpEngine12retrieveSongEv @ 52 NONAME
+ _ZN8MpEngine12skipBackwardEv @ 53 NONAME
+ _ZN8MpEngine12songsDeletedEb @ 54 NONAME
+ _ZN8MpEngine13deleteStartedE18TCollectionContexti @ 55 NONAME
+ _ZN8MpEngine13findPlaylistsER11QStringList @ 56 NONAME
+ _ZN8MpEngine13playlistSavedEb @ 57 NONAME
+ _ZN8MpEngine14collectionDataEv @ 58 NONAME
+ _ZN8MpEngine14createPlaylistER7QStringR5QListIiEP19MpMpxCollectionData @ 59 NONAME
+ _ZN8MpEngine14equalizerReadyEv @ 60 NONAME
+ _ZN8MpEngine14findAlbumSongsEi @ 61 NONAME
+ _ZN8MpEngine14handleUsbEventE12MpxUsbEvents @ 62 NONAME
+ _ZN8MpEngine14libraryUpdatedEv @ 63 NONAME
+ _ZN8MpEngine14openCollectionE18TCollectionContext @ 64 NONAME
+ _ZN8MpEngine14playAlbumSongsEiiP19MpMpxCollectionData @ 65 NONAME
+ _ZN8MpEngine14refreshLibraryEb @ 66 NONAME
+ _ZN8MpEngine14renamePlaylistER7QString @ 67 NONAME
+ _ZN8MpEngine14renamePlaylistER7QStringi @ 68 NONAME
+ _ZN8MpEngine14saveToPlaylistEiR5QListIiE @ 69 NONAME
+ _ZN8MpEngine15aboutToAddSongsEi @ 70 NONAME
+ _ZN8MpEngine15handleDiskEventE13MpxDiskEvents @ 71 NONAME
+ _ZN8MpEngine15handleScanEndedEii @ 72 NONAME
+ _ZN8MpEngine15reorderPlaylistEiiii @ 73 NONAME
+ _ZN8MpEngine16disableEqualizerEv @ 74 NONAME
+ _ZN8MpEngine16playlistsRenamedEb @ 75 NONAME
+ _ZN8MpEngine16reopenCollectionEv @ 76 NONAME
+ _ZN8MpEngine16startSeekForwardEv @ 77 NONAME
+ _ZN8MpEngine16staticMetaObjectE @ 78 NONAME DATA 16
+ _ZN8MpEngine17handleDeleteEndedEb @ 79 NONAME
+ _ZN8MpEngine17handleScanStartedEv @ 80 NONAME
+ _ZN8MpEngine17startSeekBackwardEv @ 81 NONAME
+ _ZN8MpEngine17verifyUsbBlockingEb @ 82 NONAME
+ _ZN8MpEngine18openCollectionItemEi @ 83 NONAME
+ _ZN8MpEngine19getStaticMetaObjectEv @ 84 NONAME
+ _ZN8MpEngine19handleDeleteStartedE18TCollectionContexti @ 85 NONAME
+ _ZN8MpEngine20checkForSystemEventsEv @ 86 NONAME
+ _ZN8MpEngine20handleEqualizerReadyEv @ 87 NONAME
+ _ZN8MpEngine20handleUsbMtpEndEventEv @ 88 NONAME
+ _ZN8MpEngine20libraryAboutToUpdateEv @ 89 NONAME
+ _ZN8MpEngine20libraryRefreshNeededEv @ 90 NONAME
+ _ZN8MpEngine21handleUsbMtpNotActiveEv @ 91 NONAME
+ _ZN8MpEngine21saveToCurrentPlaylistER5QListIiEP19MpMpxCollectionData @ 92 NONAME
+ _ZN8MpEngine21unableToCotinueDueUSBEv @ 93 NONAME
+ _ZN8MpEngine22changeUsbBlockingStateENS_16UsbBlockingStateE @ 94 NONAME
+ _ZN8MpEngine22handleUsbMtpStartEventEv @ 95 NONAME
+ _ZN8MpEngine22openIsolatedCollectionE18TCollectionContext @ 96 NONAME
+ _ZN8MpEngine23cancelCollectionRequestEv @ 97 NONAME
+ _ZN8MpEngine24collectionPlaylistOpenedEv @ 98 NONAME
+ _ZN8MpEngine24containerContentsChangedEv @ 99 NONAME
+ _ZN8MpEngine24isolatedCollectionOpenedEP19MpMpxCollectionData @ 100 NONAME
+ _ZN8MpEngine25releaseIsolatedCollectionEv @ 101 NONAME
+ _ZN8MpEngine25usbSynchronizationStartedEv @ 102 NONAME
+ _ZN8MpEngine26usbSynchronizationFinishedEv @ 103 NONAME
+ _ZN8MpEngine28handleUsbMassStorageEndEventEv @ 104 NONAME
+ _ZN8MpEngine30handleUsbMassStorageStartEventEv @ 105 NONAME
+ _ZN8MpEngine4backEv @ 106 NONAME
+ _ZN8MpEngine4stopEv @ 107 NONAME
+ _ZN8MpEngine7balanceEv @ 108 NONAME
+ _ZN8MpEngine8loudnessEv @ 109 NONAME
+ _ZN8MpEngine8songDataEv @ 110 NONAME
+ _ZN8MpEngine9playPauseEv @ 111 NONAME
+ _ZN8MpEngine9setRepeatEb @ 112 NONAME
+ _ZN8MpEngineC1Ev @ 113 NONAME
+ _ZN8MpEngineC2Ev @ 114 NONAME
+ _ZN8MpEngineD0Ev @ 115 NONAME
+ _ZN8MpEngineD1Ev @ 116 NONAME
+ _ZN8MpEngineD2Ev @ 117 NONAME
+ _ZNK13MpSongScanner10metaObjectEv @ 118 NONAME
+ _ZNK15MpEngineFactory10metaObjectEv @ 119 NONAME
+ _ZNK8MpEngine10metaObjectEv @ 120 NONAME
+ _ZTI13MpSongScanner @ 121 NONAME
+ _ZTI15MpEngineFactory @ 122 NONAME
+ _ZTI8MpEngine @ 123 NONAME
+ _ZTV13MpSongScanner @ 124 NONAME
+ _ZTV15MpEngineFactory @ 125 NONAME
+ _ZTV8MpEngine @ 126 NONAME
--- a/mpengine/inc/mpmpxcollectionframeworkwrapper.h Fri Jun 11 13:36:36 2010 +0300
+++ b/mpengine/inc/mpmpxcollectionframeworkwrapper.h Wed Jun 23 18:10:13 2010 +0300
@@ -72,10 +72,10 @@
void collectionPlaylistOpened();
void playlistSaved( bool success );
- void deleteStarted(TCollectionContext context, TInt Count);
+ void deleteStarted(TCollectionContext context, int Count);
void songsDeleted( bool success );
void playlistsRenamed( bool success );
- void openAddSongsWaitDialog();
+ void aboutToAddSongs( int count );
void isolatedCollectionOpened( MpMpxCollectionData* collectionData );
--- a/mpengine/inc/mpmpxharvesterframeworkwrapper.h Fri Jun 11 13:36:36 2010 +0300
+++ b/mpengine/inc/mpmpxharvesterframeworkwrapper.h Wed Jun 23 18:10:13 2010 +0300
@@ -23,10 +23,6 @@
#include "mpcommondefs.h"
class MpMpxHarvesterFrameworkWrapperPrivate;
-class MpSongScannerHelper;
-class HbNotificationDialog;
-class QStringList;
-class QTranslator;
class MpMpxHarvesterFrameworkWrapper : public QObject
{
--- a/mpengine/inc/mpprogressdialoghandler.h Fri Jun 11 13:36:36 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Music Player Progress Dialogs.
-*
-*/
-
-
-#ifndef MPPROGRESSDIALOGHANDLER_H
-#define MPPROGRESSDIALOGHANDLER_H
-
-#include "mpmpxcommondefs.h"
-#include "mpmpxcollectionviewdefs.h"
-
-class MpMpxCollectionFrameworkWrapper;
-class MpMpxHarvesterFrameworkWrapper;
-class HbProgressDialog;
-class HbPopup;
-
-#include <QObject>
-
-class MpProgressDialogHandler : public QObject
-{
- Q_OBJECT
-
-public:
-
- explicit MpProgressDialogHandler( MpMpxCollectionFrameworkWrapper *cwrapper, MpMpxHarvesterFrameworkWrapper *hwrapper , QObject *parent=0 );
- virtual ~ MpProgressDialogHandler();
- void scan();
- bool isScanning();
-
- void deleteSongs( QList<int> &selection );
-
-
-signals:
-
- void deleteStarted();
- void songsDeleted( bool success );
-
-
-public slots:
-
- void cancelRequest();
- void handleDeleteStarted( TCollectionContext context, TInt count );
- void handleDeleteEnded( bool success );
- void handleAddSongs();
- void handleAddSongsFinished( bool success);
- void cancelScan();
- void handleScanStarted();
- void handleScanEnded( int numItemsAdded, int error );
- void handleScanCountChanged(int count);
- void handleDiskEvent( MpxDiskEvents event );
- void handleOutstandingPopupClosing();
-
-
-private:
-
- void setOutstandingPopup( HbPopup *popup );
- void clearOutstandingPopup( HbPopup *popup );
-
- MpMpxCollectionFrameworkWrapper *mMpxCollectionWrapper; // Not own
- MpMpxHarvesterFrameworkWrapper *mMpxHarvesterWrapper; // Not own
- HbPopup *mOutStandingProgressNote; // Own
- TBool mDeleting;
- TBool mScanning;
-};
-
-#endif // MPSONGDELETING_H
-
--- a/mpengine/mpengine.pro Fri Jun 11 13:36:36 2010 +0300
+++ b/mpengine/mpengine.pro Wed Jun 23 18:10:13 2010 +0300
@@ -14,45 +14,46 @@
# Description: Project file for Music Player Engine.
#
-symbian:TARGET.UID3 = 0x10207C93
-
TEMPLATE = lib
CONFIG += hb
TARGET = mpengine
-
-TARGET.CAPABILITY = CAP_GENERAL_DLL
-
-INCLUDEPATH += . \
- inc \
- ../inc \
- ../mpserviceplugins/inc
-
-INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
-
-LIBS += -lestor.dll \
- -lmpxplaybackutility.dll \
- -lmpxcollectionutility.dll \
- -lmpxharvesterutility.dll \
- -lmpxcommon.dll \
- -lmpxcollectionhelper.dll \
- -lremconcoreapi.dll \
- -lremconinterfacebase.dll \
- -lmpsettingsmanager \
- -lmpdata.dll \
- -lxqserviceutil \
- -laudioequalizerutility.dll
-
-symbian:
-{
+symbian: {
+ TARGET.UID3 = 0x10207C93
+ MMP_RULES += "DEFFILE mpengine.def"
+ defFilePath = .
+ TARGET.CAPABILITY = CAP_GENERAL_DLL
TARGET.EPOCALLOWDLLDATA = 1
-
BLD_INF_RULES.prj_exports += \
"resources/nullsound.mp3 /epoc32/release/winscw/udeb/Z/system/data/nullsound.mp3" \
"resources/nullsound.mp3 /epoc32/data/Z/system/data/nullsound.mp3"
}
+DEFINES += BUILD_MPENGINE_LIB
+INCLUDEPATH += . \
+ inc \
+ ../inc \
+ ../mpserviceplugins/inc
+INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
+
+LIBS += -lestor \
+ -lmpxplaybackutility \
+ -lmpxcollectionutility \
+ -lmpxharvesterutility \
+ -lmpxcommon \
+ -lmpxcollectionhelper \
+ -lremconcoreapi \
+ -lremconinterfacebase \
+ -lmpsettingsmanager \
+ -lmpdata \
+ -lxqserviceutil \
+ -laudioequalizerutility \
+ -lmediaclientaudio \
+ -lefsrv
+
+# Input
HEADERS += ../inc/mpenginefactory.h \
../inc/mpengine.h \
+ ../inc/mpsongscanner.h \
inc/mpmpxharvesterframeworkwrapper.h \
inc/mpmpxharvesterframeworkwrapper_p.h \
inc/mpmpxplaybackframeworkwrapper.h \
@@ -68,11 +69,11 @@
inc/mpaudioeffectsframeworkwrapper.h \
inc/mpaudioeffectsframeworkwrapper_p.h \
inc/mpequalizerframeworkwrapper.h \
- inc/mpequalizerframeworkwrapper_p.h \
- inc/mpprogressdialoghandler.h
+ inc/mpequalizerframeworkwrapper_p.h
SOURCES += src/mpenginefactory.cpp \
src/mpengine.cpp \
+ src/mpsongscanner.cpp \
src/mpmpxharvesterframeworkwrapper.cpp \
src/mpmpxharvesterframeworkwrapper_p.cpp \
src/mpmpxplaybackframeworkwrapper.cpp \
@@ -88,16 +89,5 @@
src/mpaudioeffectsframeworkwrapper.cpp \
src/mpaudioeffectsframeworkwrapper_p.cpp \
src/mpequalizerframeworkwrapper.cpp \
- src/mpequalizerframeworkwrapper_p.cpp \
- src/mpprogressdialoghandler.cpp
-
-DEFINES += BUILD_MPENGINE_LIB
+ src/mpequalizerframeworkwrapper_p.cpp
-myDefInclude = "NOSTRICTDEF" \
-"$${LITERAL_HASH}if defined(WINS)"\
-"DEFFILE bwins/mpengineu.def "\
-"$${LITERAL_HASH}else "\
-"DEFFILE eabi/mpengineu.def "\
-"$${LITERAL_HASH}endif"
-MMP_RULES += myDefInclude
-
--- a/mpengine/src/mpengine.cpp Fri Jun 11 13:36:36 2010 +0300
+++ b/mpengine/src/mpengine.cpp Wed Jun 23 18:10:13 2010 +0300
@@ -15,12 +15,6 @@
*
*/
-#include <QTranslator>
-#include <QLocale>
-#include <hbmessagebox.h>
-#include <hbprogressdialog.h>
-#include <hbaction.h>
-#include <hbinstance.h>
#include <xqsharablefile.h>
#include <EqualizerConstants.h>
@@ -34,7 +28,7 @@
#include "mpmediakeyhandler.h"
#include "mptrace.h"
#include "mpsettingsmanager.h"
-#include "mpprogressdialoghandler.h"
+#include "mpsongscanner.h"
/*!
\class MpEngine
@@ -51,87 +45,61 @@
*/
/*!
- \fn void scanStarted()
-
- This signal is emitted when scan operation is started.
-
- */
-
-/*!
- \fn void scanEnded()
+ \fn void libraryAboutToUpdate()
- This signal is emitted when scan operation ends.
-
- */
-
-/*!
- \fn void scanCountChanged( int count )
-
- This signal is emitted when scan count is updated.
+ This signal is emitted when a scan operation has been requested or
+ when MTP synchronization starts.
*/
/*!
\fn void libraryUpdated()
- This signal is emitted when MpSongScannerHelper ends scanning,
- or USB-MTP Synchronization finishes.
+ This signal is emitted when library has changed.
+
+ \sa handleScanEnded()
+ \sa handleDiskEvent()
+ \sa handleUsbMtpEndEvent()
*/
/*!
- \fn void formatStarted()
-
- This signal is emitted when EMcMsgFormatStart is received from MPXCollectionUtility.
-
- */
-
-/*!
- \fn void formatEnded()
+ \fn void usbBlocked( bool blocked )
- This signal is emitted when EMcMsgFormatEnd is received from MPXCollectionUtility.
-
- */
-
-/*!
- \fn void diskRemoved()
-
- This signal is emitted when EMcMsgDiskRemoved is received from MPXCollectionUtility.
+ This signal is emitted to update the usb blocking state
+ due a previous usb event received.
+
+ \sa handleUsbEvent()
*/
/*!
- \fn void diskInserted()
-
- This signal is emitted when EMcMsgDiskInserted is received from MPXCollectionUtility.
+ \fn void unableToCotinueDueUSB()
- */
-
-/*!
- \fn void usbMassStorageStarted()
-
- This signal is emitted when EMcMsgUSBMassStorageStart is received from MPXCollectionUtility.
+ This signal is emitted if usb blocking verification returns true.
+
+ \sa verifyUsbBlocking()
*/
/*!
- \fn void usbMassStorageEnded()
+ \fn void usbSynchronizationStarted()
- This signal is emitted when EMcMsgUSBMassStorageEnd is received from MPXCollectionUtility.
+ This signal is emitted when usb is connected in MassStorage mode or MTP mode and synchronizing.
*/
/*!
- \fn void usbMtpStarted()
+ \fn void usbSynchronizationFinished()
- This signal is emitted when EMcMsgUSBMtpStart is received from MPXCollectionUtility.
+ This signal is emitted when usb in synchronizing state is disconnected.
*/
/*!
- \fn void usbMtpEnded()
+ \fn void libraryRefreshNeeded()
- This signal is emitted when EMcMsgUSBMtpEnd is received from MPXCollectionUtility.
+ This signal is emitted when usb in MassStorage mode is disconnected.
*/
@@ -159,6 +127,24 @@
*/
/*!
+ \fn void aboutToAddSongs( int count )
+
+ Signal emitted up on a notification from MPX Collection wrapper,
+ when play list is prepared and about to be added.
+ \a count Indicates number of songs to be added.
+
+ */
+
+/*!
+ \fn void deleteStarted(TCollectionContext context, int Count)
+
+ This signal is emitted when song delete operation has started.
+ \a context The context where delete operation is taking place.
+ \a Count Number of items to delete.
+
+ */
+
+/*!
\fn void songsDeleted( bool success )
This signal is emitted when song delete operation is completed, it
@@ -194,18 +180,16 @@
*/
MpEngine::MpEngine()
: mMpxHarvesterWrapper(0),
+ mSongScanner(0),
mMediaKeyHandler(0),
- mUsbOutstandingNote(0),
mMpxCollectionWrapper(0),
mMpxPlaybackWrapper(0),
mMpxDetailsWrapper(0),
mAudioEffectsWrapper(0),
mEqualizerWrapper(0),
mCurrentPresetIndex(KEqualizerPresetNone),
- mMpTranslator(0),
mUsbBlockingState(USB_NotConnected),
- mPreviousUsbState(USB_NotConnected),
- mProgressDialogHandler(0)
+ mPreviousUsbState(USB_NotConnected)
{
TX_LOG
}
@@ -216,16 +200,14 @@
MpEngine::~MpEngine()
{
TX_ENTRY
- delete mMpTranslator;
delete mMediaKeyHandler;
- delete mUsbOutstandingNote;
delete mMpxPlaybackWrapper;
delete mMpxDetailsWrapper;
delete mMpxHarvesterWrapper;
delete mMpxCollectionWrapper;
delete mAudioEffectsWrapper;
delete mEqualizerWrapper;
- delete mProgressDialogHandler;
+ delete mSongScanner;
TX_EXIT
}
@@ -236,18 +218,6 @@
{
TX_ENTRY
mHostUid = hostUid;
-
- //Load musicplayer translator
- QString lang = QLocale::system().name();
- QString path = QString( "z:/resource/qt/translations/" );
- bool translatorLoaded = false;
-
- mMpTranslator = new QTranslator( this );
- translatorLoaded = mMpTranslator->load( path + "musicplayer_" + lang );
- TX_LOG_ARGS( "Loading translator ok=" << translatorLoaded );
- if ( translatorLoaded ) {
- qApp->installTranslator( mMpTranslator );
- }
if( mode == StandAlone || mode == Fetch ){
// Harvesting Wrapper
@@ -261,10 +231,10 @@
this, SLOT( handleDiskEvent(MpxDiskEvents) ), Qt::QueuedConnection );
qRegisterMetaType<MpxUsbEvents>("MpxUsbEvents");
connect( mMpxHarvesterWrapper, SIGNAL( usbEvent(MpxUsbEvents) ),
- this, SLOT( handleUsbEvent(MpxUsbEvents) ), Qt::QueuedConnection );
+ this, SLOT( handleUsbEvent(MpxUsbEvents) ), Qt::QueuedConnection );
mMediaKeyHandler = new MpMediaKeyHandler();
}
-
+
if ( mode == StandAlone || mode == Fetch || mode == MediaBrowsing) {
// Collection Wrapper
@@ -277,12 +247,11 @@
connect( mMpxCollectionWrapper, SIGNAL( collectionPlaylistOpened() ),
this, SIGNAL( collectionPlaylistOpened() ),
Qt::QueuedConnection );
+ connect( mMpxCollectionWrapper, SIGNAL( aboutToAddSongs( int ) ),
+ this, SIGNAL( aboutToAddSongs( int ) ) );
connect( mMpxCollectionWrapper, SIGNAL( playlistSaved( bool ) ),
this, SIGNAL( playlistSaved( bool ) ),
Qt::QueuedConnection );
- connect( mMpxCollectionWrapper, SIGNAL( songsDeleted( bool ) ),
- this, SIGNAL( songsDeleted( bool ) ),
- Qt::QueuedConnection );
connect( mMpxCollectionWrapper, SIGNAL( playlistsRenamed( bool ) ),
this, SIGNAL( playlistsRenamed( bool ) ),
Qt::QueuedConnection );
@@ -292,14 +261,13 @@
connect( mMpxCollectionWrapper, SIGNAL( containerContentsChanged() ),
this, SIGNAL( containerContentsChanged() ),
Qt::QueuedConnection );
- connect( mProgressDialogHandler, SIGNAL( deleteStarted() ),
- this, SLOT( handleDeleteStarted() ),
- Qt::QueuedConnection );
- connect( mProgressDialogHandler, SIGNAL( songsDeleted( bool ) ),
- this, SLOT( handleDeleteEnded( bool ) ),
- Qt::QueuedConnection );
+ connect( mMpxCollectionWrapper, SIGNAL( deleteStarted( TCollectionContext, int ) ),
+ this, SLOT( handleDeleteStarted( TCollectionContext, int ) ) );
+ connect( mMpxCollectionWrapper, SIGNAL( songsDeleted( bool ) ),
+ this, SLOT( handleDeleteEnded( bool ) ),
+ Qt::QueuedConnection );
}
-
+
if( mode == StandAlone ){
// Equalizer wrapper , this needs to be created before playback wrapper.
mEqualizerWrapper = new MpEqualizerFrameworkWrapper();
@@ -319,10 +287,7 @@
// AudioEffects wrapper
mAudioEffectsWrapper = new MpAudioEffectsFrameworkWrapper();
}
- if (mMpxHarvesterWrapper && mMpxCollectionWrapper){
- mProgressDialogHandler = new MpProgressDialogHandler(mMpxCollectionWrapper, mMpxHarvesterWrapper);
- }
- TX_EXIT
+ TX_EXIT
}
/*!
@@ -336,18 +301,14 @@
Used to verify if an action can be executed depending on USB blocking state.
If not, a notification note might be displayed.
*/
-bool MpEngine::verifyUsbBlocking( bool showMessage )
+bool MpEngine::verifyUsbBlocking( bool notify )
{
TX_ENTRY
bool result( false );
if ( mUsbBlockingState == USB_Connected ) {
result = true;
- if ( showMessage ) {
- HbMessageBox *dialog = new HbMessageBox( HbMessageBox::MessageTypeInformation );
- dialog->setText( hbTrId( "txt_mus_info_usb_conn_in_progress" ) );
- dialog->setModal( true );
- setOutstandingPopup( dialog );
- mUsbOutstandingNote->show();;
+ if ( notify ) {
+ emit unableToCotinueDueUSB();
}
}
TX_EXIT
@@ -366,15 +327,26 @@
}
/*!
+ \
+ Returs the current songScanner instance
+ */
+MpSongScanner *MpEngine::songScanner()
+{
+ return mSongScanner;
+}
+/*!
Slot to be called to start Refresh library process.
If scanning is already ongoing, this request is ignored.
*/
-void MpEngine::refreshLibrary()
+void MpEngine::refreshLibrary( bool automaticRequest )
{
TX_ENTRY
if ( !verifyUsbBlocking( true ) ) {
+ if ( !mSongScanner ) {
+ mSongScanner = new MpSongScanner( mMpxHarvesterWrapper );
+ }
emit libraryAboutToUpdate();
- mProgressDialogHandler->scan();
+ mSongScanner->scan( automaticRequest );
}
TX_EXIT
}
@@ -420,7 +392,7 @@
break;
case DiskInserted:
if ( mUsbBlockingState == USB_NotConnected ) {
- refreshLibrary();
+ refreshLibrary( true );
}
else if ( mUsbBlockingState == USB_Connected ) {
emit libraryUpdated();
@@ -460,16 +432,6 @@
}
/*!
- Slot to be called when mUsbOutstandingNote is about to close.
- */
-void MpEngine::handleOutstandingNoteClosing()
-{
- TX_ENTRY
- mUsbOutstandingNote = 0;
- TX_EXIT
-}
-
-/*!
To be called when EMcMsgUSBMassStorageStart event is received.
*/
void MpEngine::handleUsbMassStorageStartEvent()
@@ -479,9 +441,8 @@
changeUsbBlockingState( USB_Synchronizing );
emit usbBlocked(true);
-
- launchBlockingNote();
-
+ emit usbSynchronizationStarted();
+
TX_EXIT
}
@@ -491,24 +452,13 @@
void MpEngine::handleUsbMassStorageEndEvent()
{
TX_ENTRY
- mMediaKeyHandler->setEnabled(true);
+ mMediaKeyHandler->setEnabled(true);
changeUsbBlockingState( USB_NotConnected );
emit usbBlocked(false);
+ emit usbSynchronizationFinished();
+ emit libraryRefreshNeeded();
- HbAction *action;
- HbMessageBox *promptRefresh = new HbMessageBox( HbMessageBox::MessageTypeQuestion );
- promptRefresh->setText( hbTrId( "txt_mus_info_music_may_need_to_be_refreshed" ) );
- promptRefresh->setTimeout( HbPopup::NoTimeout );
- promptRefresh->setModal( true );
- promptRefresh->clearActions();
- action = new HbAction( hbTrId( "txt_common_button_yes" ) );
- connect( action, SIGNAL( triggered() ), this, SLOT( refreshLibrary() ) );
- promptRefresh->addAction( action );
- action = new HbAction( hbTrId( "txt_common_button_no" ) );
- promptRefresh->addAction( action );
- setOutstandingPopup( promptRefresh );
- mUsbOutstandingNote->show();
TX_EXIT
}
@@ -526,7 +476,7 @@
//Cancel any ongoing operation.
emit libraryAboutToUpdate();
- launchBlockingNote();
+ emit usbSynchronizationStarted();
TX_EXIT
}
@@ -537,15 +487,13 @@
void MpEngine::handleUsbMtpEndEvent()
{
TX_ENTRY
- mMediaKeyHandler->setEnabled(true);
+ mMediaKeyHandler->setEnabled(true);
changeUsbBlockingState( USB_NotConnected );
emit usbBlocked(false);
-
- if ( mUsbOutstandingNote ) {
- mUsbOutstandingNote->close();
- }
+
if ( mPreviousUsbState == USB_Synchronizing ) {
+ emit usbSynchronizationFinished();
emit libraryUpdated();
}
TX_EXIT
@@ -575,48 +523,6 @@
}
/*!
- Internal
- Used to launch the usb blocking note
- */
-void MpEngine::launchBlockingNote()
-{
- TX_ENTRY
-
- HbProgressDialog *usbBlockingNote = new HbProgressDialog( HbProgressDialog::WaitDialog );
- usbBlockingNote->setModal( true );
- if ( usbBlockingNote->actions().count() ) {
- //Hide cancel action.
- usbBlockingNote->actions().at( 0 )->setVisible( false );
- }
- usbBlockingNote->setDismissPolicy( HbPopup::NoDismiss );
- usbBlockingNote->setText( hbTrId( "txt_mus_info_usb_conn_in_progress" ) );
- setOutstandingPopup( usbBlockingNote );
- mUsbOutstandingNote->show();
-
- TX_EXIT
-}
-
-/*!
- \internal
- sets \a popup as the current outstanding popup and cancels any other active popup.
- */
-void MpEngine::setOutstandingPopup( HbPopup *popup )
-{
- TX_ENTRY
- //Close previous popup (Normally blocking usb note)
- if ( mUsbOutstandingNote ) {
- disconnect( mUsbOutstandingNote, SIGNAL( aboutToClose() ), this, SLOT( handleOutstandingNoteClosing() ) );
- mUsbOutstandingNote->close();
- }
-
- //Set new outstanding popup
- popup->setAttribute( Qt::WA_DeleteOnClose );
- connect( popup, SIGNAL( aboutToClose() ), this, SLOT( handleOutstandingNoteClosing() ) );
- mUsbOutstandingNote = popup;
- TX_EXIT
-}
-
-/*!
-------------------------------------------------------------------------------
Collection related
-------------------------------------------------------------------------------
@@ -717,7 +623,7 @@
void MpEngine::deleteSongs( QList<int> &selection )
{
if ( !verifyUsbBlocking( true ) ) {
- mProgressDialogHandler->deleteSongs( selection );
+ mMpxCollectionWrapper->deleteSongs( selection );
}
}
@@ -796,6 +702,38 @@
}
/*!
+ Slot to be called when song deleting starts.
+ */
+void MpEngine::handleDeleteStarted( TCollectionContext context, int count )
+{
+ TX_ENTRY
+ mMediaKeyHandler->setEnabled( false );
+ emit deleteStarted( context, count );
+ TX_EXIT
+}
+
+/*!
+ Slot to be called when song deleting ends.
+ */
+void MpEngine::handleDeleteEnded( bool success )
+{
+ TX_ENTRY
+ mMediaKeyHandler->setEnabled(true);
+ emit songsDeleted( success );
+ TX_EXIT
+}
+
+/*!
+ Slot to be called when song deleting ends.
+ */
+void MpEngine::cancelCollectionRequest()
+{
+ TX_ENTRY
+ mMpxCollectionWrapper->cancelRequest();
+ TX_EXIT
+}
+
+/*!
Returns pointer to MpPlaybackData, which is the playback data.
*/
MpPlaybackData *MpEngine::playbackData()
@@ -1049,21 +987,3 @@
TX_EXIT
}
-/*!
- Slot to be called when song deleting starts.
- */
-void MpEngine::handleDeleteStarted() {
- TX_ENTRY
- mMediaKeyHandler->setEnabled(false);
- TX_EXIT
-}
-
-/*!
- Slot to be called when song deleting ends.
- */
-void MpEngine::handleDeleteEnded() {
- TX_ENTRY
- mMediaKeyHandler->setEnabled(true);
- TX_EXIT
-}
-
--- a/mpengine/src/mpmpxcollectionframeworkwrapper.cpp Fri Jun 11 13:36:36 2010 +0300
+++ b/mpengine/src/mpmpxcollectionframeworkwrapper.cpp Wed Jun 23 18:10:13 2010 +0300
@@ -66,6 +66,14 @@
*/
/*!
+ \fn void aboutToAddSongs( int count )
+
+ This signal is emitted when play list is prepared and about to be added.
+ \a count Indicates number of songs to be added
+
+ */
+
+/*!
\fn void isolatedCollectionOpened( MpMpxCollectionData* collectionData )
This signal is emitted when an isolated collection is opened on \a context
--- a/mpengine/src/mpmpxcollectionframeworkwrapper_p.cpp Fri Jun 11 13:36:36 2010 +0300
+++ b/mpengine/src/mpmpxcollectionframeworkwrapper_p.cpp Wed Jun 23 18:10:13 2010 +0300
@@ -1249,10 +1249,9 @@
aMedia.SetTObjectValueL<TMPXGeneralCategory>( KMPXMediaGeneralCategory, EMPXPlaylist );
aMedia.SetCObjectValueL( KMPXMediaArrayContents, tracksArray );
aMedia.SetTObjectValueL( KMPXMediaArrayCount, tracksArray->Count() );
- if ( (tracksArray->Count() ) >= 100){ //Add Songs Progress Dialog for 100 songs or more
- emit q_ptr->openAddSongsWaitDialog();
- }
-
+
+ emit q_ptr->aboutToAddSongs( tracksArray->Count() );
+
CleanupStack::PopAndDestroy( tracksArray );
TX_EXIT
}
--- a/mpengine/src/mpprogressdialoghandler.cpp Fri Jun 11 13:36:36 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,331 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Music Player Progress Dialogs Hanlder.
-*
-*/
-
-#include <hbprogressdialog.h>
-#include <hblabel.h>
-#include <hbfontspec.h>
-#include <hbnotificationdialog.h>
-#include <hbmessagebox.h>
-
-#include "mpprogressdialoghandler.h"
-#include "mpmpxcollectionframeworkwrapper.h"
-#include "mpmpxharvesterframeworkwrapper.h"
-#include "mptrace.h"
-
-/*!
- \class MpProgressDialogHandler
- \brief Music Player Progress Dialogs Handler.
-
- This class controls the asynchronous operation of all progress
- dialogs used by Music Player
-*/
-
-/*!
- Constructs the dialog handler.
- */
-MpProgressDialogHandler::MpProgressDialogHandler( MpMpxCollectionFrameworkWrapper *cwrapper, MpMpxHarvesterFrameworkWrapper *hwrapper, QObject *parent )
- : QObject( parent ),
- mMpxCollectionWrapper(cwrapper),
- mMpxHarvesterWrapper(hwrapper),
- mOutStandingProgressNote(0),
- mDeleting(false),
- mScanning(false)
-{
- TX_ENTRY
- connect( mMpxCollectionWrapper, SIGNAL(deleteStarted( TCollectionContext, TInt )), this, SLOT(handleDeleteStarted( TCollectionContext, TInt )) );
- connect( mMpxCollectionWrapper, SIGNAL(songsDeleted( bool )), this, SLOT(handleDeleteEnded( bool )) );
- connect( mMpxCollectionWrapper, SIGNAL( openAddSongsWaitDialog() ), this, SLOT(handleAddSongs() ));
- connect( mMpxCollectionWrapper, SIGNAL( playlistSaved( bool ) ), this, SLOT(handleAddSongsFinished( bool ) ));
- connect( mMpxHarvesterWrapper, SIGNAL(scanStarted()), this, SLOT(handleScanStarted()) );
- connect( mMpxHarvesterWrapper, SIGNAL(scanEnded( int, int )), this, SLOT(handleScanEnded( int, int )) );
- connect( mMpxHarvesterWrapper, SIGNAL(scanCountChanged(int)), this, SLOT(handleScanCountChanged(int)) );
- TX_EXIT
-}
-
-/*!
- Destructs the dialog handler.
- */
-MpProgressDialogHandler::~MpProgressDialogHandler()
-{
- TX_LOG
-}
-
-/*!
- Initiates song scanning.
- */
-void MpProgressDialogHandler::scan()
-{
- if ( !mScanning ) {
- mScanning = true;
- mMpxHarvesterWrapper->scan();
- }
-}
-
-/*!
- Returns true if scanning is ongoing.
- */
-bool MpProgressDialogHandler::isScanning()
-{
- return mScanning;
-}
-
-/*!
- Initiates song deleting.
- */
-void MpProgressDialogHandler::deleteSongs( QList<int> &selection )
-{
- TX_ENTRY
- if ( !mDeleting ) {
- mDeleting = true;
- mMpxCollectionWrapper->deleteSongs( selection );
- }
- TX_EXIT
-}
-
-/*!
- Slot called upon cancels ongoing request, if any.
- */
-void MpProgressDialogHandler::cancelRequest()
-{
- TX_ENTRY
- mMpxCollectionWrapper->cancelRequest();
- TX_EXIT
-}
-
-/*!
- Slot called upon notification from MPX FW Wrapper indicating start of
- deleting process.
- */
-void MpProgressDialogHandler::handleDeleteStarted(TCollectionContext context, TInt count)
-{
- TX_ENTRY
- emit deleteStarted();
- HbProgressDialog *deleteProgressNote = new HbProgressDialog( HbProgressDialog::WaitDialog );
- connect( deleteProgressNote, SIGNAL( cancelled() ), this, SLOT( cancelRequest() ) );
- connect( deleteProgressNote, SIGNAL( aboutToClose() ), this, SLOT( outstandingPopupClosing() ) );
- deleteProgressNote->setModal( true );
- deleteProgressNote->setDismissPolicy( HbPopup::NoDismiss );
- if ( context == ECollectionContextPlaylistSongs ){
- if (count >= 100) { //show progress dialog if removing more than 100 songs
- deleteProgressNote->setText( hbTrId( "txt_mus_info_removing_songs" ) );
- setOutstandingPopup(deleteProgressNote);
- deleteProgressNote->show();
- }
- }
- else if (context != ECollectionContextPlaylists ){ //no progress dialog for delete playlist
- deleteProgressNote->setText( hbTrId( "txt_mus_info_deleting" ) );
- setOutstandingPopup(deleteProgressNote);
- deleteProgressNote->show();
- }
- TX_EXIT
-}
-
-/*!
- Slot called upon notification from MPX FW CollectionHelper indicating end of
- deleting process.
- */
-void MpProgressDialogHandler::handleDeleteEnded( bool success )
-{
- TX_ENTRY
- Q_UNUSED( success );
- HbProgressDialog *deleteProgressNote = qobject_cast<HbProgressDialog *>( mOutStandingProgressNote );
- emit songsDeleted( success );
- if ( deleteProgressNote ) {
- deleteProgressNote->cancel();
- }
- mDeleting = false;
- TX_EXIT
-}
-
-/*!
- Slot called upon notification from MPX FW Wrapper indicating start of
- add songs process.
- */
-void MpProgressDialogHandler::handleAddSongs()
-{
- HbProgressDialog *addSongsWaitNote = new HbProgressDialog( HbProgressDialog::WaitDialog );
- connect( addSongsWaitNote, SIGNAL( cancelled() ), this, SLOT( cancelRequest() ) );
- connect( addSongsWaitNote, SIGNAL( aboutToClose() ), this, SLOT( outstandingPopupClosing() ) );
- addSongsWaitNote->setModal( true );
- addSongsWaitNote->setText( hbTrId( "txt_mus_info_adding_songs" ) );
- setOutstandingPopup( addSongsWaitNote );
- addSongsWaitNote->show();
-
-
-}
-
-/*!
- Slot called upon notification from MPX FW CollectionHelper indicating end of
- add songs process.
- */
-void MpProgressDialogHandler::handleAddSongsFinished( bool success )
-{
- Q_UNUSED(success);
- HbProgressDialog *addSongsWaitNote = qobject_cast<HbProgressDialog *>( mOutStandingProgressNote );
- if (addSongsWaitNote){
- addSongsWaitNote->cancel();
- }
-}
-
-/*!
- Cancels ongoing song scanning, if any.
-
- \sa scan()
- */
-void MpProgressDialogHandler::cancelScan()
-{
- if ( mScanning ) {
- mScanning = false;
- mMpxHarvesterWrapper->cancelScan();
- }
-}
-
-/*!
- Slot called upon notification from MPX Harvesting FW indicating start of
- scanning process.
- */
-void MpProgressDialogHandler::handleScanStarted()
-{
- HbProgressDialog *scanProgressNote = new HbProgressDialog( HbProgressDialog::WaitDialog );
- connect( scanProgressNote, SIGNAL( cancelled() ), this, SLOT( cancelScan() ) );
- connect( scanProgressNote, SIGNAL( aboutToClose() ), this, SLOT( outstandingPopupClosing() ) );
-
- scanProgressNote->setModal( true );
- HbLabel *title = new HbLabel( hbTrId( "txt_mus_title_refreshing" ) );
- title->setFontSpec(HbFontSpec(HbFontSpec::Primary));
-
- scanProgressNote->setHeadingWidget( title );
- scanProgressNote->setText( QString("") );
- setOutstandingPopup( scanProgressNote );
- scanProgressNote->show();
-}
-
-/*!
- Slot called upon notification from MPX Harvesting FW indicating end of
- scanning process.
- */
-void MpProgressDialogHandler::handleScanEnded( int numItemsAdded, int error )
-{
- HbProgressDialog *scanProgressNote = qobject_cast<HbProgressDialog *>( mOutStandingProgressNote );
- if (error == KErrDiskFull) {
- if ( scanProgressNote ) {
- scanProgressNote->cancel();
- }
- QString diskfull;
- diskfull = hbTrId( "txt_mus_title_refresh_cancelled" );
- diskfull.append(" ");
- diskfull.append( hbTrId( "txt_mus_info_out_of_disk_space" ) );
- HbMessageBox *diskFullDialog = new HbMessageBox();
- setOutstandingPopup( diskFullDialog );
- diskFullDialog->setIcon( HbIcon( QString("qtg_small_fail") ) );
- diskFullDialog->setText( diskfull );
- diskFullDialog->setTimeout( HbPopup::NoTimeout);
- diskFullDialog->show();
- mScanning = false;
-
- }
- else{
- QString added;
- HbNotificationDialog *finishedDialog = new HbNotificationDialog();
- finishedDialog->setModal(true);
-
- added = hbTrId( "txt_mus_dpopinfo_ln_songs_added", numItemsAdded );
- finishedDialog->setText( added );
-
- if( error < 0) {
- if ( scanProgressNote ) {
- scanProgressNote->cancel();
- }
- finishedDialog->setIcon( HbIcon( QString("qtg_small_fail") ) );
- finishedDialog->setTitle( hbTrId( "txt_mus_dpophead_refresh_cancelled" ) );
- }
- else if ( mScanning ) {
- if ( scanProgressNote ) {
- scanProgressNote->cancel();
- }
- finishedDialog->setIcon( HbIcon( QString("qtg_large_ok") ) );
- finishedDialog->setTitle( hbTrId( "txt_mus_dpophead_refresh_complete" ) );
- }
- else {
- finishedDialog->setIcon( HbIcon( QString("qtg_small_fail") ) );
- finishedDialog->setTitle( hbTrId( "txt_mus_dpophead_refresh_cancelled" ) );
- }
- mScanning = false;
- setOutstandingPopup( finishedDialog );
- finishedDialog->show();
- }
-}
-
-/*!
- Slot called upon notification from MPX Harvesting FW indicating the number of
- songs scanned so far.
- */
-void MpProgressDialogHandler::handleScanCountChanged(int count)
-{
- HbProgressDialog *scanProgressNote = qobject_cast<HbProgressDialog *>( mOutStandingProgressNote );
- QString added;
- added = hbTrId( "txt_mus_info_ln_songs_added" , count );
- if ( scanProgressNote ) {
- scanProgressNote->setText( added );
- }
-}
-
-/*!
- Slot to be called when disk event is received from MPX framework.
- */
-void MpProgressDialogHandler::handleDiskEvent( MpxDiskEvents event )
-{
- Q_UNUSED( event );
- HbProgressDialog *progressNote = qobject_cast<HbProgressDialog *>( mOutStandingProgressNote );
- if ( progressNote ) {
- progressNote->cancel();
- }
- mScanning = false;
- mDeleting = false;
- TX_EXIT
-}
-
-/*!
- Slot to be called when mOutStandingProgressNote is about to close.
- */
-void MpProgressDialogHandler::handleOutstandingPopupClosing()
-{
- TX_ENTRY
- mOutStandingProgressNote = 0;
- TX_EXIT
-}
-
-/*!
- \internal
- sets \a popup as the current outstanding popup and cancels any other active popup.
- */
-void MpProgressDialogHandler::setOutstandingPopup( HbPopup *popup )
-{
- TX_ENTRY
- //Close previous popup
- if ( mOutStandingProgressNote ) {
- disconnect( mOutStandingProgressNote, SIGNAL( aboutToClose() ), this, SLOT( handleOutstandingPopupClosing() ) );
- mOutStandingProgressNote->close();
- }
-
- //Set new outstanding popup
- popup->setAttribute( Qt::WA_DeleteOnClose );
- connect( popup, SIGNAL( aboutToClose() ), this, SLOT( handleOutstandingPopupClosing() ) );
- mOutStandingProgressNote = popup;
- TX_EXIT
-}
-
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mpengine/src/mpsongscanner.cpp Wed Jun 23 18:10:13 2010 +0300
@@ -0,0 +1,157 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Music Player song scanner.
+*
+*/
+
+#include "mpsongscanner.h"
+#include "mpmpxharvesterframeworkwrapper.h"
+#include "mptrace.h"
+
+/*!
+ \class MpSongScanner
+ \brief Music Player song scanner.
+
+ Song scanner interfaces with MPX Harvesting Framework to harvest
+ music files in the device.
+*/
+
+/*!
+ \fn void scanStarted()
+
+ This signal is emitted when scanning has started.
+
+ */
+
+/*!
+ \fn void scanCountChanged( int count )
+
+ This signal is emitted to notify that scan count has changed.
+
+ */
+
+/*!
+ \fn void scanFinished( int error, int itemsAdded )
+
+ Emitted when scanning has finished.
+
+ */
+
+/*!
+ Constructs the song scanner.
+ */
+MpSongScanner::MpSongScanner( MpMpxHarvesterFrameworkWrapper *wrapper, QObject *parent )
+ : QObject( parent ),
+ mMpxHarvesterWrapper(wrapper),
+ mScanning( false ),
+ mAutomaticScan( true )
+{
+ TX_ENTRY
+ connect( mMpxHarvesterWrapper, SIGNAL( scanStarted() ),
+ this, SIGNAL( scanStarted() ), Qt::QueuedConnection );
+ connect( mMpxHarvesterWrapper, SIGNAL( scanEnded( int, int ) ),
+ this, SLOT( handleScanEnded( int, int ) ), Qt::QueuedConnection );
+ connect( mMpxHarvesterWrapper, SIGNAL( scanCountChanged( int ) ),
+ this, SIGNAL( scanCountChanged( int ) ), Qt::QueuedConnection );
+ connect( mMpxHarvesterWrapper, SIGNAL( diskEvent( MpxDiskEvents ) ),
+ this, SLOT( handleDiskEvent(MpxDiskEvents) ), Qt::QueuedConnection );
+ TX_EXIT
+}
+
+/*!
+ Destructs the song scanner.
+ */
+MpSongScanner::~MpSongScanner()
+{
+ TX_LOG
+}
+
+/*!
+ Initiates song scanning.
+ */
+void MpSongScanner::scan( bool automaticScan )
+{
+ TX_ENTRY
+ if ( !mScanning ) {
+ mScanning = true;
+ mAutomaticScan = automaticScan;
+ mMpxHarvesterWrapper->scan();
+ }
+ TX_EXIT
+}
+
+/*!
+ Returns mAutomaticScan value.
+ */
+bool MpSongScanner::isAutomaticScan()
+{
+ return mAutomaticScan;
+}
+
+/*!
+ Cancels ongoing song scanning, if any.
+
+ \sa scan()
+ */
+void MpSongScanner::cancelScan()
+{
+ TX_ENTRY
+ if ( mScanning ) {
+ mScanning = false;
+ mMpxHarvesterWrapper->cancelScan();
+ }
+ TX_EXIT
+}
+
+/*!
+ Slot called upon notification from MPX Harvesting FW indicating end of
+ scanning process.
+ */
+void MpSongScanner::handleScanEnded( int numItemsAdded, int error )
+{
+ TX_ENTRY
+ if (error == KErrDiskFull) {
+ emit scanFinished( ScanErrorDiskFull, 0 );
+ mScanning = false;
+ }
+ else{
+ if( error < 0) {
+ emit scanFinished( ScanGeneralError, numItemsAdded );
+ }
+ else if ( mScanning ) {
+ emit scanFinished( ScanErrorNone, numItemsAdded );
+ }
+ else {
+ // Scan canceled
+ emit scanFinished( ScanGeneralError, numItemsAdded );
+ }
+ mScanning = false;
+ }
+ TX_EXIT
+}
+
+/*!
+ Slot to be called when disk event is received from MPX framework.
+ */
+void MpSongScanner::handleDiskEvent( MpxDiskEvents event )
+{
+ TX_ENTRY
+ Q_UNUSED( event );
+ if ( mScanning ) {
+ emit scanFinished( ScanInterrupted, 0 );
+ mScanning = false;
+ }
+ TX_EXIT
+}
+
--- a/mpengine/tsrc/tsrc.pro Fri Jun 11 13:36:36 2010 +0300
+++ b/mpengine/tsrc/tsrc.pro Wed Jun 23 18:10:13 2010 +0300
@@ -21,5 +21,6 @@
unittest_mpmpxcollectionframeworkwrapper \
unittest_mpmpxharvesterframeworkwrapper \
unittest_mpmpxisolatedcollectionhelper \
- unittest_mpmpxplaybackframeworkwrapper
+ unittest_mpmpxplaybackframeworkwrapper \
+ unittest_mpsongscanner
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mpengine/tsrc/unittest_mpsongscanner/inc/unittest_mpsongscanner.h Wed Jun 23 18:10:13 2010 +0300
@@ -0,0 +1,57 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Unit test for MpSongScanner
+*
+*/
+
+#ifndef TESTMPSONGSCANNER_H
+#define TESTMPSONGSCANNER_H
+
+#include <QtTest/QtTest>
+
+class MpSongScanner;
+class MpMpxHarvesterFrameworkWrapper;
+
+class TestMpSongScanner : public QObject
+{
+ Q_OBJECT
+
+public:
+ TestMpSongScanner();
+ virtual ~TestMpSongScanner();
+
+public slots:
+ void initTestCase();
+ void cleanupTestCase();
+ void init();
+ void cleanup();
+
+private slots:
+ void testConstructor();
+ void testScan();
+ void testIsAutomaticScan();
+ void testCancelScan();
+ void testScanStartedSignal();
+ void testHandleScanEnded();
+ void testScanCountChangedSignal();
+ void testHandleDiskEvent();
+
+private:
+ MpSongScanner *mTest;
+ MpMpxHarvesterFrameworkWrapper *mHarvesterWrapper;
+
+};
+
+#endif // TESTMPSONGSCANNER_H
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mpengine/tsrc/unittest_mpsongscanner/src/unittest_mpsongscanner.cpp Wed Jun 23 18:10:13 2010 +0300
@@ -0,0 +1,265 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Unit test for MpSongScanner
+*
+*/
+
+#include <QSignalSpy>
+
+#include "stub/inc/mpmpxharvesterframeworkwrapper.h"
+#include "unittest_mpsongscanner.h"
+
+
+// Do this so we can access all member variables.
+#define private public
+#define protected public
+#include "mpsongscanner.h"
+#undef protected
+#undef private
+
+
+/*!
+ Make our test case a stand-alone executable that runs all the test functions.
+ */
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ TestMpSongScanner tv;
+
+ if ( argc > 1 ) {
+ return QTest::qExec( &tv, argc, argv);
+ }
+ else {
+ char *pass[3];
+ pass[0] = argv[0];
+ pass[1] = "-o";
+ pass[2] = "c:\\data\\unittest_mpsongscanner.txt";
+
+ return QTest::qExec(&tv, 3, pass);
+ }
+}
+
+TestMpSongScanner::TestMpSongScanner()
+ : mTest( 0 ),
+ mHarvesterWrapper( 0 )
+{
+}
+
+TestMpSongScanner::~TestMpSongScanner()
+{
+ delete mTest;
+ delete mHarvesterWrapper;
+}
+
+/*!
+ Called before the first testfunction is executed.
+ */
+void TestMpSongScanner::initTestCase()
+{
+}
+
+/*!
+ Called after the last testfunction was executed.
+ */
+void TestMpSongScanner::cleanupTestCase()
+{
+}
+
+/*!
+ Called before each testfunction is executed.
+ */
+void TestMpSongScanner::init()
+{
+ qRegisterMetaType<MpxDiskEvents>("MpxDiskEvents");
+ mHarvesterWrapper = new MpMpxHarvesterFrameworkWrapper();
+ mTest = new MpSongScanner( mHarvesterWrapper );
+}
+
+/*!
+ Called after every testfunction.
+ */
+void TestMpSongScanner::cleanup()
+{
+ delete mTest;
+ mTest = 0;
+ delete mHarvesterWrapper;
+ mHarvesterWrapper = 0;
+}
+
+/*!
+ Tests constructor.
+*/
+void TestMpSongScanner::testConstructor()
+{
+ QVERIFY( mTest->mMpxHarvesterWrapper );
+ QVERIFY( !mTest->mScanning );
+ QVERIFY( mTest->mAutomaticScan );
+}
+
+/*!
+ testScan.
+ */
+void TestMpSongScanner::testScan()
+{
+ // Manual Scan
+ mTest->scan( false );
+ QVERIFY( mTest->mScanning );
+ QVERIFY( !mTest->mAutomaticScan );
+ QVERIFY( mTest->mMpxHarvesterWrapper->mScanRequested );
+
+ // Automatic Scan
+ cleanup();
+ init();
+ mTest->scan( true );
+ QVERIFY( mTest->mScanning );
+ QVERIFY( mTest->mAutomaticScan );
+ QVERIFY( mTest->mMpxHarvesterWrapper->mScanRequested );
+}
+
+/*!
+ testIsAutomaticScan.
+ */
+void TestMpSongScanner::testIsAutomaticScan()
+{
+ mTest->mAutomaticScan = true;
+ QVERIFY( mTest->isAutomaticScan() );
+ mTest->mAutomaticScan = false;
+ QVERIFY( !mTest->isAutomaticScan() );
+}
+
+/*!
+ testCancelScan
+ */
+void TestMpSongScanner::testCancelScan( )
+{
+ mTest->scan( true );
+ mTest->cancelScan();
+ QVERIFY( !mTest->mScanning );
+ QVERIFY( !mTest->mMpxHarvesterWrapper->mScanRequested );
+}
+
+/*!
+ testScanStartedSignal
+ */
+void TestMpSongScanner::testScanStartedSignal( )
+{
+ QSignalSpy spy( mTest, SIGNAL( scanStarted() ) );
+ mTest->scan( true );
+ mTest->mMpxHarvesterWrapper->emitScanStarted();
+ QTest::qWait(500);
+ QCOMPARE( spy.count(), 1 );
+}
+
+/*!
+ testHandleScanEnded
+ */
+void TestMpSongScanner::testHandleScanEnded( )
+{
+ int itemsAdded( -1 );
+ int error( KErrNone );
+
+ // Scand endend with error KErrDiskFull 1/4
+ {
+ QSignalSpy spyScanFinished( mTest, SIGNAL( scanFinished( int, int ) ) );
+ itemsAdded = 10;
+ error = KErrDiskFull;
+ mTest->scan( true );
+ mTest->mMpxHarvesterWrapper->emitScanEnded( itemsAdded, error );
+ QTest::qWait(500);
+ QCOMPARE( spyScanFinished.count(), 1 );
+ QCOMPARE( spyScanFinished.at(0).at(0), QVariant( MpSongScanner::ScanErrorDiskFull ) );
+ QCOMPARE( spyScanFinished.at(0).at(1), QVariant( 0 ) );
+ QVERIFY( !mTest->mScanning );
+ }
+
+ // Any other error 2/4
+ {
+ cleanup();
+ init();
+ QSignalSpy spyScanFinished( mTest, SIGNAL( scanFinished( int, int ) ) );
+ itemsAdded = 10;
+ error = KErrUnknown;
+ mTest->scan( true );
+ mTest->mMpxHarvesterWrapper->emitScanEnded( itemsAdded, error );
+ QTest::qWait(500);
+ QCOMPARE( spyScanFinished.count(), 1 );
+ QCOMPARE( spyScanFinished.at(0).at(0), QVariant( MpSongScanner::ScanGeneralError ) );
+ QCOMPARE( spyScanFinished.at(0).at(1), QVariant( itemsAdded ) );
+ QVERIFY( !mTest->mScanning );
+ }
+
+ // Normal scan finish (No error, no cancel) 3/4
+ {
+ cleanup();
+ init();
+ QSignalSpy spyScanFinished( mTest, SIGNAL( scanFinished( int, int ) ) );
+ itemsAdded = 20;
+ error = KErrNone;
+ mTest->scan( true );
+ mTest->mMpxHarvesterWrapper->emitScanEnded( itemsAdded, error );
+ QTest::qWait(500);
+ QCOMPARE( spyScanFinished.count(), 1 );
+ QCOMPARE( spyScanFinished.at(0).at(0), QVariant( MpSongScanner::ScanErrorNone ) );
+ QCOMPARE( spyScanFinished.at(0).at(1), QVariant( itemsAdded ) );
+ QVERIFY( !mTest->mScanning );
+ }
+
+ // Scan canceled 4/4
+ {
+ cleanup();
+ init();
+ QSignalSpy spyScanFinished( mTest, SIGNAL( scanFinished( int, int ) ) );
+ itemsAdded = 20;
+ error = KErrNone;
+ mTest->scan( true );
+ mTest->cancelScan();
+ mTest->mMpxHarvesterWrapper->emitScanEnded( itemsAdded, error );
+ QTest::qWait(500);
+ QCOMPARE( spyScanFinished.count(), 1 );
+ QCOMPARE( spyScanFinished.at(0).at(0), QVariant( MpSongScanner::ScanGeneralError ) );
+ QCOMPARE( spyScanFinished.at(0).at(1), QVariant( itemsAdded ) );
+ QVERIFY( !mTest->mScanning );
+ }
+}
+
+/*!
+ testScanCountChangedSignal
+ */
+void TestMpSongScanner::testScanCountChangedSignal()
+{
+ int itemsAdded = 15;
+ QSignalSpy spy( mTest, SIGNAL( scanCountChanged( int ) ) );
+ mTest->scan( true );
+ mTest->mMpxHarvesterWrapper->emitScanCountChanged( itemsAdded );
+ QTest::qWait(500);
+ QCOMPARE( spy.count(), 1 );
+ QCOMPARE( spy.at(0).at(0), QVariant( itemsAdded ) );
+}
+
+/*!
+ testHandleDiskEvent
+ */
+void TestMpSongScanner::testHandleDiskEvent()
+{
+ QSignalSpy spyScanFinished( mTest, SIGNAL( scanFinished( int, int ) ) );
+ mTest->scan( true );
+ mTest->mMpxHarvesterWrapper->emitDiskEvent();
+ QTest::qWait(500);
+ QCOMPARE( spyScanFinished.count(), 1 );
+ QCOMPARE( spyScanFinished.at(0).at(0), QVariant( MpSongScanner::ScanInterrupted ) );
+ QCOMPARE( spyScanFinished.at(0).at(1), QVariant( 0 ) );
+ QVERIFY( !mTest->mScanning );
+}
+
+//end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mpengine/tsrc/unittest_mpsongscanner/stub/inc/mpmpxharvesterframeworkwrapper.h Wed Jun 23 18:10:13 2010 +0300
@@ -0,0 +1,59 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Stub class for mpsongscanner unittest.
+*
+*/
+
+#ifndef MPMPXHARVESTERFRAMEWORKWRAPPER_H
+#define MPMPXHARVESTERFRAMEWORKWRAPPER_H
+
+#include <QObject>
+
+#include "mpmpxcommondefs.h"
+
+class MpMpxHarvesterFrameworkWrapper : public QObject
+{
+ Q_OBJECT
+
+public:
+ explicit MpMpxHarvesterFrameworkWrapper( QObject *parent=0 );
+ virtual ~MpMpxHarvesterFrameworkWrapper();
+
+ // mock functions
+ void scan();
+ void cancelScan();
+ void checkForSystemEvents();
+
+ // unittest specific functions
+ void emitScanStarted();
+ void emitScanEnded( int count, int error );
+ void emitScanCountChanged( int count );
+ void emitDiskEvent();
+
+signals:
+ void scanStarted();
+ void scanEnded( int count, int error );
+ void scanCountChanged( int count );
+
+ void diskEvent( MpxDiskEvents event );
+
+public:
+ bool mScanRequested;
+ bool mScanning;
+ int mScanCount;
+ bool mCheckSystemEventsRequested;
+
+};
+
+#endif // MPMPXHARVESTERFRAMEWORKWRAPPER_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mpengine/tsrc/unittest_mpsongscanner/stub/src/mpmpxharvesterframeworkwrapper.cpp Wed Jun 23 18:10:13 2010 +0300
@@ -0,0 +1,95 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Stub class for mpsongscanner unittest.
+*
+*/
+
+#include "stub/inc/mpmpxharvesterframeworkwrapper.h"
+
+/*!
+ Stub function.
+ */
+MpMpxHarvesterFrameworkWrapper::MpMpxHarvesterFrameworkWrapper( QObject *parent )
+ : QObject( parent ),
+ mScanRequested( false ),
+ mScanning( false ),
+ mScanCount( -1 ),
+ mCheckSystemEventsRequested( false )
+{
+}
+
+/*!
+ Stub function.
+ */
+MpMpxHarvesterFrameworkWrapper::~MpMpxHarvesterFrameworkWrapper()
+{
+}
+
+/*!
+ Stub function.
+ */
+void MpMpxHarvesterFrameworkWrapper::scan()
+{
+ mScanRequested = true;
+}
+
+/*!
+ Stub function.
+ */
+void MpMpxHarvesterFrameworkWrapper::cancelScan()
+{
+ mScanRequested = false;
+}
+
+/*!
+ Stub function.
+ */
+void MpMpxHarvesterFrameworkWrapper::checkForSystemEvents()
+{
+ mCheckSystemEventsRequested = true;
+}
+
+/*!
+ Stub function.
+ */
+void MpMpxHarvesterFrameworkWrapper::emitScanStarted()
+{
+ mScanning = true;
+ emit scanStarted();
+}
+
+/*!
+ Stub function.
+ */
+void MpMpxHarvesterFrameworkWrapper::emitScanEnded( int count, int error )
+{
+ mScanning = false;
+ emit scanEnded( count, error );
+}
+
+/*!
+ Stub function.
+ */
+void MpMpxHarvesterFrameworkWrapper::emitScanCountChanged( int count )
+{
+ emit scanCountChanged( count );
+}
+
+/*!
+ Stub function.
+ */
+void MpMpxHarvesterFrameworkWrapper::emitDiskEvent()
+{
+ emit diskEvent( DiskInserted );
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mpengine/tsrc/unittest_mpsongscanner/unittest_mpsongscanner.pro Wed Jun 23 18:10:13 2010 +0300
@@ -0,0 +1,42 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+TEMPLATE = app
+CONFIG += qtestlib
+CONFIG += symbian_test
+TARGET = unittest_mpsongscanner
+TARGET.CAPABILITY = CAP_APPLICATION
+
+DEPENDPATH += .
+INCLUDEPATH += . \
+ ../../inc \
+ ../../../inc
+
+INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
+
+LIBS += -lestor.dll \
+ -lfbscli.dll
+
+HEADERS += inc/unittest_mpsongscanner.h \
+ ../../../inc/mpsongscanner.h \
+ stub/inc/mpmpxharvesterframeworkwrapper.h
+
+SOURCES += src/unittest_mpsongscanner.cpp \
+ ../../src/mpsongscanner.cpp \
+ stub/src/mpmpxharvesterframeworkwrapper.cpp
+
+DEFINES += BUILD_MPENGINE_LIB
+
--- a/mpserviceplugins/mpxsqlitedbcommon/src/mpxdbmanager.cpp Fri Jun 11 13:36:36 2010 +0300
+++ b/mpserviceplugins/mpxsqlitedbcommon/src/mpxdbmanager.cpp Wed Jun 23 18:10:13 2010 +0300
@@ -273,13 +273,18 @@
TInt count(iDatabaseHandles.Count());
for ( TInt i = 0; i < count ; ++i )
{
+ if ( ! iDatabaseHandles[i].iOpen )
+ {
+ MPX_DEBUG1("CMPXDbManager::CopyDBsToRamL DB not open (assuming drive is not present)");
+ continue;
+ }
if ( iDatabaseHandles[i].iUseRAMdb )
{
// already used
MPX_DEBUG1("CMPXDbManager::CopyDBsToRamL iUseRAMdb already ETrue");
continue;
}
- CloseDatabaseAtIndexL( i ); // let leave: not much we can't do if we can't close the original DB
+ CloseDatabaseAtIndexL( i ); // let leave: not much we can do if we can't close the original DB
DoCopyDBToRam( i, aIsMTPInUse ); // copies if it can
TRAPD( err, OpenDatabaseAtIndexL( i ) );
if ( err != KErrNone )
@@ -2018,12 +2023,7 @@
User::Leave(KErrNotReady);
}
-#ifndef __RAMDISK_PERF_ENABLE
-
EnsureDiskSpaceL(aDrive);
-
-#endif //__RAMDISK_PERF_ENABLE
-
}
// ----------------------------------------------------------------------------
@@ -2863,19 +2863,24 @@
TInt count(iDatabaseHandles.Count());
for (TInt i = 0; i < count; ++i)
{
+ DatabaseHandle& database = iDatabaseHandles[i];
if (((KDbManagerAllDrives == aDrive) ||
- (aDrive == iDatabaseHandles[i].iDrive)) &&
- iDatabaseHandles[i].iOpen)
+ (aDrive == database.iDrive)) &&
+ database.iOpen
+#ifdef __RAMDISK_PERF_ENABLE
+ && !database.iUseRAMdb
+#endif
+ )
{
if (SysUtil::DiskSpaceBelowCriticalLevelL(&iFs, 0,
- iDatabaseHandles[i].iDrive))
+ database.iDrive))
{
MPX_DEBUG1("CMPXDbManager::EnsureDiskSpaceL Error diskspace full");
User::Leave(KErrDiskFull);
}
}
- if (aDrive == iDatabaseHandles[i].iDrive)
+ if (aDrive == database.iDrive)
{
// exit if just one drive to check
break;
--- a/mpserviceplugins/mpxsqlitedbhgplugin/src/mpxdbhandler.cpp Fri Jun 11 13:36:36 2010 +0300
+++ b/mpserviceplugins/mpxsqlitedbhgplugin/src/mpxdbhandler.cpp Wed Jun 23 18:10:13 2010 +0300
@@ -1549,6 +1549,8 @@
iOutOfDisk = ETrue;
}
+ User::LeaveIfError( err );
+
if(!iOutOfDisk)
{
MPX_TRAP(err,CheckDiskSpaceOnDrivesL());
@@ -1573,26 +1575,29 @@
void CMPXDbHandler::RefreshEndL()
{
MPX_FUNC("CMPXDbHandler::RefreshEndL");
- iRefresh = EFalse;
- EndTransactionL(KErrNone);
- if (!iOutOfDisk)
- {
- // Write last refreshed time as current time
- // This also sets corrupt = 0
- TTime curTime;
- curTime.HomeTime();
- SetLastRefreshedTimeL(curTime);
- }
+ if ( iRefresh )
+ {
+ iRefresh = EFalse;
+ EndTransactionL(KErrNone);
+ if (!iOutOfDisk)
+ {
+ // Write last refreshed time as current time
+ // This also sets corrupt = 0
+ TTime curTime;
+ curTime.HomeTime();
+ SetLastRefreshedTimeL(curTime);
+ }
#ifdef ABSTRACTAUDIOALBUM_INCLUDED
- //for AbstractAlbum garbage collection
- //can not leave
- TRAP_IGNORE( AbstractAlbumCleanUpL() );
+ //for AbstractAlbum garbage collection
+ //can not leave
+ TRAP_IGNORE( AbstractAlbumCleanUpL() );
#endif
#ifdef __RAMDISK_PERF_ENABLE
- iDbManager->CopyDBsFromRamL();
+ iDbManager->CopyDBsFromRamL();
#endif //__RAMDISK_PERF_ENABLE
+ }
}
// ----------------------------------------------------------------------------
--- a/mpserviceplugins/mpxsqlitedbhgplugin/src/mpxdbplugin.cpp Fri Jun 11 13:36:36 2010 +0300
+++ b/mpserviceplugins/mpxsqlitedbhgplugin/src/mpxdbplugin.cpp Wed Jun 23 18:10:13 2010 +0300
@@ -424,7 +424,6 @@
case EMcRefreshEnded:
{
MPX_DEBUG1("CMPXDbPlugin::CommandL - EMcRefreshEnded");
- iDbHandler->CheckDiskSpaceOnDrivesL();
// ask the handler to finalize the transaction
iDbHandler->RefreshEndL();
iRefreshing=EFalse;
@@ -456,7 +455,6 @@
iDbHandler->MtpStartL();
break;
case EMcCmdMtpEnd:
- iDbHandler->CheckDiskSpaceOnDrivesL();
iMtpInUse = EFalse;
iDbHandler->MtpEndL();
break;
--- a/mpviewplugins/mpcollectionviewplugin/inc/mpcollectionpopuphandler.h Fri Jun 11 13:36:36 2010 +0300
+++ b/mpviewplugins/mpcollectionviewplugin/inc/mpcollectionpopuphandler.h Wed Jun 23 18:10:13 2010 +0300
@@ -19,6 +19,7 @@
#define MPCOLLECTIONPOPUPHANDLER_H
#include <QObject>
+#include "mpmpxcollectionviewdefs.h"
class MpCollectionView;
class HbPopup;
@@ -27,6 +28,7 @@
class QAbstractItemModel;
class MpMpxCollectionData;
class QPointF;
+class MpPopupHandlerPermanentData;
class MpCollectionPopupHandler : public QObject
{
@@ -46,9 +48,7 @@
void openAddToCurrentPlaylist( MpMpxCollectionData* collectionData );
void openCreateNewPlaylist( MpMpxCollectionData* collectionData );
void openArrangeSongs();
- void cancelOngoingPopup();
-
- bool showingPopup();
+ void cancelOngoingPopup( bool onlyContextMenu );
public slots:
//Context Menus
@@ -68,6 +68,11 @@
void handleArrangeSongs( HbAction *selectedAction );
void handleRequestDelete( HbAction *selectedAction );
+ //External Events
+ void handleDeleteStarted( TCollectionContext context, int count );
+ void handleAddingSongs( int count );
+ void handleOperationEnded( bool success );
+
void outstandingPopupClosing();
private:
@@ -79,27 +84,15 @@
void getModelIndexes( const QString &label, QAbstractItemModel* model, const char *handler );
void launchArrangeSongsDialog();
void requestDelete( QList<int> &selection );
+ void launchProgressDialog( const char *id );
+ void connectExternalEvents();
private:
MpCollectionView *mView; // Not own
HbPopup *mOutstandingPopup; // Own
MpEngine *mMpEngine; // Not own
-
- class MpPopupHandlerPermanentData : public QObject
- {
- public:
- MpPopupHandlerPermanentData( QObject *parent=0 );
- virtual ~MpPopupHandlerPermanentData();
- void clear();
- public:
- MpMpxCollectionData *mIsolatedCollectionData; // Not own
- QAbstractItemModel *mAbstractItemModel; // Own
- QList<int> mSelectedItems;
- QString mOriginalName;
- int mContextMenuIndex;
- };
-
MpPopupHandlerPermanentData *mPermanentData; // Own
+ bool mExternalEventsConnected;
};
#endif // MPCOLLECTIONPOPUPHANDLER_H
--- a/mpviewplugins/mpcollectionviewplugin/inc/mpcollectionview.h Fri Jun 11 13:36:36 2010 +0300
+++ b/mpviewplugins/mpcollectionviewplugin/inc/mpcollectionview.h Wed Jun 23 18:10:13 2010 +0300
@@ -39,7 +39,6 @@
class MpNowPlayingWidget;
class MpSnapshotWidget;
class MpCollectionPopupHandler;
-class QTranslator;
class MpCollectionView : public MpViewBase
{
@@ -84,7 +83,6 @@
void containerTransitionComplete( const HbEffect::EffectStatus &status );
void shufflePlayAll();
- void refreshLibrary();
void addToPlaylist();
void deleteSongs();
void renameCurrentPlaylistContainer();
@@ -119,7 +117,7 @@
void setBannerVisibility( bool visible );
int generateShuffleIndex();
void startContainerTransition( TCollectionContext contextFrom, TCollectionContext contextTo );
- void cancelOngoingOperation();
+ void closeActiveDialog( bool onlyContextMenu = false );
private:
@@ -150,9 +148,6 @@
MpSnapshotWidget *mSnapshot;
- QTranslator *mMpTranslator; // Own
- QTranslator *mCommonTranslator; // Own
-
bool mActivationWaiting;
MpCollectionPopupHandler *mMpPopupHandler; // Own
--- a/mpviewplugins/mpcollectionviewplugin/mpcollectionviewplugin.pro Fri Jun 11 13:36:36 2010 +0300
+++ b/mpviewplugins/mpcollectionviewplugin/mpcollectionviewplugin.pro Wed Jun 23 18:10:13 2010 +0300
@@ -14,34 +14,47 @@
# Description:
#
-symbian:TARGET.UID3 = 0x10207C63
-
TEMPLATE = lib
CONFIG += hb qt ecomplugin
TARGET = mpcollectionviewplugin
+symbian: {
+ TARGET.UID3 = 0x10207C63
+ TARGET.CAPABILITY = All -TCB
+ TARGET.EPOCALLOWDLLDATA = 1
+}
SERVICE.INTERFACE_NAME = org.nokia.mmdt.MpxViewPlugin/1.0
SERVICE.CONFIGURATION = "<t>0x101FFCA1</t><p>0x101FFC3A;0xE419BEEE</p><i>EMPXViewPluginPriorityNormal</i><f>0x00000001</f>"
-TARGET.CAPABILITY = All -TCB
-
DEPENDPATH += .
INCLUDEPATH += . \
- inc \
- ../../inc
+ inc \
+ ../../inc
INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
INCLUDEPATH += $$MW_LAYER_PUBLIC_EXPORT_PATH(hgwidgets)
-LIBS += -lmpxviewframeworkqt.dll \
- -lganeswidgets.dll \
- -lmpnowplayingbanner.dll \
- -lmpsettingsmanager \
- -lmpengine \
- -lmpdata.dll
+LIBS += -lmpxviewframeworkqt \
+ -lganeswidgets \
+ -lmpnowplayingbanner \
+ -lmpsettingsmanager \
+ -lmpengine \
+ -lmpdata
-symbian:TARGET.EPOCALLOWDLLDATA = 1
-
# Input
+HEADERS += ../../inc/mpviewbase.h \
+ inc/mpcollectionviewplugin.h \
+ inc/mpcollectionview.h \
+ inc/mpcollectiondocumentloader.h \
+ inc/mpcollectioncontainerfactory.h \
+ inc/mpcollectioncontainer.h \
+ inc/mpcollectionlistcontainer.h \
+ inc/mpcollectioncontainerallsongs.h \
+ inc/mpcollectioncontainerartists.h \
+ inc/mpcollectioncontaineralbums.h \
+ inc/mpcollectioncontainerplaylists.h \
+ inc/mpsnapshotwidget.h \
+ inc/mpcollectionpopuphandler.h
+
SOURCES += src/mpcollectionviewplugin.cpp \
src/mpcollectionview.cpp \
src/mpcollectiondocumentloader.cpp \
@@ -54,20 +67,6 @@
src/mpcollectioncontainerplaylists.cpp \
src/mpsnapshotwidget.cpp \
src/mpcollectionpopuphandler.cpp
-
-HEADERS = ../../inc/mpviewbase.h \
- inc/mpcollectionviewplugin.h \
- inc/mpcollectionview.h \
- inc/mpcollectiondocumentloader.h \
- inc/mpcollectioncontainerfactory.h \
- inc/mpcollectioncontainer.h \
- inc/mpcollectionlistcontainer.h \
- inc/mpcollectioncontainerallsongs.h \
- inc/mpcollectioncontainerartists.h \
- inc/mpcollectioncontaineralbums.h \
- inc/mpcollectioncontainerplaylists.h \
- inc/mpsnapshotwidget.h \
- inc/mpcollectionpopuphandler.h
RESOURCES += resources/mpcollectionviewresources.qrc
--- a/mpviewplugins/mpcollectionviewplugin/resources/effects_item_select.fxml Fri Jun 11 13:36:36 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-<!-- This effect file was generated by effectDialog -->
-
-<layers>
-<visual>
-
-<param name="scale_x" type="anim">
-<duration>0.01</duration>
-<style>inoutback</style>
-<keyframe at="0.0">1.0</keyframe>
-<keyframe at="1.0">1.2</keyframe>
-</param>
-<param name="scale_y" type="anim">
-<keyframe at="0.0">1.0</keyframe>
-<keyframe at="1.0">1.2</keyframe>
-</param>
-<param name="scale_origin_x" ref="visual.width">0.5</param>
-<param name="scale_origin_y" ref="visual.height">0.5</param>
-<param name="opacity" type="anim">
-<duration>0.01</duration>
-<style>linear</style>
-<keyframe at="0.0">1.0</keyframe>
-<keyframe at="1.0">0.5</keyframe>
-</param>
-
-</visual>
-</layers>
-
--- a/mpviewplugins/mpcollectionviewplugin/resources/effects_item_select_end.fxml Fri Jun 11 13:36:36 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-<!-- This effect file was generated by effectDialog -->
-
-<layers>
-<visual>
-
-<param name="scale_x" type="anim">
-<duration>0.01</duration>
-<style>inoutback</style>
-<keyframe at="0.0">1.2</keyframe>
-<keyframe at="1.0">1.0</keyframe>
-</param>
-<param name="scale_y" type="anim">
-<keyframe at="0.0">1.2</keyframe>
-<keyframe at="1.0">1.0</keyframe>
-</param>
-<param name="scale_origin_x" ref="visual.width">0.5</param>
-<param name="scale_origin_y" ref="visual.height">0.5</param>
-<param name="opacity" type="anim">
-<duration>0.01</duration>
-<style>linear</style>
-<keyframe at="0.0">0.5</keyframe>
-<keyframe at="1.0">1.0</keyframe>
-</param>
-
-</visual>
-</layers>
-
--- a/mpviewplugins/mpcollectionviewplugin/resources/mpcollectionviewresources.qrc Fri Jun 11 13:36:36 2010 +0300
+++ b/mpviewplugins/mpcollectionviewplugin/resources/mpcollectionviewresources.qrc Wed Jun 23 18:10:13 2010 +0300
@@ -7,16 +7,5 @@
<qresource prefix="/icons" >
<file alias="default_album.png">default_album.png</file>
</qresource>
-
- <qresource prefix="/effects" >
- <file alias="select.fxml">effects_item_select.fxml</file>
- <file alias="select_end.fxml">effects_item_select_end.fxml</file>
- <file alias="slide_out_to_top.fxml">slide_out_to_top.fxml</file>
- <file alias="slide_out_to_right.fxml">slide_out_to_right.fxml</file>
- <file alias="slide_out_to_left.fxml">slide_out_to_left.fxml</file>
- <file alias="slide_in_to_top_and_fade_in.fxml">slide_in_to_top_and_fade_in.fxml</file>
- <file alias="slide_in_to_right_and_fade_in.fxml">slide_in_to_right_and_fade_in.fxml</file>
- <file alias="slide_in_to_left_and_fade_in.fxml">slide_in_to_left_and_fade_in.fxml</file>
- </qresource>
-
+
</RCC>
--- a/mpviewplugins/mpcollectionviewplugin/resources/slide_in_to_left_and_fade_in.fxml Fri Jun 11 13:36:36 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-<layers>
- <visual>
-
- <param name="translation_x" type="anim">
- <duration>.6</duration>
- <!--style>inoutcubic</style-->
- <keyframe at="0.0">0.0</keyframe>
- <keyframe at="1.0">1.0</keyframe>
- <start ref="visual.right">.3</start>
- <end ref="visual.left">1</end>
- </param>
-
- <param name="opacity" type="anim">
- <duration>.6</duration>
- <!--style>inoutcubic</style-->
- <keyframe at="0.0">0.0</keyframe>
- <keyframe at="1.0">1.0</keyframe>
- </param>
-
- </visual>
-</layers>
\ No newline at end of file
--- a/mpviewplugins/mpcollectionviewplugin/resources/slide_in_to_right_and_fade_in.fxml Fri Jun 11 13:36:36 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-<layers>
- <visual>
-
- <param name="translation_x" type="anim">
- <duration>.6</duration>
- <!--style>inoutcubic</style-->
- <keyframe at="0.0">0.0</keyframe>
- <keyframe at="1.0">1.0</keyframe>
- <start ref="visual.right">-.3</start>
- <end ref="visual.left">1</end>
- </param>
-
- <param name="opacity" type="anim">
- <duration>.6</duration>
- <!--style>inoutcubic</style-->
- <keyframe at="0.0">0.0</keyframe>
- <keyframe at="1.0">1.0</keyframe>
- </param>
-
- </visual>
-</layers>
\ No newline at end of file
--- a/mpviewplugins/mpcollectionviewplugin/resources/slide_in_to_top_and_fade_in.fxml Fri Jun 11 13:36:36 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-<layers>
- <visual>
-
- <param name="translation_y" type="anim">
- <duration>.6</duration>
- <!--style>inoutcubic</style-->
- <keyframe at="0.0">0.0</keyframe>
- <keyframe at="1.0">1.0</keyframe>
- <start ref="visual.height">.3</start>
- <end ref="visual.top">1</end>
- </param>
-
- <param name="opacity" type="anim">
- <duration>.6</duration>
- <!--style>inoutcubic</style-->
- <keyframe at="0.0">0.0</keyframe>
- <keyframe at="1.0">1.0</keyframe>
- </param>
-
- </visual>
-</layers>
\ No newline at end of file
--- a/mpviewplugins/mpcollectionviewplugin/resources/slide_out_to_left.fxml Fri Jun 11 13:36:36 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-<layers>
- <visual>
-
- <param name="translation_x" type="anim">
- <duration>.6</duration>
- <!--style>inoutcubic</style-->
- <keyframe at="0.0">0.0</keyframe>
- <keyframe at="1.0">1.0</keyframe>
- <start ref="visual.left">1</start>
- <end ref="visual.right">-0.3</end>
- </param>
-
- <param name="opacity" type="anim">
- <duration>.6</duration>
- <!--style>inoutcubic</style-->
- <keyframe at="0.0">1.0</keyframe>
- <keyframe at="1.0">0.0</keyframe>
- </param>
-
- </visual>
-</layers>
\ No newline at end of file
--- a/mpviewplugins/mpcollectionviewplugin/resources/slide_out_to_right.fxml Fri Jun 11 13:36:36 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-<layers>
- <visual>
-
- <param name="translation_x" type="anim">
- <duration>.6</duration>
- <!--style>inoutcubic</style-->
- <keyframe at="0.0">0.0</keyframe>
- <keyframe at="1.0">1.0</keyframe>
- <start ref="visual.left">1</start>
- <end ref="visual.right">0.3</end>
- </param>
-
- <param name="opacity" type="anim">
- <duration>.6</duration>
- <!--style>inoutcubic</style-->
- <keyframe at="0.0">1.0</keyframe>
- <keyframe at="1.0">0.0</keyframe>
- </param>
-
- </visual>
-</layers>
\ No newline at end of file
--- a/mpviewplugins/mpcollectionviewplugin/resources/slide_out_to_top.fxml Fri Jun 11 13:36:36 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-<layers>
- <visual>
-
- <param name="translation_y" type="anim">
- <duration>.6</duration>
- <!--style>inoutcubic</style-->
- <keyframe at="0.0">0.0</keyframe>
- <keyframe at="1.0">1.0</keyframe>
- <start ref="visual.top">1</start>
- <end ref="visual.height">-0.3</end>
- </param>
-
- <param name="opacity" type="anim">
- <duration>.6</duration>
- <!--style>inoutcubic</style-->
- <keyframe at="0.0">1.0</keyframe>
- <keyframe at="1.0">0.0</keyframe>
- </param>
-
- </visual>
-</layers>
\ No newline at end of file
--- a/mpviewplugins/mpcollectionviewplugin/src/mpcollectioncontaineralbums.cpp Fri Jun 11 13:36:36 2010 +0300
+++ b/mpviewplugins/mpcollectionviewplugin/src/mpcollectioncontaineralbums.cpp Wed Jun 23 18:10:13 2010 +0300
@@ -292,7 +292,7 @@
}
widget = mDocumentLoader->findWidget(QString("albumWall"));
mTBone = qobject_cast<HgMediawall*>(widget);
- HbIcon defaultIcon( "qtg_large_music_album" );
+ HbIcon defaultIcon( "qtg_large_album_art" );
defaultIcon.setSize(mTBone->itemSize());
mTBone->setDefaultImage( defaultIcon.pixmap().toImage() );
mTBone->setTitleFontSpec( HbFontSpec(HbFontSpec::Primary) );
--- a/mpviewplugins/mpcollectionviewplugin/src/mpcollectioncontainerartists.cpp Fri Jun 11 13:36:36 2010 +0300
+++ b/mpviewplugins/mpcollectionviewplugin/src/mpcollectioncontainerartists.cpp Wed Jun 23 18:10:13 2010 +0300
@@ -383,7 +383,7 @@
}
widget = mDocumentLoader->findWidget(QString("artistAlbumWall"));
mTBone = qobject_cast<HgMediawall*>(widget);
- HbIcon defaultIcon( "qtg_large_music_album" );
+ HbIcon defaultIcon( "qtg_large_album_art" );
defaultIcon.setSize(mTBone->itemSize());
mTBone->setDefaultImage( defaultIcon.pixmap().toImage() );
mTBone->setTitleFontSpec( HbFontSpec(HbFontSpec::Primary) );
--- a/mpviewplugins/mpcollectionviewplugin/src/mpcollectionpopuphandler.cpp Fri Jun 11 13:36:36 2010 +0300
+++ b/mpviewplugins/mpcollectionviewplugin/src/mpcollectionpopuphandler.cpp Wed Jun 23 18:10:13 2010 +0300
@@ -19,6 +19,7 @@
#include <hbaction.h>
#include <hbmenu.h>
#include <hbmessagebox.h>
+#include <hbprogressdialog.h>
#include <hbselectiondialog.h>
#include <hbinputdialog.h>
#include <hblabel.h>
@@ -30,11 +31,109 @@
#include "mpmpxcollectiondata.h"
#include "mpcollectiondatamodel.h"
#include "mpcollectiontbonelistdatamodel.h"
-#include "mpmpxcollectionviewdefs.h"
#include "mpcollectionpopuphandler.h"
#include "mptrace.h"
const int KNullIndex = -1;
+const int KSongsToDisplayProgressDlg = 100;
+
+// Popups launched by this class
+const QString KContextMenu = QString( "ContextMenu" );
+const QString KProgressDialog = QString( "ProgressDialog" );
+const QString KAddToPlaylistSelectionDialog = QString( "AddToPlaylistSelectionDialog" );
+const QString KInputTextDialog = QString( "InputTextDialog" );
+const QString KGetModelIndexesListDialog = QString( "GetModelIndexesListDialog" );
+const QString KArrangeSongsDialog = QString( "ArrangeSongsDialog" );
+const QString KRequestDeleteMessageBox = QString( "RequestDeleteMessageBox" );
+
+// Popups Actions
+const QString KOk = QString( "Ok" );
+const QString KCancel = QString( "Cancel" );
+const QString KNew = QString( "New" );
+const QString KOpen = QString( "Open" );
+const QString KAdd = QString( "Add" );
+const QString KDelete = QString( "Delete" );
+const QString KRenamePlayList = QString( "RenamePlayList" );
+
+
+//------------------------------------------------------------------
+// MpPopupHandlerPermanentData
+//------------------------------------------------------------------
+
+/*!
+ \class MpPopupHandlerPermanentData. This class is used by MpCollectionPopupHandler to
+ store permanent data needed during asynchronous popups operation.
+
+*/
+
+class MpPopupHandlerPermanentData : public QObject
+{
+ public:
+ MpPopupHandlerPermanentData( QObject *parent=0 );
+ virtual ~MpPopupHandlerPermanentData();
+ void clear();
+ public:
+ MpMpxCollectionData *mIsolatedCollectionData; // Not own
+ QAbstractItemModel *mAbstractItemModel; // Own
+ QList<int> mSelectedItems;
+ QString mOriginalName;
+ int mContextMenuIndex;
+};
+
+/*!
+ Constructs the popup handler permanent data.
+ */
+MpPopupHandlerPermanentData::MpPopupHandlerPermanentData( QObject *parent )
+ : QObject( parent ),
+ mIsolatedCollectionData( 0 ),
+ mAbstractItemModel( 0 ),
+ mContextMenuIndex( KNullIndex )
+{
+ TX_ENTRY
+ mSelectedItems.clear();
+ mOriginalName.clear();
+ TX_EXIT
+}
+
+/*!
+ Destructs the popup handler permanent data.
+ */
+MpPopupHandlerPermanentData::~MpPopupHandlerPermanentData()
+{
+ TX_ENTRY
+ clear();
+ TX_EXIT
+}
+
+/*!
+ \internal
+ Clears all permanent data.
+ */
+void MpPopupHandlerPermanentData::clear()
+{
+ TX_ENTRY
+ mSelectedItems.clear();
+ mOriginalName.clear();
+ mContextMenuIndex = KNullIndex;
+ if ( mIsolatedCollectionData ) {
+ MpEngineFactory::sharedEngine()->releaseIsolatedCollection();
+ mIsolatedCollectionData = 0;
+ }
+ if ( mAbstractItemModel ) {
+ delete mAbstractItemModel;
+ mAbstractItemModel = 0;
+ }
+ //clearing any child Objects.
+ foreach (QObject* child, children()) {
+ child->deleteLater();
+ }
+ TX_EXIT
+}
+
+
+//------------------------------------------------------------------
+// MpCollectionPopupHandler
+//------------------------------------------------------------------
/*!
\class MpCollectionPopupHandler
@@ -52,7 +151,8 @@
mView( parent ),
mOutstandingPopup( 0 ),
mMpEngine( 0 ),
- mPermanentData( 0 )
+ mPermanentData( 0 ),
+ mExternalEventsConnected( false )
{
TX_ENTRY
mMpEngine = MpEngineFactory::sharedEngine();
@@ -76,77 +176,76 @@
void MpCollectionPopupHandler::openDefaultViewContextMenu( int index, const QPointF &coords )
{
TX_ENTRY
- HbMenu *contextMenu = 0;
- HbAction *action;
- bool usbBlocked = mMpEngine->verifyUsbBlocking();
+
+ if ( mView->isActivated() ) {
+
+ HbMenu *contextMenu = 0;
+ HbAction *action;
+ bool usbBlocked = mMpEngine->verifyUsbBlocking();
- switch ( mMpEngine->collectionData()->context() ) {
- case ECollectionContextAllSongs:
- case ECollectionContextArtistAllSongs:
- case ECollectionContextArtistAlbumsTBone:
- case ECollectionContextAlbumsTBone:
- contextMenu = new HbMenu();
- action = contextMenu->addAction( hbTrId( "txt_common_menu_play_music" ) );
- action->setObjectName( "open" );
- action = contextMenu->addAction( hbTrId( "txt_mus_menu_add_to_playlist" ) );
- action->setObjectName( "add" );
- action->setEnabled( !usbBlocked );
- action = contextMenu->addAction( hbTrId( "txt_common_menu_delete" ) );
- action->setObjectName( "delete" );
- action->setEnabled( !usbBlocked );
- break;
- case ECollectionContextAlbums:
- case ECollectionContextArtists:
- case ECollectionContextArtistAlbums:
- contextMenu = new HbMenu();
- action = contextMenu->addAction( hbTrId( "txt_common_menu_open" ) );
- action->setObjectName( "open" );
- action = contextMenu->addAction( hbTrId( "txt_mus_menu_add_to_playlist" ) );
- action->setObjectName( "add" );
- action->setEnabled( !usbBlocked );
- action = contextMenu->addAction( hbTrId( "txt_common_menu_delete" ) );
- action->setObjectName( "delete" );
- action->setEnabled( !usbBlocked );
- break;
- case ECollectionContextPlaylists:
- if ( !mMpEngine->collectionData()->isAutoPlaylist( index ) ) {
+ switch ( mMpEngine->collectionData()->context() ) {
+ case ECollectionContextAllSongs:
+ case ECollectionContextArtistAllSongs:
+ case ECollectionContextArtistAlbumsTBone:
+ case ECollectionContextAlbumsTBone:
+ contextMenu = new HbMenu();
+ action = contextMenu->addAction( hbTrId( "txt_common_menu_play_music" ) );
+ action->setObjectName( KOpen );
+ action = contextMenu->addAction( hbTrId( "txt_mus_menu_add_to_playlist" ) );
+ action->setObjectName( KAdd );
+ action->setEnabled( !usbBlocked );
+ action = contextMenu->addAction( hbTrId( "txt_common_menu_delete" ) );
+ action->setObjectName( KDelete );
+ action->setEnabled( !usbBlocked );
+ break;
+ case ECollectionContextAlbums:
+ case ECollectionContextArtists:
+ case ECollectionContextArtistAlbums:
contextMenu = new HbMenu();
action = contextMenu->addAction( hbTrId( "txt_common_menu_open" ) );
- action->setObjectName( "open" );
+ action->setObjectName( KOpen );
+ action = contextMenu->addAction( hbTrId( "txt_mus_menu_add_to_playlist" ) );
+ action->setObjectName( KAdd );
+ action->setEnabled( !usbBlocked );
action = contextMenu->addAction( hbTrId( "txt_common_menu_delete" ) );
- action->setObjectName("delete");
- action->setEnabled( !usbBlocked );
- action = contextMenu->addAction( hbTrId( "txt_common_menu_rename_item" ) );
- action->setObjectName( "rename playlist" );
+ action->setObjectName( KDelete );
action->setEnabled( !usbBlocked );
- }
- break;
- case ECollectionContextPlaylistSongs:
- if ( !mMpEngine->collectionData()->isAutoPlaylist() ) {
- contextMenu = new HbMenu();
- action = contextMenu->addAction( hbTrId( "txt_common_menu_play_music" ) );
- action->setObjectName( "open" );
- action = contextMenu->addAction( hbTrId( "txt_common_menu_remove" ) );
- action->setObjectName( "delete" );
- action->setEnabled( !usbBlocked );
- }
- break;
- default:
- break;
- }
+ break;
+ case ECollectionContextPlaylists:
+ if ( !mMpEngine->collectionData()->isAutoPlaylist( index ) ) {
+ contextMenu = new HbMenu();
+ action = contextMenu->addAction( hbTrId( "txt_common_menu_open" ) );
+ action->setObjectName( KOpen );
+ action = contextMenu->addAction( hbTrId( "txt_common_menu_delete" ) );
+ action->setObjectName(KDelete);
+ action->setEnabled( !usbBlocked );
+ action = contextMenu->addAction( hbTrId( "txt_common_menu_rename_item" ) );
+ action->setObjectName( KRenamePlayList );
+ action->setEnabled( !usbBlocked );
+ }
+ break;
+ case ECollectionContextPlaylistSongs:
+ if ( !mMpEngine->collectionData()->isAutoPlaylist() ) {
+ contextMenu = new HbMenu();
+ action = contextMenu->addAction( hbTrId( "txt_common_menu_play_music" ) );
+ action->setObjectName( KOpen );
+ action = contextMenu->addAction( hbTrId( "txt_common_menu_remove" ) );
+ action->setObjectName( KDelete );
+ action->setEnabled( !usbBlocked );
+ }
+ break;
+ default:
+ break;
+ }
- if ( contextMenu ) {
- if ( mView->isActivated() ) {
+ if ( contextMenu ) {
mPermanentData->mContextMenuIndex = index;
contextMenu->setPreferredPos( coords );
+ contextMenu->setObjectName( KContextMenu );
contextMenu->setAttribute( Qt::WA_DeleteOnClose );
setOutstandingPopup( contextMenu );
contextMenu->open( this, SLOT( defaultContextMenuOptionSelected( HbAction* ) ) );
}
- else {
- delete contextMenu;
- contextMenu = 0;
- }
}
TX_EXIT
@@ -159,34 +258,32 @@
{
TX_ENTRY_ARGS( "index=" << index );
- HbAction *action;
- HbMenu *contextMenu = 0;
+ if ( mView->isActivated() ) {
+
+ HbAction *action;
+ HbMenu *contextMenu = 0;
- switch ( mMpEngine->collectionData()->context() ) {
- case ECollectionContextAllSongs:
- case ECollectionContextArtistAlbumsTBone:
- case ECollectionContextArtistAllSongs:
- case ECollectionContextAlbumsTBone:
- case ECollectionContextPlaylistSongs:
- contextMenu = new HbMenu();
- action = contextMenu->addAction( hbTrId("txt_common_menu_play_music") );
- action->setEnabled( !mMpEngine->verifyUsbBlocking() );
- break;
- default:
- break;
- }
+ switch ( mMpEngine->collectionData()->context() ) {
+ case ECollectionContextAllSongs:
+ case ECollectionContextArtistAlbumsTBone:
+ case ECollectionContextArtistAllSongs:
+ case ECollectionContextAlbumsTBone:
+ case ECollectionContextPlaylistSongs:
+ contextMenu = new HbMenu();
+ action = contextMenu->addAction( hbTrId("txt_common_menu_play_music") );
+ action->setEnabled( !mMpEngine->verifyUsbBlocking() );
+ break;
+ default:
+ break;
+ }
- if ( contextMenu ) {
- if ( mView->isActivated() ) {
+ if ( contextMenu ) {
mPermanentData->mContextMenuIndex = index;
contextMenu->setPreferredPos( coords );
contextMenu->setAttribute( Qt::WA_DeleteOnClose );
+ contextMenu->setObjectName( KContextMenu );
setOutstandingPopup( contextMenu );
- contextMenu->open( this, SLOT( fetcherContextMenuOptionSelected( HbAction* ) ) );
- }
- else {
- delete contextMenu;
- contextMenu = 0;
+ contextMenu->open( this, SLOT( fetcherContextMenuOptionSelected( HbAction* ) ) );
}
}
@@ -236,7 +333,7 @@
TX_ENTRY
MpCollectionTBoneListDataModel *model;
model = new MpCollectionTBoneListDataModel( mMpEngine->collectionData() );
- //this item will be deleted when clearing permanent data.
+ //this item will be deleted when clearing permanent data.
model->setParent(mPermanentData);
model->refreshModel();
getModelIndexes( hbTrId( "txt_mus_title_select_songs" ), model,
@@ -303,33 +400,31 @@
/*!
Closes any active popup
*/
-void MpCollectionPopupHandler::cancelOngoingPopup()
+void MpCollectionPopupHandler::cancelOngoingPopup( bool onlyContextMenu )
{
- TX_ENTRY
+ TX_ENTRY
if ( mOutstandingPopup ) {
- mOutstandingPopup->close();
-
- //Delete/Clear permanent data until current popup gets deleted
- mPermanentData->setParent( mOutstandingPopup );
- //Generate new permanent data for future popups
- mPermanentData = new MpPopupHandlerPermanentData( this );
+ if ( onlyContextMenu ) {
+ if ( mOutstandingPopup->objectName() == KContextMenu ) {
+ mOutstandingPopup->close();
+ mPermanentData->clear();
+ }
+ }
+ else {
+ mOutstandingPopup->close();
+ //Delete/Clear permanent data until current popup gets deleted
+ mPermanentData->setParent( mOutstandingPopup );
+ //Generate new permanent data for future popups
+ mPermanentData = new MpPopupHandlerPermanentData( this );
+ }
}
else {
mPermanentData->clear();
}
-
TX_EXIT
}
/*!
- TODO: Workaround for HbListView multiple events: longPress and activated. Remove once HbListView get fixed (wk16)
- */
-bool MpCollectionPopupHandler::showingPopup()
-{
- return mOutstandingPopup;
-}
-
-/*!
Slot to be called when an option has been selected from default context menu.
*/
void MpCollectionPopupHandler::defaultContextMenuOptionSelected( HbAction *selectedAction )
@@ -339,16 +434,16 @@
QString objectName = selectedAction->objectName();
QList<int> selection;
selection.append( mPermanentData->mContextMenuIndex );
- if ( objectName == "open" ) {
+ if ( objectName == KOpen ) {
mView->openItem( mPermanentData->mContextMenuIndex );
}
- if ( objectName == "add" ) {
+ if ( objectName == KAdd ) {
launchAddToPlaylistDialog( selection );
}
- else if ( objectName == "delete" ) {
+ else if ( objectName == KDelete ) {
requestDelete( selection );
}
- else if ( objectName == "rename playlist" ) {
+ else if ( objectName == KRenamePlayList ) {
QString currentName;
currentName = mMpEngine->collectionData()->itemData(
mPermanentData->mContextMenuIndex, MpMpxCollectionData::Title );
@@ -383,7 +478,7 @@
if ( selectedAction ) {
QString objectName = selectedAction->objectName();
- if ( objectName == "new" ) {
+ if ( objectName == KNew ) {
QStringList playlists;
mMpEngine->findPlaylists( playlists );
queryNewPlaylistName( playlists, SLOT( handleAddToPlaylistGetTextFinished( HbAction* ) ) );
@@ -413,7 +508,7 @@
if ( selectedAction ) {
QString objectName = selectedAction->objectName();
- if ( objectName == "ok" ) {
+ if ( objectName == KOk ) {
QString newPlaylistName = dialog->value().toString();
if ( newPlaylistName.length() ) {
//Create new playlist with given name
@@ -456,7 +551,7 @@
if ( selectedAction ) {
QString objectName = selectedAction->objectName();
- if ( objectName == "ok" ) {
+ if ( objectName == KOk ) {
QString newPlaylistName = dialog->value().toString();
if ( newPlaylistName.length() ) {
if ( newPlaylistName != mPermanentData->mOriginalName ) {
@@ -490,7 +585,7 @@
if ( selectedAction ) {
QString objectName = selectedAction->objectName();
- if ( objectName == "ok" ) {
+ if ( objectName == KOk ) {
QString newPlaylistName = dialog->value().toString();
if ( newPlaylistName.length() ) {
if ( newPlaylistName != mPermanentData->mOriginalName ) {
@@ -523,7 +618,7 @@
if ( selectedAction ) {
QString objectName = selectedAction->objectName();
- if ( objectName == "ok" ) {
+ if ( objectName == KOk ) {
QModelIndexList selectedModelIndexes;
selectedModelIndexes = dialog->selectedModelIndexes();
if ( selectedModelIndexes.count() ) {
@@ -556,7 +651,7 @@
if ( selectedAction ) {
QString objectName = selectedAction->objectName();
- if ( objectName == "ok" ) {
+ if ( objectName == KOk ) {
QModelIndexList selectedModelIndexes;
selectedModelIndexes = dialog->selectedModelIndexes();
if ( selectedModelIndexes.count() ) {
@@ -586,7 +681,7 @@
if ( selectedAction ) {
QString objectName = selectedAction->objectName();
- if ( objectName == "ok" ) {
+ if ( objectName == KOk ) {
QModelIndexList selectedModelIndexes;
selectedModelIndexes = dialog->selectedModelIndexes();
if ( selectedModelIndexes.count() ) {
@@ -621,7 +716,7 @@
if ( selectedAction ) {
QString objectName = selectedAction->objectName();
- if ( objectName == "ok" ) {
+ if ( objectName == KOk ) {
QString newPlaylistName = dialog->value().toString();
if ( newPlaylistName.length() ) {
//Store the new playlist name and query for the items to be added
@@ -656,7 +751,7 @@
if ( selectedAction ) {
QString objectName = selectedAction->objectName();
- if ( objectName == "ok" ) {
+ if ( objectName == KOk ) {
QList<int> selection;
QModelIndexList selectedModelIndexes;
selectedModelIndexes = dialog->selectedModelIndexes();
@@ -706,7 +801,7 @@
if ( selectedAction ) {
QString objectName = selectedAction->objectName();
- if ( objectName == "ok" ) {
+ if ( objectName == KOk ) {
mMpEngine->deleteSongs( mPermanentData->mSelectedItems );
}
selectedAction->setEnabled( false );
@@ -718,6 +813,59 @@
}
/*!
+ Slot called upon notification from MpEngine indicating start of
+ deleting process.
+ */
+void MpCollectionPopupHandler::handleDeleteStarted( TCollectionContext context, int count )
+{
+ TX_ENTRY
+ if ( context == ECollectionContextPlaylistSongs ) {
+ if (count >= KSongsToDisplayProgressDlg) { //show progress dialog if removing more than 100 songs
+ launchProgressDialog( "txt_mus_info_removing_songs" );
+ }
+ }
+ else if (context != ECollectionContextPlaylists ) { //no progress dialog for delete playlist
+ launchProgressDialog( "txt_mus_info_deleting" );
+ }
+ TX_EXIT
+}
+
+/*!
+ Slot called upon notification from MpEngine indicating 'count' songs are going to be added.
+ */
+void MpCollectionPopupHandler::handleAddingSongs( int count )
+{
+ TX_ENTRY
+ if ( count >= KSongsToDisplayProgressDlg )
+ {
+ HbProgressDialog *addSongsWaitNote = new HbProgressDialog( HbProgressDialog::WaitDialog );
+ connect( addSongsWaitNote, SIGNAL( cancelled() ), mMpEngine, SLOT( cancelCollectionRequest() ) );
+ addSongsWaitNote->setModal( true );
+ addSongsWaitNote->setText( hbTrId( "txt_mus_info_adding_songs" ) );
+ addSongsWaitNote->setObjectName( KProgressDialog );
+ addSongsWaitNote->setAttribute( Qt::WA_DeleteOnClose );
+ setOutstandingPopup( addSongsWaitNote );
+ addSongsWaitNote->show();
+ }
+ TX_EXIT
+}
+
+/*!
+ Slot called upon notification from MpEngine indicating end of
+ deleting or adding process.
+ */
+void MpCollectionPopupHandler::handleOperationEnded( bool success )
+{
+ TX_ENTRY
+ Q_UNUSED( success );
+ if ( mOutstandingPopup && ( mOutstandingPopup->objectName() == KProgressDialog ) ) {
+ HbProgressDialog *dialog = qobject_cast<HbProgressDialog *>( mOutstandingPopup );
+ dialog->cancel();
+ }
+ TX_EXIT
+}
+
+/*!
Slot to be called when a popup is getting closed. Usefull when a dialog is closed before it finishes
(dialog not closed by a direct user action).
*/
@@ -768,11 +916,7 @@
void MpCollectionPopupHandler::launchAddToPlaylistDialog( QList<int> &selection )
{
TX_ENTRY
- if (!mView->isActivated()) {
- mPermanentData->clear();
- return;
- }
-
+
QStringList playlists;
mPermanentData->mSelectedItems = selection;
mMpEngine->findPlaylists( playlists );
@@ -785,11 +929,12 @@
dialog->setHeadingWidget(new HbLabel( hbTrId( "txt_mus_title_select_playlist" ) ) );
dialog->clearActions();
action = new HbAction( hbTrId( "txt_mus_button_new" ) );
- action->setObjectName( "new" );
+ action->setObjectName( KNew );
dialog->addAction( action );
action = new HbAction( hbTrId( "txt_common_button_cancel" ) );
- action->setObjectName( "cancel" );
+ action->setObjectName( KCancel );
dialog->addAction( action );
+ dialog->setObjectName( KAddToPlaylistSelectionDialog );
dialog->setAttribute( Qt::WA_DeleteOnClose );
setOutstandingPopup( dialog );
dialog->open( this, SLOT( handleAddToPlaylistDialogFinished( HbAction* ) ) );
@@ -831,11 +976,6 @@
const char *handler )
{
TX_ENTRY
- if ( !mView->isActivated() ) {
- mPermanentData->clear();
- return;
- }
-
HbAction *action;
HbInputDialog *dialog = new HbInputDialog();
dialog->setPromptText( label );
@@ -843,11 +983,12 @@
dialog->setValue( text );
dialog->clearActions();
action = new HbAction( hbTrId( "txt_common_button_ok" ) );
- action->setObjectName( "ok" );
+ action->setObjectName( KOk );
dialog->addAction( action );
action = new HbAction( hbTrId( "txt_common_button_cancel" ) );
- action->setObjectName( "cancel" );
+ action->setObjectName( KCancel );
dialog->addAction( action );
+ dialog->setObjectName( KInputTextDialog );
dialog->setAttribute( Qt::WA_DeleteOnClose );
setOutstandingPopup( dialog );
dialog->open( this, handler );
@@ -866,10 +1007,7 @@
{
TX_ENTRY
- if ( !mView->isActivated() ) {
- mPermanentData->clear();
- return;
- }
+ connectExternalEvents();
HbAction *action;
HbSelectionDialog *dialog = new HbSelectionDialog();
@@ -878,11 +1016,12 @@
dialog->setModel( model );
dialog->clearActions();
action = new HbAction( hbTrId( "txt_common_button_ok" ) );
- action->setObjectName( "ok" );
+ action->setObjectName( KOk );
dialog->addAction( action );
action = new HbAction( hbTrId( "txt_common_button_cancel" ) );
- action->setObjectName( "cancel" );
+ action->setObjectName( KCancel );
dialog->addAction( action );
+ dialog->setObjectName( KGetModelIndexesListDialog );
dialog->setAttribute( Qt::WA_DeleteOnClose );
setOutstandingPopup( dialog );
dialog->open( this, handler );
@@ -898,10 +1037,6 @@
{
TX_ENTRY
- if ( !mView->isActivated() ) {
- return;
- }
-
HbListView *listView = new HbListView();
listView->setItemRecycling( true );
listView->setScrollingStyle( HbListView::PanOrFlick );
@@ -931,6 +1066,7 @@
HbAction *action;
action = new HbAction( hbTrId( "txt_common_button_ok" ) );
dialog->addAction( action );
+ dialog->setObjectName( KArrangeSongsDialog );
dialog->setAttribute( Qt::WA_DeleteOnClose );
setOutstandingPopup(dialog);
dialog->open( this, SLOT( handleArrangeSongs( HbAction* ) ) );
@@ -949,6 +1085,7 @@
QString message;
mPermanentData->mSelectedItems = selection;
bool needsConfirmation = true;
+ connectExternalEvents();
switch ( mMpEngine->collectionData()->context() ) {
case ECollectionContextAllSongs:
@@ -982,11 +1119,6 @@
}
if ( needsConfirmation ) {
- if ( !mView->isActivated() ) {
- mPermanentData->clear();
- return;
- }
-
HbAction *action;
HbMessageBox *dialog = new HbMessageBox( HbMessageBox::MessageTypeQuestion );
@@ -994,11 +1126,12 @@
dialog->setTimeout( HbPopup::NoTimeout );
dialog->clearActions();
action = new HbAction( hbTrId( "txt_common_button_yes" ) );
- action->setObjectName( "ok" );
+ action->setObjectName( KOk );
dialog->addAction( action );
action = new HbAction( hbTrId( "txt_common_button_no" ) );
- action->setObjectName( "cancel" );
+ action->setObjectName( KCancel );
dialog->addAction( action );
+ dialog->setObjectName( KRequestDeleteMessageBox );
dialog->setAttribute( Qt::WA_DeleteOnClose );
setOutstandingPopup( dialog );
dialog->open( this, SLOT( handleRequestDelete( HbAction* ) ) );
@@ -1007,56 +1140,37 @@
TX_EXIT
}
-
-//------------------------------------------------------------------
-// MpPopupHandlerPermanentData
-//------------------------------------------------------------------
/*!
- Constructs the popup handler permanent data.
+ \internal
+ Launches a waiting progress note.
+ \a content String id to display in the dialog.
*/
-MpCollectionPopupHandler::MpPopupHandlerPermanentData::MpPopupHandlerPermanentData( QObject *parent )
- : QObject( parent ),
- mIsolatedCollectionData( 0 ),
- mAbstractItemModel( 0 ),
- mContextMenuIndex( KNullIndex )
+void MpCollectionPopupHandler::launchProgressDialog( const char *id )
{
- TX_ENTRY
- mSelectedItems.clear();
- mOriginalName.clear();
- TX_EXIT
-}
-
-/*!
- Destructs the popup handler permanent data.
- */
-MpCollectionPopupHandler::MpPopupHandlerPermanentData::~MpPopupHandlerPermanentData()
-{
- TX_ENTRY
- clear();
- TX_EXIT
+ HbProgressDialog *deleteProgressNote = new HbProgressDialog( HbProgressDialog::WaitDialog );
+ connect( deleteProgressNote, SIGNAL( cancelled() ), mMpEngine, SLOT( cancelCollectionRequest() ) );
+ deleteProgressNote->setModal( true );
+ deleteProgressNote->setDismissPolicy( HbPopup::NoDismiss );
+ deleteProgressNote->setText( hbTrId( id ) );
+ deleteProgressNote->setObjectName( KProgressDialog );
+ deleteProgressNote->setAttribute( Qt::WA_DeleteOnClose );
+ setOutstandingPopup( deleteProgressNote );
+ deleteProgressNote->show();
}
/*!
\internal
- Clears all permanent data.
- */
-void MpCollectionPopupHandler::MpPopupHandlerPermanentData::clear()
+ Connects MpEngine signals on demand in order to save time at start up.
+ */
+void MpCollectionPopupHandler::connectExternalEvents()
{
- TX_ENTRY
- mSelectedItems.clear();
- mOriginalName.clear();
- mContextMenuIndex = KNullIndex;
- if ( mIsolatedCollectionData ) {
- MpEngineFactory::sharedEngine()->releaseIsolatedCollection();
- mIsolatedCollectionData = 0;
+ if ( !mExternalEventsConnected ) {
+ connect( mMpEngine, SIGNAL( deleteStarted( TCollectionContext, int ) ),
+ this, SLOT( handleDeleteStarted( TCollectionContext, int ) ) );
+ connect( mMpEngine, SIGNAL( songsDeleted( bool ) ), this, SLOT( handleOperationEnded( bool ) ) );
+ connect( mMpEngine, SIGNAL( aboutToAddSongs( int ) ), this, SLOT( handleAddingSongs( int ) ) );
+ connect( mMpEngine, SIGNAL( playlistSaved( bool ) ), this, SLOT( handleOperationEnded( bool ) ) );
+ mExternalEventsConnected = true;
}
- if ( mAbstractItemModel ) {
- delete mAbstractItemModel;
- mAbstractItemModel = 0;
- }
- //clearing any child Objects.
- foreach (QObject* child, children()) {
- child->deleteLater();
- }
- TX_EXIT
}
+
--- a/mpviewplugins/mpcollectionviewplugin/src/mpcollectionview.cpp Fri Jun 11 13:36:36 2010 +0300
+++ b/mpviewplugins/mpcollectionviewplugin/src/mpcollectionview.cpp Wed Jun 23 18:10:13 2010 +0300
@@ -27,8 +27,6 @@
#include <hbmenu.h>
#include <hbmessagebox.h>
#include <hblabel.h>
-#include <QTranslator>
-#include <QLocale>
#include <hblistview.h>
#include <hbscrollbar.h>
@@ -49,8 +47,21 @@
const char*MUSIC_COLLECTION_DOCML = ":/docml/musiccollection.docml";
-const char*EFFECT_SELECT = ":/effects/select.fxml";
-const char*EFFECT_SELECT_END = ":/effects/select_end.fxml";
+
+const char*CONTAINER_EFFECT_GROUP = "mpcontainer";
+
+const char*SHOW_EFFECT = "show";
+const char*HIDE_EFFECT = "hide";
+const char*SHOW_BACK_EFFECT = "show_back";
+const char*HIDE_BACK_EFFECT = "hide_back";
+
+const char*SHOW_EFFECT_RESOURCE_NAME = "view_show_normal";
+const char*HIDE_EFFECT_RESOURCE_NAME = "view_hide_normal";
+const char*SHOW_BACK_EFFECT_RESOURCE_NAME = "view_show_back";
+const char*HIDE_BACK_EFFECT_RESOURCE_NAME = "view_hide_back";
+
+const char*EFFECT_TARGET_SNAPSHOT = "snapshot";
+const char*EFFECT_TARGET_CONTAINER = "container";
const int KMainToolBarAll = 0;
const int KMainToolBarArtists = 1;
@@ -99,8 +110,6 @@
mMainToolBar( 0 ),
mPlaylistToolBar( 0 ),
mSnapshot( 0 ),
- mMpTranslator( 0 ),
- mCommonTranslator( 0 ),
mActivationWaiting( false ),
mMpPopupHandler( 0 ),
mUsbBlocked( false )
@@ -133,8 +142,6 @@
delete mContainerFactory;
delete mCollectionDataModel;
delete mDocumentLoader;
- delete mMpTranslator;
- delete mCommonTranslator;
TX_EXIT
}
@@ -145,25 +152,6 @@
{
TX_ENTRY
- //Load musicplayer and common translators
- QString lang = QLocale::system().name();
- QString path = QString( "z:/resource/qt/translations/" );
- bool translatorLoaded = false;
-
- mMpTranslator = new QTranslator( this );
- translatorLoaded = mMpTranslator->load( path + "musicplayer_" + lang );
- TX_LOG_ARGS( "Loading translator ok=" << translatorLoaded );
- if ( translatorLoaded ) {
- qApp->installTranslator( mMpTranslator );
- }
-
- mCommonTranslator = new QTranslator( this );
- translatorLoaded = mCommonTranslator->load( path + "common_" + lang );
- TX_LOG_ARGS( "Loading common translator ok=" << translatorLoaded );
- if ( translatorLoaded ) {
- qApp->installTranslator( mCommonTranslator );
- }
-
mWindow = mainWindow();
// Create softkey actions
@@ -219,29 +207,12 @@
setWidget( mMainContainer );
- HbEffect::add( QString( "container" ),
- QString( ":/effects/slide_out_to_left.fxml" ),
- QString( "slide_out_to_left" ) );
-
- HbEffect::add( QString( "container" ),
- QString( ":/effects/slide_out_to_right.fxml" ),
- QString( "slide_out_to_right" ) );
-
- HbEffect::add( QString( "container" ),
- QString( ":/effects/slide_out_to_top.fxml" ),
- QString( "slide_out_to_top" ) );
+ HbEffect::add(
+ QStringList() << CONTAINER_EFFECT_GROUP << CONTAINER_EFFECT_GROUP << CONTAINER_EFFECT_GROUP << CONTAINER_EFFECT_GROUP,
+ QStringList() << SHOW_EFFECT_RESOURCE_NAME << HIDE_EFFECT_RESOURCE_NAME << SHOW_BACK_EFFECT_RESOURCE_NAME << HIDE_BACK_EFFECT_RESOURCE_NAME,
+ QStringList() << SHOW_EFFECT << HIDE_EFFECT << SHOW_BACK_EFFECT << HIDE_BACK_EFFECT);
- HbEffect::add( QString( "container" ),
- QString( ":/effects/slide_in_to_right_and_fade_in.fxml" ),
- QString( "slide_in_to_right_and_fade_in" ) );
- HbEffect::add( QString( "container" ),
- QString( ":/effects/slide_in_to_left_and_fade_in.fxml" ),
- QString( "slide_in_to_left_and_fade_in" ) );
-
- HbEffect::add( QString( "container" ),
- QString( ":/effects/slide_in_to_top_and_fade_in.fxml" ),
- QString( "slide_in_to_top_and_fade_in" ) );
}
else {
TX_LOG_ARGS( "Error: invalid xml file." );
@@ -262,7 +233,7 @@
if ( MpSettingsManager::firstStartup() ) {
mActivationWaiting = true;
- mMpEngine->refreshLibrary();
+ mMpEngine->refreshLibrary( true );
}
TX_EXIT
@@ -301,8 +272,8 @@
{
TX_ENTRY
mActivated = false;
-
- cancelOngoingOperation();
+
+ closeActiveDialog( true );
setNavigationAction( 0 );
TX_EXIT
@@ -360,6 +331,10 @@
if ( mActivated ) {
setSoftkey();
}
+
+ // Close any possible popup already launched with previous context
+ closeActiveDialog();
+
updateToolBar();
updateMenu();
@@ -471,9 +446,8 @@
break;
}
}
- // TODO: "showingPopup()" used as workaround for HbListView multiple events: longPress and activated.
- // Remove once HbListView get fixed (wk16)
- if ( doOpen && !mMpPopupHandler->showingPopup() ) {
+
+ if ( doOpen ) {
if ( mCollectionContext == ECollectionContextArtistAlbums ) {
if ( (mCollectionData->count() > 1) && (index == 0) ) {
mMpEngine->openCollectionItem( index );
@@ -515,11 +489,7 @@
void MpCollectionView::playAlbumSongs( int albumIndex, int songIndex )
{
TX_ENTRY_ARGS( "albumIndex=" << albumIndex << "songIndex=" << songIndex );
- // TODO: "showingPopup()" used as workaround for HbListView multiple events: longPress and activated.
- // Remove once HbListView get fixed (wk16)
- if ( !mMpPopupHandler->showingPopup() ) {
- mMpEngine->playAlbumSongs(albumIndex, songIndex);
- }
+ mMpEngine->playAlbumSongs(albumIndex, songIndex);
TX_EXIT
}
@@ -613,7 +583,7 @@
*/
void MpCollectionView::containerTransitionComplete( const HbEffect::EffectStatus &status )
{
- if ( status.userData == "snapshot_effect" ) {
+ if ( status.userData == EFFECT_TARGET_SNAPSHOT ) {
qobject_cast<QGraphicsView *>( mWindow )->scene()->removeItem( mSnapshot );
mSnapshot->deleteLater();
mSnapshot = 0;
@@ -640,14 +610,6 @@
}
/*!
- Slot to be called when 'Refresh Library' is clicked by the user from the menu.
- */
-void MpCollectionView::refreshLibrary()
-{
- mMpEngine->refreshLibrary();
-}
-
-/*!
Slot to be called when 'Add to playlist' is clicked by the user from the menu.
*/
void MpCollectionView::addToPlaylist()
@@ -777,7 +739,7 @@
TX_ENTRY_ARGS( "blocked=" << blocked );
mUsbBlocked = blocked;
- cancelOngoingOperation();
+ closeActiveDialog();
updateMenu();
if ( mCollectionContext == ECollectionContextPlaylistSongs ) {
@@ -792,7 +754,7 @@
void MpCollectionView::handleLibraryAboutToUpdate()
{
TX_ENTRY
- cancelOngoingOperation();
+ closeActiveDialog();
TX_EXIT
}
@@ -807,7 +769,7 @@
activateView();
}
else {
- cancelOngoingOperation();
+ closeActiveDialog();
//Update cache, even if collection is in background.
//Library refreshing could be triggered at any point due USB/MMC events.
@@ -997,7 +959,7 @@
}
menuAction = myMenu->addAction( hbTrId( "txt_mus_opt_refresh_library" ) );
if ( !mUsbBlocked ) {
- connect( menuAction, SIGNAL( triggered() ), this, SLOT( refreshLibrary() ) );
+ connect( menuAction, SIGNAL( triggered() ), mMpEngine, SLOT( refreshLibrary() ) );
}
else {
menuAction->setDisabled( true );
@@ -1008,7 +970,7 @@
case ECollectionContextAlbums:
menuAction = myMenu->addAction( hbTrId( "txt_mus_opt_refresh_library" ) );
if ( !mUsbBlocked ) {
- connect( menuAction, SIGNAL( triggered() ), this, SLOT( refreshLibrary() ) );
+ connect( menuAction, SIGNAL( triggered() ), mMpEngine, SLOT( refreshLibrary() ) );
}
else {
menuAction->setDisabled( true );
@@ -1081,7 +1043,7 @@
case ECollectionContextAlbums:
menuAction = myMenu->addAction( hbTrId( "txt_mus_opt_refresh_library" ) );
if ( !mUsbBlocked ) {
- connect( menuAction, SIGNAL( triggered() ), this, SLOT( refreshLibrary() ) );
+ connect( menuAction, SIGNAL( triggered() ), mMpEngine, SLOT( refreshLibrary() ) );
}
else {
menuAction->setDisabled( true );
@@ -1221,58 +1183,40 @@
mWindow->scene()->addItem( mSnapshot );
- if ( ( contextFrom == ECollectionContextAlbums && contextTo == ECollectionContextAlbumsTBone ) ||
- ( contextFrom == ECollectionContextArtists && contextTo == ECollectionContextArtistAlbums ) ||
- ( contextFrom == ECollectionContextArtistAlbums && contextTo == ECollectionContextArtistAlbumsTBone ) ||
- ( contextFrom == ECollectionContextArtistAlbums && contextTo == ECollectionContextArtistAllSongs ) ||
- ( contextFrom == ECollectionContextPlaylists && contextTo == ECollectionContextPlaylistSongs ) ) {
- HbEffect::start( mSnapshot,
- QString( "container" ),
- QString( "slide_out_to_left" ),
- this,
- "containerTransitionComplete",
- QString( "snapshot_effect") );
-
- HbEffect::start( mMainContainer,
- QString( "container" ),
- QString( "slide_in_to_left_and_fade_in" ),
- this,
- "containerTransitionComplete",
- QString( "mainContainer_effect") );
- }
- else if( ( contextFrom == ECollectionContextAlbumsTBone && contextTo == ECollectionContextAlbums ) ||
+ if( ( contextFrom == ECollectionContextAlbumsTBone && contextTo == ECollectionContextAlbums ) ||
( contextFrom == ECollectionContextArtistAlbums && contextTo == ECollectionContextArtists ) ||
( contextFrom == ECollectionContextArtistAlbumsTBone && contextTo == ECollectionContextArtistAlbums ) ||
+ ( contextFrom == ECollectionContextArtistAlbumsTBone && contextTo == ECollectionContextArtists ) ||
( contextFrom == ECollectionContextArtistAllSongs && contextTo == ECollectionContextArtistAlbums ) ||
( contextFrom == ECollectionContextPlaylistSongs && contextTo == ECollectionContextPlaylists ) ) {
HbEffect::start( mSnapshot,
- QString( "container" ),
- QString( "slide_out_to_right" ),
+ QString( CONTAINER_EFFECT_GROUP ),
+ QString( HIDE_BACK_EFFECT ),
this,
"containerTransitionComplete",
- QString( "snapshot_effect") );
+ QString( EFFECT_TARGET_SNAPSHOT) );
HbEffect::start( mMainContainer,
- QString( "container" ),
- QString( "slide_in_to_right_and_fade_in" ),
+ QString( CONTAINER_EFFECT_GROUP ),
+ QString( SHOW_BACK_EFFECT ),
this,
"containerTransitionComplete",
- QString( "mainContainer_effect") );
+ QString( EFFECT_TARGET_CONTAINER) );
}
else {
HbEffect::start( mSnapshot,
- QString( "container" ),
- QString( "slide_out_to_top" ),
+ QString( CONTAINER_EFFECT_GROUP ),
+ QString( HIDE_EFFECT ),
this,
"containerTransitionComplete",
- QString( "snapshot_effect") );
+ QString( EFFECT_TARGET_SNAPSHOT) );
HbEffect::start( mMainContainer,
- QString( "container" ),
- QString( "slide_in_to_top_and_fade_in" ),
+ QString( CONTAINER_EFFECT_GROUP ),
+ QString( SHOW_EFFECT ),
this,
"containerTransitionComplete",
- QString( "mainContainer_effect") );
+ QString( EFFECT_TARGET_CONTAINER ) );
}
}
@@ -1280,11 +1224,9 @@
\internal
Closes any active dialog or menu.
*/
-void MpCollectionView::cancelOngoingOperation()
+void MpCollectionView::closeActiveDialog( bool onlyContextMenu )
{
- if ( mActivated ) {
- mMpPopupHandler->cancelOngoingPopup();
- menu()->close();
- }
+ mMpPopupHandler->cancelOngoingPopup( onlyContextMenu );
+ menu()->close();
}
--- a/mpviewplugins/mpcollectionviewplugin/src/mpsnapshotwidget.cpp Fri Jun 11 13:36:36 2010 +0300
+++ b/mpviewplugins/mpcollectionviewplugin/src/mpsnapshotwidget.cpp Wed Jun 23 18:10:13 2010 +0300
@@ -39,6 +39,7 @@
mSnapshot(0)
{
TX_ENTRY_ARGS( " Parent=" << (void *)parent )
+ setFlag( QGraphicsItem::ItemHasNoContents, false );
TX_EXIT
}
--- a/mpviewplugins/mpdetailsviewplugin/inc/mpdetailssharedialog.h Fri Jun 11 13:36:36 2010 +0300
+++ b/mpviewplugins/mpdetailsviewplugin/inc/mpdetailssharedialog.h Wed Jun 23 18:10:13 2010 +0300
@@ -21,7 +21,7 @@
#include <HbDialog>
#include <QList>
-#include <QSSLError>
+#include <QSsLError>
#include "mpsharedata.h"
class QGraphicsWebView;
--- a/mpviewplugins/mpdetailsviewplugin/inc/mpdetailsview.h Fri Jun 11 13:36:36 2010 +0300
+++ b/mpviewplugins/mpdetailsviewplugin/inc/mpdetailsview.h Wed Jun 23 18:10:13 2010 +0300
@@ -37,7 +37,6 @@
class HbDocumentLoader;
class HbListWidget;
-class QTranslator;
class QGraphicsLinearLayout;
class HbProgressBar;
@@ -130,10 +129,6 @@
HbPushButton *mButton;
HbProgressBar *mInspireMeProgressBar;
-
- QTranslator *mMpTranslator; // Own
- QTranslator *mCommonTranslator; // Own
-
MpQueryManager* mMpQueryManager; // Own
bool mInspireMeQueryOngoing;
--- a/mpviewplugins/mpdetailsviewplugin/mpdetailsviewplugin.pro Fri Jun 11 13:36:36 2010 +0300
+++ b/mpviewplugins/mpdetailsviewplugin/mpdetailsviewplugin.pro Wed Jun 23 18:10:13 2010 +0300
@@ -14,47 +14,46 @@
# Description:
#
-symbian:TARGET.UID3 = 0x2002D0AA
-
TEMPLATE = lib
CONFIG += hb qt ecomplugin mobility SHARE_FUNC_ENABLED
QT += webkit \
- network \
- xml
+ network \
+ xml
TARGET = mpdetailsviewplugin
MOBILITY += bearer systeminfo
+symbian: {
+ TARGET.UID3 = 0x2002D0AA
+ TARGET.CAPABILITY = All -TCB
+ TARGET.EPOCALLOWDLLDATA = 1
+}
SERVICE.INTERFACE_NAME = org.nokia.mmdt.MpxViewPlugin/1.0
SERVICE.CONFIGURATION = ""
-TARGET.CAPABILITY = All -TCB
-
DEPENDPATH += .
INCLUDEPATH += . \
- inc \
- ../../inc
+ inc \
+ ../../inc
INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
-LIBS += -lmpxviewframeworkqt.dll \
- -lmpxplaybackutility.dll \
- -lmpxcommon.dll \
- -lthumbnailmanagerqt.dll \
- -lmpsettingsmanager.dll \
- -lmpengine.dll \
- -lmpdata.dll
-
-symbian:TARGET.EPOCALLOWDLLDATA = 1
+LIBS += -lmpxviewframeworkqt \
+ -lmpxplaybackutility \
+ -lmpxcommon \
+ -lthumbnailmanagerqt \
+ -lmpsettingsmanager \
+ -lmpengine \
+ -lmpdata
# Input
+HEADERS += ../../inc/mpviewbase.h \
+ inc/mpdetailsviewplugin.h \
+ inc/mpdetailsview.h \
+ inc/mpquerymanager.h
+
SOURCES += src/mpdetailsviewplugin.cpp \
src/mpdetailsview.cpp \
src/mpquerymanager.cpp
-HEADERS = ../../inc/mpviewbase.h \
- inc/mpdetailsviewplugin.h \
- inc/mpdetailsview.h \
- inc//mpquerymanager.h
-
# Sharing functionality
CONFIG(SHARE_FUNC_ENABLED) {
SOURCES += src/mpdetailssharedialog.cpp src/mpsharedata.cpp
@@ -66,3 +65,4 @@
}
RESOURCES += resources/mpdetailsviewresources.qrc
+
--- a/mpviewplugins/mpdetailsviewplugin/src/mpdetailsview.cpp Fri Jun 11 13:36:36 2010 +0300
+++ b/mpviewplugins/mpdetailsviewplugin/src/mpdetailsview.cpp Wed Jun 23 18:10:13 2010 +0300
@@ -21,8 +21,6 @@
#include <QDomElement>
#include <QList>
#include <QFile>
-#include <QTranslator>
-#include <QLocale>
#include <QGraphicsLinearLayout>
#include <QSizeF>
@@ -78,8 +76,6 @@
mDetailList(0),
mInspireList(0),
mInspireMeProgressBar(0),
- mMpTranslator( 0 ),
- mCommonTranslator( 0 ),
mMpQueryManager( 0 ),
mInspireMeQueryOngoing( false ),
mInspireMeQueryRendered( false ),
@@ -174,8 +170,6 @@
TX_ENTRY
delete mSoftKeyBack;
delete mDocumentLoader;
- delete mMpTranslator;
- delete mCommonTranslator;
delete mMpQueryManager;
#ifdef SHARE_FUNC_ENABLED
@@ -192,25 +186,6 @@
{
TX_ENTRY
- //Load musicplayer and common translators
- QString lang = QLocale::system().name();
- QString path = QString( "z:/resource/qt/translations/" );
- bool translatorLoaded = false;
-
- mCommonTranslator = new QTranslator( this );
- translatorLoaded = mCommonTranslator->load( path + "common_" + lang );
- TX_LOG_ARGS( "Loading common translator ok=" << translatorLoaded );
- if ( translatorLoaded ) {
- qApp->installTranslator( mCommonTranslator );
- }
-
- mMpTranslator = new QTranslator( this );
- translatorLoaded = mMpTranslator->load( path + "musicplayer_" + lang );
- TX_LOG_ARGS( "Loading translator ok=" << translatorLoaded );
- if ( translatorLoaded ) {
- qApp->installTranslator( mMpTranslator );
- }
-
mSoftKeyBack = new HbAction( Hb::BackNaviAction, this );
mMpEngine = MpEngineFactory::sharedEngine();
--- a/mpviewplugins/mpmediawallviewplugin/inc/mpalbumcoverwidget.h Fri Jun 11 13:36:36 2010 +0300
+++ b/mpviewplugins/mpmediawallviewplugin/inc/mpalbumcoverwidget.h Wed Jun 23 18:10:13 2010 +0300
@@ -17,23 +17,26 @@
#ifndef MPALBUMCOVERWIDGET_H
#define MPALBUMCOVERWIDGET_H
-#include <QGraphicsWidget>
#include <QPixmap>
+#include <QGesture>
+#include <hbwidget.h>
#include <hbicon.h>
-class MpAlbumCoverWidget : public QGraphicsWidget
+class MpAlbumCoverWidget : public HbWidget
{
Q_OBJECT
public:
- MpAlbumCoverWidget( QGraphicsItem *parent );
+ MpAlbumCoverWidget( QGraphicsItem *parent = 0 );
+ virtual ~MpAlbumCoverWidget();
void setIcon(const HbIcon &icon );
void setDefaultIcon( const HbIcon &icon );
void paint( QPainter *painter, const QStyleOptionGraphicsItem *option,
QWidget *widget = 0 );
+ void gestureEvent(QGestureEvent *event);
signals:
--- a/mpviewplugins/mpmediawallviewplugin/inc/mpmediawallview.h Fri Jun 11 13:36:36 2010 +0300
+++ b/mpviewplugins/mpmediawallviewplugin/inc/mpmediawallview.h Wed Jun 23 18:10:13 2010 +0300
@@ -64,6 +64,7 @@
void showTrackList();
void dismissListClosingAnimation();
void listItemActivated( const QModelIndex &index );
+ void fetchAlbumSongs(QModelIndex index);
private:
void setUpMediaWallWidget();
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mpviewplugins/mpmediawallviewplugin/inc/mpreflectioneffect.h Wed Jun 23 18:10:13 2010 +0300
@@ -0,0 +1,41 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: reflection effect for Music Player Media Wall.
+*
+*/
+#ifndef MPREFLECTIONEFFECT_H
+#define MPREFLECTIONEFFECT_H
+
+#include <QGraphicsEffect>
+
+class MpReflectionEffect: public QGraphicsEffect
+{
+ Q_OBJECT
+
+public:
+ MpReflectionEffect(QObject *parent = 0);
+ ~MpReflectionEffect();
+
+ QRectF boundingRectFor(const QRectF &rect) const;
+
+protected:
+ void draw(QPainter *painter);
+
+private:
+ Q_DISABLE_COPY(MpReflectionEffect)
+};
+
+#endif // MPREFLECTIONEFFECT_H
+
+// EOF
--- a/mpviewplugins/mpmediawallviewplugin/inc/mptracklistwidget.h Fri Jun 11 13:36:36 2010 +0300
+++ b/mpviewplugins/mpmediawallviewplugin/inc/mptracklistwidget.h Wed Jun 23 18:10:13 2010 +0300
@@ -20,9 +20,9 @@
#include <QGesture>
#include <hbwidget.h>
-#include <hblistview.h>
class HbFrameItem;
+class HbListView;
class MpTrackListWidget : public HbWidget
{
@@ -31,25 +31,24 @@
public:
MpTrackListWidget( QGraphicsItem *parent = 0 );
- void resizeEvent(QGraphicsSceneResizeEvent *event);
- void paint( QPainter *painter, const QStyleOptionGraphicsItem *option,
- QWidget *widget = 0 );
+ virtual ~MpTrackListWidget();
HbListView *list();
signals:
- void close();
+ void closed();
private:
+ void resizeEvent(QGraphicsSceneResizeEvent *event);
+ void mousePressEvent( QGraphicsSceneMouseEvent *event );
+ void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
void gestureEvent(QGestureEvent *event);
QSwipeGesture::SwipeDirection swipeAngleToDirection( int angle );
- void mousePressEvent( QGraphicsSceneMouseEvent *event );
- void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
private:
- HbListView *mList;
- HbFrameItem *mFrameItem;
+ HbListView *mList; // own - parented
+ HbFrameItem *mFrameItem; // own - parented
};
#endif // MPTRACKLISTWIDGET_H
--- a/mpviewplugins/mpmediawallviewplugin/mpmediawallviewplugin.pro Fri Jun 11 13:36:36 2010 +0300
+++ b/mpviewplugins/mpmediawallviewplugin/mpmediawallviewplugin.pro Wed Jun 23 18:10:13 2010 +0300
@@ -14,44 +14,45 @@
# Description:
#
-symbian:TARGET.UID3 = 0x10207C94
-
TEMPLATE = lib
CONFIG += hb qt ecomplugin
HB += hbfeedback
TARGET = mpmediawallviewplugin
+symbian: {
+ TARGET.UID3 = 0x10207C94
+ TARGET.CAPABILITY = All -TCB
+ TARGET.EPOCALLOWDLLDATA = 1
+}
SERVICE.INTERFACE_NAME = org.nokia.mmdt.MpxViewPlugin/1.0
SERVICE.CONFIGURATION = "<i>EMPXViewPluginPriorityNormal</i>"
-TARGET.CAPABILITY = All -TCB
-
DEPENDPATH += .
INCLUDEPATH += . \
- inc \
- ../../inc \
- ../../mpserviceplugins/inc
-
+ inc \
+ ../../inc
INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
INCLUDEPATH += $$MW_LAYER_PUBLIC_EXPORT_PATH(hgwidgets)
-LIBS += -lestor.dll \
- -lmpxviewframeworkqt.dll \
- -lganeswidgets.dll \
- -lmpengine \
- -lmpdata.dll
+LIBS += -lestor \
+ -lmpxviewframeworkqt \
+ -lganeswidgets \
+ -lmpengine \
+ -lmpdata
-symbian:TARGET.EPOCALLOWDLLDATA = 1
-
+# Input
HEADERS += ../../inc/mpviewbase.h \
- inc/mpmediawallviewplugin.h \
+ inc/mpmediawallviewplugin.h \
inc/mpmediawallview.h \
- inc/mpmediawalldocumentloader.h \
- inc/mpalbumcoverwidget.h \
- inc/mptracklistwidget.h
+ inc/mpmediawalldocumentloader.h \
+ inc/mpalbumcoverwidget.h \
+ inc/mptracklistwidget.h \
+ inc/mpreflectioneffect.h
SOURCES += src/mpmediawallviewplugin.cpp \
src/mpmediawallview.cpp \
- src/mpmediawalldocumentloader.cpp \
- src/mpalbumcoverwidget.cpp \
- src/mptracklistwidget.cpp
+ src/mpmediawalldocumentloader.cpp \
+ src/mpalbumcoverwidget.cpp \
+ src/mptracklistwidget.cpp \
+ src/mpreflectioneffect.cpp
RESOURCES += resources/mpmediawallviewresources.qrc
+
--- a/mpviewplugins/mpmediawallviewplugin/resources/mediawall.docml Fri Jun 11 13:36:36 2010 +0300
+++ b/mpviewplugins/mpmediawallviewplugin/resources/mediawall.docml Wed Jun 23 18:10:13 2010 +0300
@@ -2,31 +2,33 @@
<hbdocument version="0.9">
<widget name="container" type="HbWidget">
+
<widget name="mediawalContainer" type="HbWidget"/>
- <widget name="controlsContainer" type="HbWidget">
- <contentsmargins bottom="var(hb-param-margin-gene-screen)" left="var(hb-param-margin-gene-screen)" right="var(hb-param-margin-gene-screen)" top="var(hb-param-margin-gene-screen)"/>
- <!-- for some reason we cannot hide the hbtoolbutton, suing a container to be able to hide -->
- <widget name="playPauseButtonContainer" type="HbWidget">
- <widget name="playPauseButton" type="HbToolButton">
- <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
- <sizehint height="expr(var(hb-param-graphic-size-function)+2.0un)" type="FIXED" width="expr(var(hb-param-graphic-size-function)+2.0un)"/>
- </widget>
- </widget>
- <widget name="navigationButton" type="HbToolButton">
+
+ <!-- for some reason we cannot hide the hbtoolbutton, suing a container to be able to hide -->
+ <widget name="playPauseButtonContainer" type="HbWidget">
+ <widget name="playPauseButton" type="HbToolButton">
<sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
- <sizehint height="expr(var(hb-param-graphic-size-function)+2.0un)" type="FIXED" width="expr(var(hb-param-graphic-size-function)+2.0un)"/>
+ <sizehint height="var(hb-param-touch-area-gene-primary-small)" type="FIXED" width="var(hb-param-touch-area-gene-primary-medium)"/>
</widget>
- <layout type="anchor">
- <anchoritem dst="playPauseButtonContainer" dstEdge="LEFT" spacing="0.0" src="" srcEdge="LEFT"/>
- <anchoritem dst="playPauseButtonContainer" dstEdge="TOP" spacing="0.0" src="" srcEdge="TOP"/>
- <anchoritem dst="navigationButton" dstEdge="RIGHT" spacing="0.0" src="" srcEdge="RIGHT"/>
- <anchoritem dst="navigationButton" dstEdge="TOP" spacing="0.0" src="" srcEdge="TOP"/>
- </layout>
+ </widget>
+
+ <widget name="navigationButton" type="HbToolButton">
+ <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
+ <sizehint height="var(hb-param-touch-area-gene-primary-small)" type="FIXED" width="var(hb-param-touch-area-gene-primary-medium)"/>
</widget>
- <layout type="stacked" >
- <stackitem itemname="mediawalContainer"/>
- <stackitem itemname="controlsContainer"/>
+
+ <layout type="anchor" >
+ <anchoritem dst="playPauseButtonContainer" dstEdge="LEFT" spacing="0.0" src="" srcEdge="LEFT"/>
+ <anchoritem dst="playPauseButtonContainer" dstEdge="TOP" spacing="0.0" src="" srcEdge="TOP"/>
+ <anchoritem dst="navigationButton" dstEdge="RIGHT" spacing="0.0" src="" srcEdge="RIGHT"/>
+ <anchoritem dst="navigationButton" dstEdge="TOP" spacing="0.0" src="" srcEdge="TOP"/>
+ <anchoritem dst="mediawalContainer" dstEdge="LEFT" spacing="0.0" src="" srcEdge="LEFT"/>
+ <anchoritem dst="mediawalContainer" dstEdge="TOP" spacing="0.0" src="" srcEdge="TOP"/>
+ <anchoritem dst="mediawalContainer" dstEdge="RIGHT" spacing="0.0" src="" srcEdge="RIGHT"/>
+ <anchoritem dst="mediawalContainer" dstEdge="BOTTOM" spacing="0.0" src="" srcEdge="BOTTOM"/>
</layout>
+
</widget>
<section name="empty">
@@ -48,15 +50,15 @@
<section name="mediaWall">
<widget name="mediawalContainer">
- <widget name="mediaWallWidget" type="HgMediawall">
- <enums name="ItemSizePolicy" value="ItemSizeUserDefined"/>
- <size name="itemSize" width="34.0un" height="34.0un"/>
+ <!-- dont change the media wall widget name it is used on custom css-->
+ <widget name="MPmediaWallWidget" type="HgMediawall">
+ <sizepolicy horizontalPolicy="Ignored" verticalPolicy="Ignored"/>
</widget>
<layout type="linear" orientation="Vertical" >
- <contentsmargins bottom="var(hb-param-margin-view-bottom)" left="var(hb-param-margin-view-left)" right="var(hb-param-margin-view-right)" top="var(hb-param-margin-view-top)"/>
- <linearitem itemname="mediaWallWidget" spacing="0.0"/>
+ <contentsmargins bottom="0" left="0" right="0" top="0"/>
+ <linearitem itemname="MPmediaWallWidget" spacing="0.0"/>
</layout>
</widget>
</section>
-</hbdocument>
\ No newline at end of file
+</hbdocument>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mpviewplugins/mpmediawallviewplugin/resources/mpcustomlistitem.css Wed Jun 23 18:10:13 2010 +0300
@@ -0,0 +1,57 @@
+HbListViewItem[layoutName="mpmwtracklist"][icon-2]{
+ layout:mpmwtracklist-1;
+}
+
+HbListViewItem[layoutName="mpmwtracklist"][!icon-2]{
+ layout:mpmwtracklist-2;
+}
+
+HbListViewItem::text-1[layoutName="mpmwtracklist"]{
+ text-height: var(hb-param-text-height-secondary);
+ font-variant: secondary;
+ pref-width:-1;
+ text-align: Left;
+ size-policy-horizontal: ignored;
+ text-line-count-min:1;
+ text-line-count-max:1;
+ text-wrap-mode:no-wrap;
+}
+
+HbListViewItem::icon-2[layoutName="mpmwtracklist"]{
+ fixed-height: var(hb-param-graphic-size-secondary);
+ fixed-width: var(hb-param-graphic-size-secondary);
+}
+
+HbListViewItem::text-2[layoutName="mpmwtracklist"]{
+ minimum-height: 0.0un;
+ minimum-width: 0.0un;
+ fixed-height: 0.0un;
+ fixed-width: 0.0un;
+ text-line-count-min: 1;
+ text-line-count-max: 1;
+ text-wrap-mode: no-wrap;
+}
+
+HbListViewItem::text-3[layoutName="mpmwtracklist"]{
+ minimum-height: 0.0un;
+ minimum-width: 0.0un;
+ fixed-height: 0.0un;
+ fixed-width: 0.0un;
+ text-line-count-min: 1;
+ text-line-count-max: 1;
+ text-wrap-mode: no-wrap;
+}
+
+HbListViewItem::icon-1[layoutName="mpmwtracklist"]{
+ minimum-height: 0.0un;
+ minimum-width: 0.0un;
+ fixed-height: 0.0un;
+ fixed-width: 0.0un;
+}
+
+HbListViewItem::multiselection-toucharea[layoutName="mpmwtracklist"]{
+ minimum-height: 0.0un;
+ minimum-width: 0.0un;
+ fixed-height: 0.0un;
+ fixed-width: 0.0un;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mpviewplugins/mpmediawallviewplugin/resources/mpcustomlistitem.hblistviewitem.widgetml Wed Jun 23 18:10:13 2010 +0300
@@ -0,0 +1,57 @@
+<hbwidget version="0.1" type="HbListViewItem">
+
+ <!-- mpmwtracklist-1 -->
+ <!--
+ Required items:
+ text-1
+ icon-2
+
+ Items from left to right:
+ <- text-1 ->
+
+ Other:
+ text-1: connected from TOP to item TOP and BOTTOM to item BOTTOM
+ -->
+ <layout name="mpmwtracklist-1" type="mesh">
+
+ <meshitem src="text-1" srcEdge="LEFT" dst="" dstEdge="LEFT" spacing="-var(hb-param-margin-gene-middle-horizontal)"/>
+ <meshitem src="text-1" srcEdge="TOP" dst="" dstEdge="TOP" spacing="-var(hb-param-margin-gene-middle-vertical)"/>
+ <meshitem src="text-1" srcEdge="RIGHT" dst="icon-2" dstEdge="LEFT" spacing="var(hb-param-margin-gene-middle-horizontal)" />
+ <meshitem src="text-1" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" spacing="var(hb-param-margin-gene-middle-vertical)" />
+
+ <meshitem src="icon-2" srcEdge="RIGHT" dst="" dstEdge="RIGHT" spacing="var(hb-param-margin-gene-middle-horizontal)" />
+ <meshitem src="icon-2" srcEdge="CENTERV" dst="text-1" dstEdge="CENTERV" />
+
+ <meshitem src="text-2" srcEdge="LEFT" dst="" dstEdge="LEFT"/>
+ <meshitem src="text-3" srcEdge="LEFT" dst="" dstEdge="LEFT"/>
+ <meshitem src="icon-1" srcEdge="LEFT" dst="" dstEdge="LEFT"/>
+
+ </layout>
+
+ <!-- mpmwtracklist-2 -->
+ <!--
+ Required items:
+ text-1
+
+ Items from left to right:
+ <- text-1 -> icon-2 ->
+
+ Other:
+ icon-2: center aligned with text-1 center
+ text-1: connected from TOP to item TOP and BOTTOM to item BOTTOM
+ -->
+ <layout name="mpmwtracklist-2" type="mesh">
+ <meshitem src="text-1" srcEdge="LEFT" dst="" dstEdge="LEFT" spacing="-var(hb-param-margin-gene-middle-horizontal)"/>
+ <meshitem src="text-1" srcEdge="TOP" dst="" dstEdge="TOP" spacing="-var(hb-param-margin-gene-middle-vertical)"/>
+ <meshitem src="text-1" srcEdge="RIGHT" dst="" dstEdge="RIGHT" spacing="var(hb-param-margin-gene-middle-horizontal)" />
+ <meshitem src="text-1" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" spacing="var(hb-param-margin-gene-middle-vertical)" />
+
+ <meshitem src="text-2" srcEdge="LEFT" dst="" dstEdge="LEFT"/>
+ <meshitem src="text-3" srcEdge="LEFT" dst="" dstEdge="LEFT"/>
+ <meshitem src="icon-1" srcEdge="LEFT" dst="" dstEdge="LEFT"/>
+ <meshitem src="icon-2" srcEdge="LEFT" dst="" dstEdge="LEFT"/>
+ </layout>
+
+
+</hbwidget>
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mpviewplugins/mpmediawallviewplugin/resources/mpcustommediawall.css Wed Jun 23 18:10:13 2010 +0300
@@ -0,0 +1,68 @@
+HgMediawall#MPmediaWallWidget
+{
+ layout:mpmediawallview;
+ front-cover-elevation-factor:0.51;
+}
+
+HgMediawall#MPmediaWallWidget::content
+{
+ size-policy: ignored ignored;
+ left:0un;
+ right:0un;
+ top:0un;
+ bottom:0un;
+ zvalue: 0;
+}
+
+HgMediawall#MPmediaWallWidget::title
+{
+ text-height: var(hb-param-text-height-primary);
+ font-variant:primary;
+ text-align: center center;
+ text-line-count-min:1;
+ text-line-count-max:1;
+ text-wrap-mode:no-wrap;
+ left:-expr(var(hb-param-touch-area-gene-primary-medium)+var(hb-param-margin-gene-left));
+ right:expr(var(hb-param-touch-area-gene-primary-medium)+var(hb-param-margin-gene-right));
+ top:0un;
+ bottom:0un;
+ zvalue: 2;
+}
+
+HgMediawall#MPmediaWallWidget::description
+{
+ text-height: var(hb-param-text-height-secondary);
+ font-variant:secondary;
+ text-align: center center;
+ text-line-count-min:1;
+ text-line-count-max:1;
+ text-wrap-mode:no-wrap;
+ left:-expr(var(hb-param-touch-area-gene-primary-medium)+var(hb-param-margin-gene-left));
+ right:expr(var(hb-param-touch-area-gene-primary-medium)+var(hb-param-margin-gene-right));
+ top:0un;
+ bottom:0un;
+ zvalue: 2;
+}
+
+HgMediawall#MPmediaWallWidget::centeritem
+{
+ size-policy: fixed fixed;
+ fixed-height: 41un;
+ fixed-width: 41un;
+ left:0un;
+ right:0un;
+ top:0un;
+ bottom:0un;
+ zvalue: 2;
+}
+
+HgMediawall#MPmediaWallWidget::scrollbar-horizontal
+{
+ size-policy: preferred preferred;
+ left:0un;
+ right:0un;
+ top:0un;
+ bottom:0un;
+ zvalue: 2;
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mpviewplugins/mpmediawallviewplugin/resources/mpcustommediawall.hgmediawall.widgetml Wed Jun 23 18:10:13 2010 +0300
@@ -0,0 +1,51 @@
+<hbwidget version="0.1" type="HgMediawall">
+
+ <!--
+
+ TOP content
+ ^
+ |
+ title
+ ^
+ |
+ description
+ ^
+ |
+ centeritem
+
+
+scrollbar-horizontal
+ |
+ v
+ BOTTOM content
+
+
+
+ -->
+ <layout name="mpmediawallview" type="mesh">
+
+ <meshitem src="content" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM"/>
+ <meshitem src="content" srcEdge="TOP" dst="" dstEdge="TOP"/>
+ <meshitem src="content" srcEdge="RIGHT" dst="" dstEdge="RIGHT"/>
+ <meshitem src="content" srcEdge="LEFT" dst="" dstEdge="LEFT"/>
+
+ <meshitem src="title" srcEdge="TOP" dst="content" dstEdge="TOP"/>
+ <meshitem src="title" srcEdge="LEFT" dst="content" dstEdge="LEFT"/>
+ <meshitem src="title" srcEdge="RIGHT" dst="content" dstEdge="RIGHT"/>
+
+
+ <meshitem src="description" srcEdge="TOP" dst="title" dstEdge="BOTTOM"/>
+ <meshitem src="description" srcEdge="LEFT" dst="content" dstEdge="LEFT"/>
+ <meshitem src="description" srcEdge="RIGHT" dst="content" dstEdge="RIGHT"/>
+
+
+ <meshitem src="centeritem" srcEdge="TOP" dst="description" dstEdge="BOTTOM"/>
+ <meshitem src="centeritem" srcEdge="CENTERH" dst="content" dstEdge="CENTERH"/>
+
+ <meshitem src="scrollbar-horizontal" srcEdge="BOTTOM" dst="content" dstEdge="BOTTOM"/>
+ <meshitem src="scrollbar-horizontal" srcEdge="RIGHT" dst="content" dstEdge="RIGHT"/>
+ <meshitem src="scrollbar-horizontal" srcEdge="LEFT" dst="content" dstEdge="LEFT"/>
+
+ </layout>
+
+</hbwidget>
--- a/mpviewplugins/mpmediawallviewplugin/resources/mpmediawallviewresources.qrc Fri Jun 11 13:36:36 2010 +0300
+++ b/mpviewplugins/mpmediawallviewplugin/resources/mpmediawallviewresources.qrc Wed Jun 23 18:10:13 2010 +0300
@@ -3,5 +3,13 @@
<qresource prefix="/mediawallviewdocml" >
<file alias="mediawall.docml">mediawall.docml</file>
</qresource>
+
+ <qresource prefix="/css">
+ <file alias="mpcustomlistitem.css">mpcustomlistitem.css</file>
+ <file alias="mpcustomlistitem.hblistviewitem.widgetml">mpcustomlistitem.hblistviewitem.widgetml</file>
+
+ <file alias="mpcustommediawall.css">mpcustommediawall.css</file>
+ <file alias="mpcustommediawall.hgmediawall.widgetml">mpcustommediawall.hgmediawall.widgetml</file>
+ </qresource>
</RCC>
--- a/mpviewplugins/mpmediawallviewplugin/src/mpalbumcoverwidget.cpp Fri Jun 11 13:36:36 2010 +0300
+++ b/mpviewplugins/mpmediawallviewplugin/src/mpalbumcoverwidget.cpp Wed Jun 23 18:10:13 2010 +0300
@@ -17,19 +17,42 @@
#include <QPainter>
#include <QGraphicsSceneMouseEvent>
-#include <hbinstantfeedback.h>
#include "mpalbumcoverwidget.h"
+#include "mpreflectioneffect.h"
+/*!
+ \class MpAlbumCoverWidget
+ \brief Album Cover Widget.
+
+ This widget provides upscaled rendering of images and SVG rendering.
+ Also there is a reflection effect.
+*/
+
+/*!
+ \fn void clicked( )
+
+ This signal is emitted when the item is clicked.
+ */
/*!
Constructs the album cover widget
*/
MpAlbumCoverWidget::MpAlbumCoverWidget( QGraphicsItem *parent ) :
- QGraphicsWidget( parent )
+ HbWidget( parent )
{
+ setFlag( QGraphicsItem::ItemHasNoContents, false );
grabGesture(Qt::TapGesture);
- grabGesture(Qt::SwipeGesture);
+
+ MpReflectionEffect *effect = new MpReflectionEffect(this);
+ setGraphicsEffect(effect);
+}
+
+/*!
+ Destructs the album cover widget.
+ */
+MpAlbumCoverWidget::~MpAlbumCoverWidget()
+{
}
/*!
@@ -58,7 +81,6 @@
{
Q_UNUSED( widget )
Q_UNUSED( option )
- //TODO: add a function to set default album art ,and use default when qicon is NULL,
if ( !mIcon.isNull() ) {
if ( mPixmap.isNull() ) {
mPixmap = mIcon.qicon().pixmap( size().toSize() );
@@ -79,7 +101,6 @@
void MpAlbumCoverWidget::mousePressEvent( QGraphicsSceneMouseEvent *event )
{
if ( event->button() == Qt::LeftButton ) {
- HbInstantFeedback::play( HbFeedback::Basic );
event->accept();
}
else {
@@ -101,4 +122,15 @@
}
}
+/*!
+ \reimp
+ */
+void MpAlbumCoverWidget::gestureEvent(QGestureEvent *event)
+{
+ QGesture* gesture = event->gesture(Qt::TapGesture);
+ if (gesture) {
+ event->accept(Qt::TapGesture);
+ }
+}
+
//EOF
--- a/mpviewplugins/mpmediawallviewplugin/src/mpmediawallview.cpp Fri Jun 11 13:36:36 2010 +0300
+++ b/mpviewplugins/mpmediawallviewplugin/src/mpmediawallview.cpp Wed Jun 23 18:10:13 2010 +0300
@@ -23,8 +23,9 @@
#include <hbapplication.h>
#include <hbscrollbar.h>
#include <hblabel.h>
-#include <hbpushbutton.h>
#include <hbtoolbutton.h>
+#include <hblistview.h>
+#include <hbstyleloader.h>
#include <hgmediawall.h>
@@ -131,7 +132,7 @@
mPlayPauseAction = new HbAction( HbIcon() , QString(), this );
mPlaybackData = MpEngineFactory::sharedEngine()->playbackData();
qobject_cast<HbToolButton*>( widget )->setAction( mPlayPauseAction );
- //we need this widget to hide the play pause button, for soem reaosn it does not want to hide.
+ //we need this widget to hide the play pause button, for some reason it does not want to hide.
mPlayPauseContainer = mDocumentLoader->findWidget( QString( "playPauseButtonContainer" ) );
updatePlayPauseAction();
connect( mPlaybackData, SIGNAL( playbackStateChanged() ),
@@ -162,7 +163,7 @@
}
mAlbumCover = new MpAlbumCoverWidget( this );
- mAlbumCover->setDefaultIcon( HbIcon( "qtg_large_music_album" ) );
+ mAlbumCover->setDefaultIcon( HbIcon( "qtg_large_album_art" ) );
mAlbumCover->hide();
mTrackList = new MpTrackListWidget( this );
@@ -171,9 +172,10 @@
connect(mAlbumCover,SIGNAL(clicked()),this, SLOT(hideTracksList()));
connect(mTrackList->list(), SIGNAL(activated(QModelIndex)), this, SLOT(listItemActivated(QModelIndex)));
- connect(mTrackList,SIGNAL(close()),this, SLOT(hideTracksList()));
+ connect(mTrackList,SIGNAL(closed()),this, SLOT(hideTracksList()));
-
+ HbStyleLoader::registerFilePath(":/css/mpcustommediawall.css");
+ HbStyleLoader::registerFilePath(":/css/mpcustommediawall.hgmediawall.widgetml");
TX_EXIT
}
@@ -227,8 +229,11 @@
mDocumentLoader->load( MUSIC_MEDIAWALL_DOCML, "mediaWall", &ok);
if ( ok ) {
QGraphicsWidget *widget;
- widget = mDocumentLoader->findWidget(QString("mediaWallWidget"));
+ widget = mDocumentLoader->findWidget(QString("MPmediaWallWidget"));
mMediaWallWidget = qobject_cast<HgMediawall*>(widget);
+ //set these items as children of the media wall so they show behind the scrollbar.
+ mTrackList->setParentItem(mMediaWallWidget);
+ mAlbumCover->setParentItem(mMediaWallWidget);
mModel->refreshModel();
setUpMediaWallWidget();
}
@@ -241,6 +246,9 @@
}
else {
if ( mMediaWallWidget ) {
+ //Take ownership of these items to prevent delete from media wall widget.
+ mTrackList->setParentItem( this );
+ mAlbumCover->setParentItem( this );
delete mMediaWallWidget;
mMediaWallWidget = 0;
@@ -344,6 +352,7 @@
setUpListAnimation();
mListShowAnimationGroup->setDirection(QAbstractAnimation::Forward);
mListShowAnimationGroup->start();
+ mModel->setItemVisibility( mMediaWallWidget->currentIndex(), false );
}
/*!
@@ -367,6 +376,7 @@
mShowingSongsList = false;
mAlbumCover->hide();
mTrackList->hide();
+ mModel->setItemVisibility( mMediaWallWidget->currentIndex(), true );
mListShowAnimationGroup->stop();
disconnect(mListShowAnimationGroup, SIGNAL(finished()), this, SLOT(dismissListClosingAnimation()));
}
@@ -383,14 +393,24 @@
}
/*!
+ Slot to be called to fetch the songs for an album.
+ */
+void MpMediaWallView::fetchAlbumSongs(QModelIndex index)
+{
+ if ( !mCollectionData->setCurrentAlbum( index.row() ) ) {
+ mEngine->findAlbumSongs( index.row() );
+ }
+}
+
+/*!
Loads the media wall widget.
*/
void MpMediaWallView::setUpMediaWallWidget()
{
- HbIcon defaultIcon( "qtg_large_music_album" );
+ HbIcon defaultIcon( "qtg_large_album_art" );
defaultIcon.setSize(mMediaWallWidget->itemSize());
mMediaWallWidget->setDefaultImage( defaultIcon.pixmap().toImage() );
- mMediaWallWidget->enableReflections( false );
+ mMediaWallWidget->enableReflections( true );
mMediaWallWidget->setModel( mModel );
if ( mPlaybackData->playbackState() != MpPlaybackData::NotPlaying ) {
scrollToNowPlaying();
@@ -427,6 +447,7 @@
mMediaWallWidget->setScrollBarPolicy( HgWidget::ScrollBarAlwaysOn ); //HgWidget::ScrollBarAutoHide
mMediaWallWidget->scrollBar()->setInteractive( true );
mMediaWallWidget->setIndexFeedbackPolicy( HgWidget::IndexFeedbackSingleCharacter );
+ connect(mMediaWallWidget, SIGNAL(animationAboutToEnd(QModelIndex)), SLOT(fetchAlbumSongs(QModelIndex)));
connect(mMediaWallWidget, SIGNAL(activated(QModelIndex)), SLOT(showTrackList()));
connect(mMediaWallWidget, SIGNAL(scrollingStarted()), SLOT(dismissListClosingAnimation()));
}
@@ -458,11 +479,7 @@
mListShowListAnimation = new QPropertyAnimation( mTrackList, "geometry", this );
mListShowListAnimation->setDuration( 400 );
mListShowListAnimation->setEasingCurve(QEasingCurve::InOutCubic);
- mListShowAnimationGroup->addAnimation(mListShowListAnimation);
- //track list goes on top of media wall.
- mTrackList->setZValue(mMediaWallWidget->zValue()+1);
- //album cover goes on top of track list.
- mAlbumCover->setZValue(mMediaWallWidget->zValue()+2);
+ mListShowAnimationGroup->addAnimation(mListShowListAnimation);
}
//Get the current album cover geometry.
@@ -472,11 +489,6 @@
return;
}
QRectF itemRect = poly.boundingRect();
-
- //Request the albums tracks, they are set to the track list model.
- if ( !mCollectionData->setCurrentAlbum( index.row() ) ) {
- mEngine->findAlbumSongs( index.row() );
- }
//Get the album cover icon.
QVariant image = mModel->data(index, Qt::DecorationRole);
@@ -494,7 +506,7 @@
endRect.moveTo( endRect.topLeft().x() - endRect.size().width() / 2.0, endRect.topLeft().y() );
mCoverShowListAnimation->setStartValue(itemRect);
mCoverShowListAnimation->setEndValue(endRect);
- endRect.moveTo(endRect.topRight() - QPointF(1,0)); //adjust by one pixel to prevent a gap.
+ endRect.moveTo( endRect.topRight() );
mListShowListAnimation->setStartValue(itemRect);
mListShowListAnimation->setEndValue(endRect);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mpviewplugins/mpmediawallviewplugin/src/mpreflectioneffect.cpp Wed Jun 23 18:10:13 2010 +0300
@@ -0,0 +1,98 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Reflection effect for Music Player Media Wall.
+*
+*/
+
+#include <QPainter>
+#include <QGraphicsItem>
+#include <hbinstance.h>
+
+#include "mpreflectioneffect.h"
+
+
+/*!
+ \class MpReflectionEffect
+ \brief The MpReflectionEffect class provides a reflection effect.
+
+ Renders the source with a reflection.
+*/
+
+/*!
+ Constructs a new MpReflectionEffect instance.
+ The \a parent parameter is passed to QGraphicsEffect's constructor.
+*/
+MpReflectionEffect::MpReflectionEffect(QObject *parent)
+ : QGraphicsEffect( parent )
+{
+}
+
+/*!
+ Destroys the effect.
+*/
+MpReflectionEffect::~MpReflectionEffect()
+{
+}
+
+/*!
+ \reimp
+*/
+QRectF MpReflectionEffect::boundingRectFor(const QRectF &rect) const
+{
+ QRectF retRect = rect;
+ //this bounding rect is in device cordinates, correcting based on current transform.
+ if ( hbInstance->allMainWindows()[0]->orientation() == Qt::Horizontal ) {
+#ifdef __WINS__
+ retRect.adjust(0,0,retRect.width(),0); //wincw with forced rotation is to the right.
+#else
+ retRect.adjust(-retRect.width(),0,0,0);//currently hardware rotations is to the left.
+#endif
+ } else {
+ retRect.adjust(0,0,0,retRect.height());
+ }
+
+ return retRect;
+}
+
+/*!
+ \reimp
+*/
+void MpReflectionEffect::draw(QPainter *painter)
+{
+ //currently sourceBoundingRect returns somehing like boundingRectFor and
+ //wrong rect for widgets with scroll area. As a workaround we can get the
+ //original bounding rect assuming that the widget using the effect is the
+ //effect parent.
+ QGraphicsItem * sourceItem;
+ sourceItem = qobject_cast<QGraphicsItem *>( parent() );
+ QPixmap pixmap;
+ QPoint offset;
+ pixmap = sourcePixmap( Qt::LogicalCoordinates,&offset, QGraphicsEffect::NoPad );
+ painter->drawPixmap( offset, pixmap );
+ if ( sourceItem ) {
+ painter->save();
+ painter->scale( 1, -1 );
+ //for some reson tranlation does not work, translating cordinates by hand.
+ QPointF reflectionOffset( 0.0, - 2.0 * sourceItem->boundingRect().height() );
+ painter->drawPixmap( offset + reflectionOffset, pixmap );
+ QRectF reflectionRect;
+ reflectionRect.setTopLeft( reflectionOffset );
+ reflectionRect.setHeight ( sourceItem->boundingRect().height() );
+ reflectionRect.setWidth( pixmap.width() );
+ painter->fillRect( reflectionRect, QColor::fromRgbF( 0, 0, 0, 0.5f ) );
+ painter->restore();
+ }
+}
+
+// EOF
--- a/mpviewplugins/mpmediawallviewplugin/src/mptracklistwidget.cpp Fri Jun 11 13:36:36 2010 +0300
+++ b/mpviewplugins/mpmediawallviewplugin/src/mptracklistwidget.cpp Wed Jun 23 18:10:13 2010 +0300
@@ -16,73 +16,65 @@
*/
-#include <QGraphicsLinearLayout>
#include <QGraphicsSceneMouseEvent>
-#include <QBrush>
+#include <hbinstance.h>
+#include <hblistview.h>
#include <hbframeitem.h>
-#include <hbinstance.h>
#include <hbmainwindow.h>
+#include <hbstyleloader.h>
#include "mptracklistwidget.h"
+#include "mpreflectioneffect.h"
const int swipeAngleTolerance = 30; // angle is from 0 to 360
+/*!
+ \class MpTrackListWidget
+ \brief Widget with a list of tracks for Media Wall.
+
+ This widget provides a list with custom style and a background.
+*/
+
+/*!
+ \fn void closed()
+
+ This signal is emitted when the track list is closed by the user with a
+ left swipe gesture.
+ */
+
+
+/*!
+ Creates the MpTrackListWidget.
+ */
MpTrackListWidget::MpTrackListWidget( QGraphicsItem *parent ) : HbWidget( parent )
{
- mList = new HbListView( );
- QGraphicsLinearLayout *layout = new QGraphicsLinearLayout( );
- layout->addItem( mList );
- setLayout( layout );
+ // Register the custorm css path for the list items.
+ HbStyleLoader::registerFilePath(":/css/mpcustomlistitem.css");
+ HbStyleLoader::registerFilePath(":/css/mpcustomlistitem.hblistviewitem.widgetml");
+ mList = new HbListView( this );
+ // set layout name that matches the custom list item layout.
+ mList->setLayoutName("mpmwtracklist");
+ //grab the gesture for close.
grabGesture(Qt::SwipeGesture);
+
mFrameItem = new HbFrameItem( this );
mFrameItem->frameDrawer().setFrameType( HbFrameDrawer::NinePieces );
+ mFrameItem->frameDrawer().setFrameGraphicsName( "qtg_fr_multimedia_trans" );
+ mFrameItem->setZValue(-1);
- //TODO: REMOVE PAINT and enable frame drawer when graphic is delibered.
- //mFrameItem->frameDrawer().setFrameGraphicsName( "qtg_fr_popup" );
- mFrameItem->setZValue(-1);
+ MpReflectionEffect *effect = new MpReflectionEffect(this);
+ setGraphicsEffect(effect);
}
/*!
- \reimp
+ Destructs the track list widget.
*/
-void MpTrackListWidget::resizeEvent(QGraphicsSceneResizeEvent *event)
-{
- mFrameItem->setGeometry( rect() );
- HbWidget::resizeEvent( event );
-}
-
-
-/*!
- \reimp
- */
-void MpTrackListWidget::paint( QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget )
+MpTrackListWidget::~MpTrackListWidget()
{
- Q_UNUSED( widget )
- Q_UNUSED( option )
- painter->setPen(Qt::darkGray);
- painter->setBrush(QBrush(Qt::gray ));
- painter->drawRoundedRect( rect(), 4.0 , 4.0 );
-}
-
-/*!
- \reimp
- */
-void MpTrackListWidget::gestureEvent(QGestureEvent *event)
-{
- QGesture* gesture = event->gesture(Qt::SwipeGesture);
- if (gesture) {
- QSwipeGesture* swipe = static_cast<QSwipeGesture *>(gesture);
- if (swipe->state() == Qt::GestureFinished &&
- swipeAngleToDirection (swipe->swipeAngle()) == QSwipeGesture::Left ) {
- //Left gesture is the direction in wich the track list slides to close.
- emit close();
- event->accept(Qt::SwipeGesture);
- }
- }
}
/*!
@@ -94,28 +86,15 @@
}
/*!
- Maps swipe angle to SwipeDirection based on a tolerance parameter and orientation.
+ \reimp
*/
-QSwipeGesture::SwipeDirection MpTrackListWidget::swipeAngleToDirection(
- int angle)
+void MpTrackListWidget::resizeEvent(QGraphicsSceneResizeEvent *event)
{
- int delta = swipeAngleTolerance;
- if ( hbInstance->allMainWindows()[0]->orientation() == Qt::Horizontal ) {
- //correction for transformation on rotation.
- angle += ( angle < 90 ) ? 270 : -90;
- }
- QSwipeGesture::SwipeDirection direction(QSwipeGesture::NoDirection);
- if ((angle > 90-delta) && (angle < 90+delta)) {
- direction = QSwipeGesture::Up;
- } else if ((angle > 270-delta) && (angle < 270+delta)) {
- direction = QSwipeGesture::Down;
- } else if (((angle >= 0) && (angle < delta))
- || ((angle > 360-delta) && (angle <= 360))) {
- direction = QSwipeGesture::Right;
- } else if ((angle > 180-delta) && (angle < 180+delta)) {
- direction = QSwipeGesture::Left;
- }
- return direction;
+ mFrameItem->setGeometry( rect() );
+ qreal margin = 0.0;
+ style()->parameter(QString("var(hb-param-margin-gene-middle-vertical)"), margin);
+ mList->setGeometry( rect().adjusted( margin, margin, -margin, -margin ) );
+ HbWidget::resizeEvent( event );
}
/*!
@@ -144,4 +123,60 @@
}
}
+/*!
+ \reimp
+ */
+void MpTrackListWidget::gestureEvent(QGestureEvent *event)
+{
+ QGesture* gesture = event->gesture(Qt::SwipeGesture);
+ if (gesture) {
+ QSwipeGesture* swipe = static_cast<QSwipeGesture *>(gesture);
+ if (swipe->state() == Qt::GestureFinished &&
+ swipeAngleToDirection (swipe->swipeAngle()) == QSwipeGesture::Left ) {
+ //Left gesture is the direction in wich the track list slides to close.
+ emit closed();
+ event->accept(Qt::SwipeGesture);
+ }
+ }
+}
+/*!
+ Maps swipe \a angle to QSwipeGesture::SwipeDirection based on a tolerance
+ parameter and orientation. This funtions helps to identify a swipe even
+ if it is not sharp movement from 180 to 0 degrees on the righ swipe
+ gesture for instance. Since gesture events are mesured on device
+ cordinates this also helps to correct the gesture to local cordinates
+ bases on device orientation, wich is done using QT transformations,
+ meaning local cordinates and device cordinates are not always aligned.
+ */
+QSwipeGesture::SwipeDirection MpTrackListWidget::swipeAngleToDirection(
+ int angle )
+{
+ int delta = swipeAngleTolerance;
+ if ( hbInstance->allMainWindows()[0]->orientation() == Qt::Horizontal ) {
+ //correction for transformation on rotation.
+#ifdef __WINS__ //wincw with forced rotation is to the right.
+ angle += ( angle < 90 ) ? 270 : -90;
+#else//currently hardware rotations is to the left.
+ angle += 90;
+ if ( angle > 360 ) {
+ angle -= 360;
+ }
+#endif
+
+ }
+ QSwipeGesture::SwipeDirection direction( QSwipeGesture::NoDirection );
+ if ( ( angle > 90 - delta) && ( angle < 90 + delta ) ) {
+ direction = QSwipeGesture::Up;
+ } else if ( ( angle > 270 - delta ) && (angle < 270 + delta ) ) {
+ direction = QSwipeGesture::Down;
+ } else if ( ( ( angle >= 0 ) && ( angle < delta ) )
+ || ( ( angle > 360 - delta ) && ( angle <= 360 ) ) ) {
+ direction = QSwipeGesture::Right;
+ } else if ( ( angle > 180 - delta ) && ( angle < 180 + delta ) ) {
+ direction = QSwipeGesture::Left;
+ }
+ return direction;
+}
+
+//EOF
--- a/mpviewplugins/mpplaybackviewplugin/inc/mpplaybackview.h Fri Jun 11 13:36:36 2010 +0300
+++ b/mpviewplugins/mpplaybackviewplugin/inc/mpplaybackview.h Wed Jun 23 18:10:13 2010 +0300
@@ -27,12 +27,14 @@
class MpPlaybackData;
class MpPlaybackWidget;
class MpEqualizerWidget;
-class QTranslator;
class MpPlaybackView : public MpViewBase
{
Q_OBJECT
+ Q_PROPERTY(QString PlaybackStatus READ playbackStatus)
+ Q_PROPERTY(bool Shuffle READ shuffleEnabled)
+ Q_PROPERTY(bool Repeat READ repeatEnabled)
public:
@@ -43,6 +45,10 @@
void activateView();
void deactivateView();
+ QString playbackStatus();
+ bool shuffleEnabled();
+ bool repeatEnabled();
+
signals:
void command( int aCommand );
@@ -64,6 +70,7 @@
void handleSongSelected();
void showEqualizerDialog();
+ void closeEqualizerDialog();
void startRewindTimer();
void startForwardTimer();
@@ -99,10 +106,7 @@
HbAction *mPlayPauseAction; // Not own
HbAction *mRepeatAction; // Not own
HbAction *mShuffleAction; // Not own
-
- QTranslator *mMpTranslator; // Own
- QTranslator *mCommonTranslator; // Own
-
+
QTimer *mTimer;
bool mShuffle;
--- a/mpviewplugins/mpplaybackviewplugin/inc/mpplaybackwidget.h Fri Jun 11 13:36:36 2010 +0300
+++ b/mpviewplugins/mpplaybackviewplugin/inc/mpplaybackwidget.h Wed Jun 23 18:10:13 2010 +0300
@@ -43,6 +43,7 @@
signals:
void setPlaybackPosition( int value );
+ void signalPlaybackInfoChanged();
public slots:
--- a/mpviewplugins/mpplaybackviewplugin/mpplaybackviewplugin.pro Fri Jun 11 13:36:36 2010 +0300
+++ b/mpviewplugins/mpplaybackviewplugin/mpplaybackviewplugin.pro Wed Jun 23 18:10:13 2010 +0300
@@ -14,44 +14,44 @@
# Description:
#
-symbian:TARGET.UID3 = 0x10207C64
-
TEMPLATE = lib
CONFIG += hb qt ecomplugin
TARGET = mpplaybackviewplugin
+symbian: {
+ TARGET.UID3 = 0x10207C64
+ TARGET.CAPABILITY = All -TCB
+ TARGET.EPOCALLOWDLLDATA = 1
+}
SERVICE.INTERFACE_NAME = org.nokia.mmdt.MpxViewPlugin/1.0
SERVICE.CONFIGURATION = "<t>0x101FFCA0</t><p>0x101FFC06;0x101FFC3A;0xE419BEEE</p><i>EMPXViewPluginPriorityNormal</i><f>0x00000002</f>"
-TARGET.CAPABILITY = All -TCB
-
DEPENDPATH += .
INCLUDEPATH += . \
- inc \
- ../../inc
+ inc \
+ ../../inc
INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
-LIBS += -lmpxplaybackutility.dll \
- -lmpxcommon.dll \
- -lestor.dll \
- -lmpxviewframeworkqt.dll \
- -laudioequalizerutility.dll \
- -lmpsettingsmanager \
- -lmpengine \
- -lmpdata.dll
-
-symbian:TARGET.EPOCALLOWDLLDATA = 1
+LIBS += -lmpxplaybackutility \
+ -lmpxcommon \
+ -lestor \
+ -lmpxviewframeworkqt \
+ -laudioequalizerutility \
+ -lmpsettingsmanager \
+ -lmpengine \
+ -lmpdata
-HEADERS = ../../inc/mpviewbase.h \
- inc/mpplaybackviewplugin.h \
- inc/mpplaybackview.h \
- inc/mpplaybackwidget.h \
- inc/mpequalizerwidget.h
+# Input
+HEADERS += ../../inc/mpviewbase.h \
+ inc/mpplaybackviewplugin.h \
+ inc/mpplaybackview.h \
+ inc/mpplaybackwidget.h \
+ inc/mpequalizerwidget.h
SOURCES += src/mpplaybackviewplugin.cpp \
- src/mpplaybackview.cpp \
- src/mpplaybackwidget.cpp \
- src/mpequalizerwidget.cpp
+ src/mpplaybackview.cpp \
+ src/mpplaybackwidget.cpp \
+ src/mpequalizerwidget.cpp
RESOURCES += resources/mpplaybackviewpluginresources.qrc
--- a/mpviewplugins/mpplaybackviewplugin/src/mpplaybackview.cpp Fri Jun 11 13:36:36 2010 +0300
+++ b/mpviewplugins/mpplaybackviewplugin/src/mpplaybackview.cpp Wed Jun 23 18:10:13 2010 +0300
@@ -24,8 +24,6 @@
#include <hbtoolbutton.h>
#include <hbaction.h>
#include <hbicon.h>
-#include <QTranslator>
-#include <QLocale>
#include "mpplaybackview.h"
#include "mpplaybackwidget.h"
@@ -68,8 +66,6 @@
mPauseIcon( 0 ),
mShuffleOnIcon( 0 ),
mShuffleOffIcon( 0 ),
- mMpTranslator( 0 ),
- mCommonTranslator( 0 ),
mTimer(0),
mSeeking(false)
@@ -89,8 +85,6 @@
delete mShuffleOnIcon;
delete mShuffleOffIcon;
delete mEqualizerWidget;
- delete mMpTranslator;
- delete mCommonTranslator;
TX_EXIT
}
@@ -102,25 +96,6 @@
{
TX_ENTRY
- //Load musicplayer and common translators
- QString lang = QLocale::system().name();
- QString path = QString( "z:/resource/qt/translations/" );
- bool translatorLoaded = false;
-
- mMpTranslator = new QTranslator( this );
- translatorLoaded = mMpTranslator->load( path + "musicplayer_" + lang );
- TX_LOG_ARGS( "Loading translator ok=" << translatorLoaded );
- if ( translatorLoaded ) {
- qApp->installTranslator( mMpTranslator );
- }
-
- mCommonTranslator = new QTranslator( this );
- translatorLoaded = mCommonTranslator->load( path + "common_" + lang );
- TX_LOG_ARGS( "Loading common translator ok=" << translatorLoaded );
- if ( translatorLoaded ) {
- qApp->installTranslator( mCommonTranslator );
- }
-
mWindow = mainWindow();
mSoftKeyBack = new HbAction( Hb::BackNaviAction, this );
@@ -151,6 +126,7 @@
this, SLOT( shuffleChanged( bool ) ) );
connect( MpSettingsManager::instance(), SIGNAL( repeatChanged( bool ) ),
this, SLOT( repeatChanged( bool ) ) );
+ connect( mMpEngine, SIGNAL( libraryUpdated() ), this, SLOT( closeEqualizerDialog() ) );
}
TX_EXIT
@@ -173,18 +149,64 @@
void MpPlaybackView::deactivateView()
{
TX_ENTRY
- if ( mEqualizerWidget && mEqualizerWidget->isActive() ) {
- mEqualizerWidget->close();
- }
-
menu()->close();
-
setNavigationAction( 0 );
mActivated = false;
TX_EXIT
}
/*!
+ Gets the current status of the view in a form of string
+ */
+QString MpPlaybackView::playbackStatus()
+{
+ TX_ENTRY
+ QString currentStatus;
+
+ switch ( mPlaybackData->playbackState() ) {
+ case MpPlaybackData::NotPlaying:
+ TX_LOG_ARGS( "playbackStatus: NotPlaying" )
+ currentStatus = "NotPlaying";
+ break;
+ case MpPlaybackData::Playing:
+ TX_LOG_ARGS( "playbackStatus: Playing" )
+ currentStatus = "Playing";
+ break;
+ case MpPlaybackData::Paused:
+ TX_LOG_ARGS( "playbackStatus: Paused" )
+ currentStatus ="Paused";
+ break;
+ case MpPlaybackData::Stopped:
+ TX_LOG_ARGS( "playbackStatus: Stopped" )
+ currentStatus = "Stopped";
+ break;
+ default:
+ break;
+ }
+ TX_EXIT
+ return currentStatus;
+
+}
+
+/*!
+ Gets the current Shuffle setting value
+ */
+bool MpPlaybackView::shuffleEnabled()
+{
+ TX_ENTRY
+ return mShuffle;
+}
+
+/*!
+ Gets the current Repeat setting value
+ */
+bool MpPlaybackView::repeatEnabled()
+{
+ TX_ENTRY
+ return mRepeat;
+}
+
+/*!
Slot to be called to activate settings view.
*/
void MpPlaybackView::startSettingsView()
@@ -324,6 +346,7 @@
{
TX_ENTRY
HbToolBar *myToolBar = toolBar();
+ myToolBar->setObjectName("PlaybackToolbar");
myToolBar->setOrientation( Qt::Horizontal );
QActionGroup *actionsGroup = new QActionGroup( myToolBar );
@@ -539,6 +562,7 @@
}
}
}
+
/*!
Slot to be called to activate equalizer dialog.
*/
@@ -553,3 +577,17 @@
TX_EXIT
}
+
+/*!
+ Slot to be called when library has been updated
+ */
+void MpPlaybackView::closeEqualizerDialog()
+{
+ TX_ENTRY
+
+ if ( mEqualizerWidget ) {
+ mEqualizerWidget->close();
+ }
+
+ TX_EXIT
+}
--- a/mpviewplugins/mpplaybackviewplugin/src/mpplaybackwidget.cpp Fri Jun 11 13:36:36 2010 +0300
+++ b/mpviewplugins/mpplaybackviewplugin/src/mpplaybackwidget.cpp Wed Jun 23 18:10:13 2010 +0300
@@ -143,6 +143,7 @@
mArtistName->setPlainText( mPlaybackData->artist() );
mAlbumName->setPlainText( mPlaybackData->album() );
mRealAudioIndicator->setVisible( mPlaybackData->realAudio() );
+ emit signalPlaybackInfoChanged();
TX_EXIT
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mpviewplugins/mpplaybackviewplugin/tsrc/MATTI/feature_test_folder/QTMusicPlayer_BAT_playbackview.feature Wed Jun 23 18:10:13 2010 +0300
@@ -0,0 +1,114 @@
+Feature: As a test engineer I want to run BAT test cases for QT Music Player
+
+ Scenario: Equalizer_Select a preset from list
+ Given the MusicPlayer application is active
+ And I select the song number 1 of the list
+ Then The song number 1 of the library is shown in playback view
+ When I Tap on Navi pane text area Music
+ When I select Equaliser from the Options menu
+ Then the Equaliser pop up is displayed
+ And Equaliser preset 1 is selected
+ When I select the Equaliser preset number 3 from the list
+ And I Tap on Navi pane text area Music
+ And I select Exit from the Options menu
+ Then the MusicPlayer application is not active
+ When the MusicPlayer application is active
+ And I select the song number 1 of the list
+ Then The song number 1 of the library is shown in playback view
+ When I Tap on Navi pane text area Music
+ When I select Equaliser from the Options menu
+ Then the Equaliser preset 3 is selected
+
+ Scenario: Repeat
+ Given the MusicPlayer application is active
+ And I select the song number 1 of the list
+ Then The song number 1 of the library is shown in playback view
+ And Repeat is set to ON
+ Then all songs are played and at the end it goes to the first one and stays in Playing
+ When I Tap on Navi pane text area Music
+ And I select Repeat off from the Options menu
+ And all songs are played and at the end it goes to the first one and stays in Paused
+ When the application is closed
+ Given the MusicPlayer application is active
+ And I select the song number 1 of the list
+ Then The song number 1 of the library is shown in playback view
+ And Repeat is set to OFF
+
+
+
+
+
+
+
+
+
+
+
+ Scenario: Audio Effects view - Change settings and Exit
+ Given the MusicPlayer application is active
+ And I select the song number 1 of the list
+ Then The song number 1 of the library is shown in playback view
+ When I Tap on Navi pane text area Music
+ When I select Audio effects from the Options menu
+ Then the Audio effects pop up is displayed
+ And Audio effects settings are Balance 0 and Loudness Off
+ When I drag the slider to the Right 40 pixels
+ And I tap the Loudness toggle
+ Then Audio effects settings are Balance 25 and Loudness On
+ When the application is closed
+ Given the MusicPlayer application is active
+ And I select the song number 1 of the list
+ Then The song number 1 of the library is shown in playback view
+ When I Tap on Navi pane text area Music
+ When I select Audio effects from the Options menu
+ Then the Audio effects pop up is displayed
+ And Audio effects settings are Balance 25 and Loudness On
+
+ Scenario: Playbackview options menu
+ Given the MusicPlayer application is active
+ And I select the song number 1 of the list
+ Then The song number 1 of the library is shown in playback view
+ When I Tap on Navi pane text area Music
+ Then the playback view options menu list is shown correctly
+
+ Scenario: Now Playing View Q4- Activate shuffle- go back to Songs view and play another song - check shuffle is ON
+ Given the MusicPlayer application is active
+ And I select the song number 1 of the list
+ Then The song number 1 of the library is shown in playback view
+ When I set shuffle to ON
+ Then musicplayer plays the following songs after song 1 randomly
+ When I press the back button
+ And I select the song number 4 of the list
+ Then The song number 4 of the library is shown in playback view
+ And shuffle is set to ON
+
+ Scenario: Now playing view H1- Shuffle OFF
+ Given the MusicPlayer application is active
+ And I select the song number 1 of the list
+ Then The song number 1 of the library is shown in playback view
+ When I set shuffle to OFF
+ And I wait until the song change
+ Then The song number 2 of the library is shown in playback view
+ And I wait until the song change
+ Then The song number 3 of the library is shown in playback view
+ Then the application is closed
+
+ Scenario: Playback view control bar to FW,RW,Play-pause.
+ Given the MusicPlayer application is active
+ And I select the song number 1 of the list
+ Then The song number 1 of the library is shown in playback view
+ And the song in the playback view is Playing
+ When I press the button FW in the PlaybackToolbar
+ Then The song number 2 of the library is shown in playback view
+ And the song in the playback view is Playing
+ When I press the button RW in the PlaybackToolbar twice
+ Then The song number 1 of the library is shown in playback view
+ When I single press the button RW in the PlaybackToolbar and it is playing it starts from the beginning
+ When I press the button Pause in the PlaybackToolbar
+ Then the song in the playback view is Paused
+ When I press the button FW in the PlaybackToolbar
+ Then The song number 2 of the library is shown in playback view
+ Then the song in the playback view is Paused
+ When I press the button RW in the PlaybackToolbar
+ Then The song number 1 of the library is shown in playback view
+ Then the song in the playback view is Paused
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mpviewplugins/mpplaybackviewplugin/tsrc/MATTI/feature_test_folder/step_definitions/MusicPlayerSteps.rb Wed Jun 23 18:10:13 2010 +0300
@@ -0,0 +1,282 @@
+def mda(width,height)
+a = Array.new(width)
+a.map! { Array.new(height) }
+return a
+end
+
+def create_mp_constants
+@Library = mda(4,3)
+@Library[0] = ["Amen and Boys", "Stop It!!","Self Made Maps"]
+@Library[1] = ["Emancipated Minor", "Ani Difranco","Red Letter Year"]
+@Library[2] = ["Slowly", "Fauna","Dreamless"]
+@Library[3] = ["Turkish March", "Daniel Bautista","Classics And Soundtracks"]
+
+@PlaybackToolBarOrder = {"Shuffle"=>0,"RW"=>1,"Pause"=>2,"Play"=>2,"FW"=>3,"Flip"=>4}
+
+@PlaybackViewOptionsMenu = {"Equaliser"=>0, "Audio effects"=>1, "Repeat off" =>2, "Exit" => 3}
+
+@EquiliserPresetsList = {"Off"=>0, "Bass booster"=>1, "Classical" =>2, "Jazz" => 3, "Pop"=>4 , "Rock"=> 5}
+
+@ShuffleOffIconConst = 'qtg_mono_shuffle_off'
+@ShuffleOnIconConst = 'qtg_mono_shuffle'
+@RWIconConst = 'qtg_mono_seek_previous'
+@PauseIconConst = 'qtg_mono_pause'
+@FWIconConst = 'qtg_mono_seek_next'
+@InfoIconConst = 'qtg_mono_info'
+@PlayIconConst = 'qtg_mono_play'
+
+
+end
+
+require 'matti'
+require 'spec/expectations'
+require 'nokogiri'
+require 'date'
+
+Before do
+ create_mp_constants
+ @sut = MATTI.sut(:Id=>'sut_s60_qt')
+end
+
+After do
+ begin
+ @MPapp.close
+ rescue
+ end
+end
+
+Given("the MusicPlayer application is active") do
+ @MPapp = @sut.run(:name => "musicplayer")
+end
+
+Then("the MusicPlayer application is not active") do
+ verify_true(1, 'Music Player still running') {@sut.application.name != "musicplayer"} #Verify that the app that is in the foreground is not music player, if it is that means musicplayer is still running.
+end
+
+When("I Tap on Navi pane text area Music") do
+ @MPapp.HbTitleBar.HbTitlePane.HbFrameItem.tap
+ @MenuContainer = @MPapp.HbMenu.HbMenuContainer
+end
+
+When("I select the song number $element_num of the list") do |element_num|
+ @MPapp.HbListView(:name=>'allSongsList').HbListViewItem(:__index=>element_num.to_i-1).tap
+end
+
+Then("The song with the title $song_title and artist $song_artist and album $song_album is shown in playback view") do |song_title, song_artist, song_album|
+ verify(10, "The song title is not being displayed") {@MPapp.HbLabel(:visibleOnScreen => 'true', :name => 'songText').HbTextItem(:text => song_title)}
+ verify(10, "The song artist is not being displayed") {@MPapp.HbLabel(:visibleOnScreen => 'true', :name => 'artistText').HbTextItem( :text => song_artist)}
+ verify(10, "The song album is not being displayed") {@MPapp.HbLabel(:visibleOnScreen => 'true', :name => 'albumText').HbTextItem( :text => song_album)}
+end
+
+Then("The song number $num of the library is shown in playback view") do |num|
+ verify(10, "The song title is not being displayed") {@MPapp.HbLabel(:visibleOnScreen => 'true', :name => 'songText').HbTextItem(:text => @Library[num.to_i-1][0])}
+ verify(10, "The song artist is not being displayed") {@MPapp.HbLabel(:visibleOnScreen => 'true', :name => 'artistText').HbTextItem( :text => @Library[num.to_i-1][1])}
+ verify(10, "The song album is not being displayed") {@MPapp.HbLabel(:visibleOnScreen => 'true', :name => 'albumText').HbTextItem( :text => @Library[num.to_i-1][2])}
+end
+
+Then ("musicplayer plays the following songs after song $num randomly") do |num|
+ @MPapp.MpPlaybackWidget.wait_for_signal(600, "signalPlaybackInfoChanged()")
+ title=@MPapp.HbLabel(:visibleOnScreen => 'true', :name => 'songText').HbTextItem.attribute("Text")
+ artist=@MPapp.HbLabel(:visibleOnScreen => 'true', :name => 'artistText').HbTextItem.attribute("Text")
+ album=@MPapp.HbLabel(:visibleOnScreen => 'true', :name => 'albumText').HbTextItem.attribute("Text")
+ if title != @Library[num.to_i][0] or artist != @Library[num.to_i][1] or album != @Library[num.to_i][2]
+ else
+ @MPapp.MpPlaybackWidget.wait_for_signal(600, "signalPlaybackInfoChanged()")
+ verify_not(10, "The song title is being displayed") {@MPapp.HbLabel(:visibleOnScreen => 'true', :name => 'songText').HbTextItem(:text => @Library[num.to_i+1][0])}
+ verify_not(10, "The song artist is being displayed") {@MPapp.HbLabel(:visibleOnScreen => 'true', :name => 'artistText').HbTextItem( :text => @Library[num.to_i+1][1])}
+ verify_not(10, "The song album is being displayed") {@MPapp.HbLabel(:visibleOnScreen => 'true', :name => 'albumText').HbTextItem( :text => @Library[num.to_i+1][2])}
+ end
+end
+
+Then("the song in the playback view is $playback_status") do |playback_status|
+ verify(5, "The status of the playback view is not the spected"){@MPapp.MpPlaybackView(:PlaybackStatus => playback_status)}
+ lb_init = @MPapp.HbProgressSlider( :name => 'progressBar' ).HbTextItem(:__index => 0).attribute("Text")
+ sleep 5
+ lb_fin = @MPapp.HbProgressSlider( :name => 'progressBar' ).HbTextItem(:__index => 0).attribute("Text")
+ if playback_status == 'Playing'
+ verify_true(1,"Time label didn't change") {lb_init != lb_fin}
+ end
+ if playback_status == 'Paused'
+ verify_true(1,"Time label didn't change") {lb_init == lb_fin}
+ end
+end
+
+When ("I press the button $button in the PlaybackToolbar") do |button|
+ verify_true(5,"Icon is not correct"){@MPapp.HbToolBar( :name => 'PlaybackToolbar' ).HbToolButton(:__index => @PlaybackToolBarOrder.fetch(button)).HbIconItem.attribute("iconName") == getPlaybackToolbarIconName(button)}
+ @MPapp.HbToolBar( :name => 'PlaybackToolbar' ).HbToolButton(:__index => @PlaybackToolBarOrder.fetch(button)).tap
+end
+
+When ("I sleep $number $min_sec") do |number, min_sec|
+ time_to_wait = 0
+ if(min_sec == "seconds")
+ time_to_wait = number.to_i
+ end
+ if(min_sec == "minutes")
+ time_to_wait = number.to_i*60
+ end
+ puts time_to_wait.to_s
+ sleep time_to_wait
+end
+
+When ("I wait until the song change") do
+ @MPapp.MpPlaybackWidget.wait_for_signal(600, "signalPlaybackInfoChanged()")
+end
+
+def to_true_false(param)
+ if param == true or param == "ON"
+ return "true"
+ end
+ if param == false or param == "OFF"
+ return "false"
+ end
+end
+
+When ("I set shuffle to $on_off") do |on_off|
+ if @MPapp.MpPlaybackView.attribute("Shuffle") != to_true_false(on_off)
+ @MPapp.HbToolBar( :name => 'PlaybackToolbar' ).HbToolButton(:__index => @PlaybackToolBarOrder.fetch("Shuffle")).tap
+ end
+ verify_true(2,"Shuffle is not the expected value"){@MPapp.MpPlaybackView.attribute("Shuffle") == to_true_false(on_off)}
+ if on_off == "ON"
+ verify_true(5,"Shuffle icon is not correct"){@MPapp.HbToolBar( :name => 'PlaybackToolbar' ).HbToolButton(:__index => @PlaybackToolBarOrder.fetch("Shuffle")).HbIconItem.attribute("iconName") == @ShuffleOnIconConst}
+ end
+ if on_off == "OFF"
+ verify_true(5,"Shuffle icon is not correct"){@MPapp.HbToolBar( :name => 'PlaybackToolbar' ).HbToolButton(:__index => @PlaybackToolBarOrder.fetch("Shuffle")).HbIconItem.attribute("iconName") == @ShuffleOffIconConst}
+ end
+
+end
+
+When("shuffle is set to $on_off") do |on_off|
+ verify_true(3,"Shuffle is not the expected value"){@MPapp.MpPlaybackView.attribute("Shuffle") == to_true_false(on_off)}
+ if on_off == "ON"
+ verify_true(5,"Shuffle icon is not correct"){@MPapp.HbToolBar( :name => 'PlaybackToolbar' ).HbToolButton(:__index => @PlaybackToolBarOrder.fetch("Shuffle")).HbIconItem.attribute("iconName") == @ShuffleOnIconConst}
+ end
+ if on_off == "OFF"
+ verify_true(5,"Shuffle icon is not correct"){@MPapp.HbToolBar( :name => 'PlaybackToolbar' ).HbToolButton(:__index => @PlaybackToolBarOrder.fetch("Shuffle")).HbIconItem.attribute("iconName") == @ShuffleOffIconConst}
+ end
+end
+
+When ("I press the button $button in the PlaybackToolbar twice") do |button|
+ @MPapp.HbToolBar( :name => 'PlaybackToolbar' ).HbToolButton(:__index => @PlaybackToolBarOrder.fetch(button)).tap(2)
+end
+
+When("I press the back button") do
+ @MPapp.HbTitleBar.HbNavigationButton.tap
+end
+
+When ("I single press the button RW in the PlaybackToolbar and it is playing it starts from the beginning") do
+ lb_init = @MPapp.HbProgressSlider( :name => 'progressBar' ).HbTextItem(:__index => 0).attribute("Text")
+ @MPapp.HbToolBar( :name => 'PlaybackToolbar' ).HbToolButton(:__index => @PlaybackToolBarOrder.fetch("RW")).tap
+ lb_fin = @MPapp.HbProgressSlider( :name => 'progressBar' ).HbTextItem(:__index => 0).attribute("Text")
+ verify_true(1,"It didn't start from the beginning"){lb_init > lb_fin}
+end
+
+When("I select $item from the Options menu") do |item|
+ @MenuContainer.HbMenuItem(:__index=> @PlaybackViewOptionsMenu.fetch(item)).tap
+end
+
+Then ("the playback view options menu list is shown correctly") do
+ i = 0
+ while i < @PlaybackViewOptionsMenu.length do
+ verify_true(2,"Menu item is incorrect"){@MenuContainer.HbMenuItem(:__index=> i).HbTextItem.attribute("Text") == @PlaybackViewOptionsMenu.index(i)}
+ i = i +1
+ end
+
+ # @PlaybackViewOptionsMenu.each{|key, value| verify_true(2,"Menu item is incorrect"){@MenuContainer.HbMenuItem(:__index=> value).HbTextItem.attribute("Text") == key} }
+end
+
+Then ("the Equaliser pop up is displayed") do
+ verify(3, "Equiliser pop up is not displayed"){@MPapp.MpEqualizerWidget}
+ i = 0
+ while i < @EquiliserPresetsList.length do
+ puts i.to_s
+ puts @MPapp.MpEqualizerWidget.HbRadioButtonList.HbListViewItem(:__index=> i).HbTextItem.attribute("Text")
+ puts @EquiliserPresetsList.index(i)
+ verify_true(2,"Menu item is incorrect"){@MPapp.MpEqualizerWidget.HbRadioButtonList.HbListViewItem(:__index=> i).HbTextItem.attribute("Text") == @EquiliserPresetsList.index(i)}
+ i = i+1
+ end
+end
+
+Then ("Equaliser preset $num is selected") do |num|
+
+ verify_true(3, "Item is not selected"){@MPapp.MpEqualizerWidget.HbRadioButtonList.HbListViewItem(:__index=> num.to_i-1).HbIconItem.attribute("iconName") == "qtg_small_radio_selected"}
+end
+
+When ("I select the Equaliser preset number $num from the list") do |num|
+ @MPapp.MpEqualizerWidget.HbRadioButtonList.HbListViewItem(:__index=>num.to_i - 1).tap
+ @MPapp.MpEqualizerWidget.HbToolBar.HbTextItem( :text => 'OK' ).tap
+end
+
+Then ("the Audio effects pop up is displayed") do
+ verify(3, "Audio effects pop up is not displayed"){@MPapp.MpSettingsAudioEffectsWidget}
+ verify(3, "Balance slider is not present") {@MPapp.MpSettingsAudioEffectsWidget.HbSlider}
+ verify(3, "Loudness toggle is not present"){@MPapp.MpSettingsAudioEffectsWidget.HbToggleItem}
+end
+
+Then ("Audio effects settings are Balance $balance_value and Loudness $loudness_value") do |balance_value, loudness_value|
+ verify_true(3,"Balance value is not the expected"){@MPapp.MpSettingsAudioEffectsWidget.HbSlider.attribute("sliderPosition").to_i == balance_value.to_i}
+ verify_true(3,"Loudness value is not the expected"){@MPapp.MpSettingsAudioEffectsWidget.HbToggleItem.attribute("Text") == loudness_value}
+end
+
+When("I drag the slider to the $dir $num_pix pixels") do |dir, num_pix|
+ @MPapp.MpSettingsAudioEffectsWidget.HbSliderHandle.drag(to_direction(dir), num_pix, :Left)
+end
+
+When("the application is closed") do
+ @MPapp.close
+end
+
+When("I tap the Loudness toggle") do
+ @MPapp.MpSettingsAudioEffectsWidget.HbToggleItem.tap
+end
+
+When("Repeat is set to $on_off") do |on_off|
+ verify_true(3,"Repeat is not the expected value"){@MPapp.MpPlaybackView.attribute("Repeat") == to_true_false(on_off)}
+end
+
+Then ("all songs are played and at the end it goes to the first one and stays in $playback_status") do |playback_status|
+ i = 0
+ while i < @Library.length do
+ verify(10, "The song title is not being displayed") {@MPapp.HbLabel(:visibleOnScreen => 'true', :name => 'songText').HbTextItem(:text => @Library[i][0])}
+ verify(10, "The song artist is not being displayed") {@MPapp.HbLabel(:visibleOnScreen => 'true', :name => 'artistText').HbTextItem( :text => @Library[i][1])}
+ verify(10, "The song album is not being displayed") {@MPapp.HbLabel(:visibleOnScreen => 'true', :name => 'albumText').HbTextItem( :text => @Library[i][2])}
+
+ @MPapp.MpPlaybackWidget.wait_for_signal(720, "signalPlaybackInfoChanged()")
+ i = i+1
+ end
+ verify(10, "The song title is not being displayed") {@MPapp.HbLabel(:visibleOnScreen => 'true', :name => 'songText').HbTextItem(:text => @Library[0][0])}
+ verify(10, "The song artist is not being displayed") {@MPapp.HbLabel(:visibleOnScreen => 'true', :name => 'artistText').HbTextItem( :text => @Library[0][1])}
+ verify(10, "The song album is not being displayed") {@MPapp.HbLabel(:visibleOnScreen => 'true', :name => 'albumText').HbTextItem( :text => @Library[0][2])}
+ verify_true(5, "The status of the playback view is not the spected"){@MPapp.MpPlaybackView.attribute("PlaybackStatus") == playback_status or @MPapp.MpPlaybackView.attribute("PlaybackStatus") == "Stopped"}
+end
+
+def to_direction(string)
+ case string
+ when "Right"
+ return :Right
+ when "Left"
+ return :Left
+ when "Up"
+ return :Up
+ when "Down"
+ return :Down
+ end
+end
+
+def getPlaybackToolbarIconName(button)
+ case button
+ when "RW"
+ return @RWIconConst
+ when "Pause"
+ return @PauseIconConst
+ when "FW"
+ return @FWIconConst
+ when "Info"
+ return @InfoIconConst
+ when "Play"
+ return @PlayIconConst
+ end
+
+end
+
+
+
--- a/mpviewplugins/mpsettingsviewplugin/mpsettingsviewplugin.pro Fri Jun 11 13:36:36 2010 +0300
+++ b/mpviewplugins/mpsettingsviewplugin/mpsettingsviewplugin.pro Wed Jun 23 18:10:13 2010 +0300
@@ -14,40 +14,38 @@
# Description:
#
-symbian:TARGET.UID3 = 0x10207C66
-
TEMPLATE = lib
CONFIG += hb qt ecomplugin
TARGET = mpsettingsviewplugin
+symbian: {
+ TARGET.UID3 = 0x10207C66
+ TARGET.CAPABILITY = All -TCB
+ TARGET.EPOCALLOWDLLDATA = 1
+}
SERVICE.INTERFACE_NAME = org.nokia.mmdt.MpxViewPlugin/1.0
SERVICE.CONFIGURATION = "<t>0x101FFCA2</t><i>EMPXViewPluginPriorityLowest</i>"
-TARGET.CAPABILITY = All -TCB
-
DEPENDPATH += .
INCLUDEPATH += . \
- inc \
- ../../inc \
- ../../mpserviceplugins/inc
-
+ inc \
+ ../../inc
INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
-LIBS += -lmpxplaybackutility.dll \
- -lestor.dll \
- -lmpxviewframeworkqt.dll \
- -lmpengine.dll
-
-symbian:TARGET.EPOCALLOWDLLDATA = 1
+LIBS += -lmpxplaybackutility \
+ -lestor \
+ -lmpxviewframeworkqt \
+ -lmpengine
+# Input
HEADERS += ../../inc/mpviewbase.h \
- inc/mpsettingsviewplugin.h \
- inc/mpsettingsview.h \
- inc/mpsettingsaudioeffectswidget.h
+ inc/mpsettingsviewplugin.h \
+ inc/mpsettingsview.h \
+ inc/mpsettingsaudioeffectswidget.h
SOURCES += src/mpsettingsviewplugin.cpp \
- src/mpsettingsview.cpp \
- src/mpsettingsaudioeffectswidget.cpp
+ src/mpsettingsview.cpp \
+ src/mpsettingsaudioeffectswidget.cpp
RESOURCES += resources/mpsettingsview.qrc
--- a/mpviewplugins/mpsettingsviewplugin/src/mpsettingsview.cpp Fri Jun 11 13:36:36 2010 +0300
+++ b/mpviewplugins/mpsettingsviewplugin/src/mpsettingsview.cpp Wed Jun 23 18:10:13 2010 +0300
@@ -18,8 +18,6 @@
#include <hbmainwindow.h>
#include <hbaction.h>
#include <hbapplication.h>
-#include <QTranslator>
-#include <QLocale>
#include "mpsettingsview.h"
#include "mpsettingsaudioeffectswidget.h"
@@ -68,19 +66,6 @@
{
TX_ENTRY
- //Load musicplayer translator
- QTranslator translator;
- QString lang = QLocale::system().name();
- QString path = QString("z:/resource/qt/translations/");
-
- bool translatorLoaded = false;
- translatorLoaded = translator.load(path + "musicplayer_" + lang);
- TX_LOG_ARGS("Loading musicplayer translator ok=" << translatorLoaded);
- if ( translatorLoaded ) {
- qApp->installTranslator( &translator );
-
- }
-
mWindow = mainWindow();
mSoftKeyBack = new HbAction(Hb::BackNaviAction, this);
mAudioEffectsWidget = new MpSettingsAudioEffectsWidget(this);
--- a/musicservices/bwins/musicservices.def Fri Jun 11 13:36:36 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-EXPORTS
- ?currentService@MusicServices@@QAE?AW4MusicService@1@XZ @ 1 NONAME ; enum MusicServices::MusicService MusicServices::currentService(void)
- ?trUtf8@MusicServices@@SA?AVQString@@PBD0@Z @ 2 NONAME ; class QString MusicServices::trUtf8(char const *, char const *)
- ?qt_metacast@MusicServices@@UAEPAXPBD@Z @ 3 NONAME ; void * MusicServices::qt_metacast(char const *)
- ?trUtf8@MusicServices@@SA?AVQString@@PBD0H@Z @ 4 NONAME ; class QString MusicServices::trUtf8(char const *, char const *, int)
- ?qt_metacall@MusicServices@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 5 NONAME ; int MusicServices::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?contextTitle@MusicServices@@QBE?AVQString@@XZ @ 6 NONAME ; class QString MusicServices::contextTitle(void) const
- ??0MusicServices@@QAE@XZ @ 7 NONAME ; MusicServices::MusicServices(void)
- ??_EMusicServices@@UAE@I@Z @ 8 NONAME ; MusicServices::~MusicServices(unsigned int)
- ?itemSelected@MusicServices@@QAEXVQString@@@Z @ 9 NONAME ; void MusicServices::itemSelected(class QString)
- ?playReady@MusicServices@@IAEXABVXQSharableFile@@@Z @ 10 NONAME ; void MusicServices::playReady(class XQSharableFile const &)
- ?tr@MusicServices@@SA?AVQString@@PBD0H@Z @ 11 NONAME ; class QString MusicServices::tr(char const *, char const *, int)
- ?tr@MusicServices@@SA?AVQString@@PBD0@Z @ 12 NONAME ; class QString MusicServices::tr(char const *, char const *)
- ?getStaticMetaObject@MusicServices@@SAABUQMetaObject@@XZ @ 13 NONAME ; struct QMetaObject const & MusicServices::getStaticMetaObject(void)
- ?serviceActive@MusicServices@@IAEXVTUid@@@Z @ 14 NONAME ; void MusicServices::serviceActive(class TUid)
- ?metaObject@MusicServices@@UBEPBUQMetaObject@@XZ @ 15 NONAME ; struct QMetaObject const * MusicServices::metaObject(void) const
- ?setCurrentService@MusicServices@@QAEXW4MusicService@1@@Z @ 16 NONAME ; void MusicServices::setCurrentService(enum MusicServices::MusicService)
- ?staticMetaObject@MusicServices@@2UQMetaObject@@B @ 17 NONAME ; struct QMetaObject const MusicServices::staticMetaObject
- ??1MusicServices@@UAE@XZ @ 18 NONAME ; MusicServices::~MusicServices(void)
- ?playReady@MusicServices@@IAEXABVQString@@@Z @ 19 NONAME ; void MusicServices::playReady(class QString const &)
-
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/musicservices/bwins/musicservicesu.def Wed Jun 23 18:10:13 2010 +0300
@@ -0,0 +1,21 @@
+EXPORTS
+ ?currentService@MusicServices@@QAE?AW4MusicService@1@XZ @ 1 NONAME ; enum MusicServices::MusicService MusicServices::currentService(void)
+ ?trUtf8@MusicServices@@SA?AVQString@@PBD0@Z @ 2 NONAME ; class QString MusicServices::trUtf8(char const *, char const *)
+ ?qt_metacast@MusicServices@@UAEPAXPBD@Z @ 3 NONAME ; void * MusicServices::qt_metacast(char const *)
+ ?trUtf8@MusicServices@@SA?AVQString@@PBD0H@Z @ 4 NONAME ; class QString MusicServices::trUtf8(char const *, char const *, int)
+ ?qt_metacall@MusicServices@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 5 NONAME ; int MusicServices::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?contextTitle@MusicServices@@QBE?AVQString@@XZ @ 6 NONAME ; class QString MusicServices::contextTitle(void) const
+ ??0MusicServices@@QAE@XZ @ 7 NONAME ; MusicServices::MusicServices(void)
+ ??_EMusicServices@@UAE@I@Z @ 8 NONAME ; MusicServices::~MusicServices(unsigned int)
+ ?itemSelected@MusicServices@@QAEXVQString@@@Z @ 9 NONAME ; void MusicServices::itemSelected(class QString)
+ ?playReady@MusicServices@@IAEXABVXQSharableFile@@@Z @ 10 NONAME ; void MusicServices::playReady(class XQSharableFile const &)
+ ?tr@MusicServices@@SA?AVQString@@PBD0H@Z @ 11 NONAME ; class QString MusicServices::tr(char const *, char const *, int)
+ ?tr@MusicServices@@SA?AVQString@@PBD0@Z @ 12 NONAME ; class QString MusicServices::tr(char const *, char const *)
+ ?getStaticMetaObject@MusicServices@@SAABUQMetaObject@@XZ @ 13 NONAME ; struct QMetaObject const & MusicServices::getStaticMetaObject(void)
+ ?serviceActive@MusicServices@@IAEXVTUid@@@Z @ 14 NONAME ; void MusicServices::serviceActive(class TUid)
+ ?metaObject@MusicServices@@UBEPBUQMetaObject@@XZ @ 15 NONAME ; struct QMetaObject const * MusicServices::metaObject(void) const
+ ?setCurrentService@MusicServices@@QAEXW4MusicService@1@@Z @ 16 NONAME ; void MusicServices::setCurrentService(enum MusicServices::MusicService)
+ ?staticMetaObject@MusicServices@@2UQMetaObject@@B @ 17 NONAME ; struct QMetaObject const MusicServices::staticMetaObject
+ ??1MusicServices@@UAE@XZ @ 18 NONAME ; MusicServices::~MusicServices(void)
+ ?playReady@MusicServices@@IAEXABVQString@@@Z @ 19 NONAME ; void MusicServices::playReady(class QString const &)
+
--- a/musicservices/eabi/musicservices.def Fri Jun 11 13:36:36 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-EXPORTS
- _ZN13MusicServices11qt_metacallEN11QMetaObject4CallEiPPv @ 1 NONAME
- _ZN13MusicServices11qt_metacastEPKc @ 2 NONAME
- _ZN13MusicServices12itemSelectedE7QString @ 3 NONAME
- _ZN13MusicServices13serviceActiveE4TUid @ 4 NONAME
- _ZN13MusicServices14currentServiceEv @ 5 NONAME
- _ZN13MusicServices16staticMetaObjectE @ 6 NONAME DATA 16
- _ZN13MusicServices17setCurrentServiceENS_12MusicServiceE @ 7 NONAME
- _ZN13MusicServices19getStaticMetaObjectEv @ 8 NONAME
- _ZN13MusicServices9playReadyERK14XQSharableFile @ 9 NONAME
- _ZN13MusicServices9playReadyERK7QString @ 10 NONAME
- _ZN13MusicServicesC1Ev @ 11 NONAME
- _ZN13MusicServicesC2Ev @ 12 NONAME
- _ZN13MusicServicesD0Ev @ 13 NONAME
- _ZN13MusicServicesD1Ev @ 14 NONAME
- _ZN13MusicServicesD2Ev @ 15 NONAME
- _ZNK13MusicServices10metaObjectEv @ 16 NONAME
- _ZNK13MusicServices12contextTitleEv @ 17 NONAME
- _ZTI13MusicServices @ 18 NONAME
- _ZTV13MusicServices @ 19 NONAME
-
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/musicservices/eabi/musicservicesu.def Wed Jun 23 18:10:13 2010 +0300
@@ -0,0 +1,21 @@
+EXPORTS
+ _ZN13MusicServices11qt_metacallEN11QMetaObject4CallEiPPv @ 1 NONAME
+ _ZN13MusicServices11qt_metacastEPKc @ 2 NONAME
+ _ZN13MusicServices12itemSelectedE7QString @ 3 NONAME
+ _ZN13MusicServices13serviceActiveE4TUid @ 4 NONAME
+ _ZN13MusicServices14currentServiceEv @ 5 NONAME
+ _ZN13MusicServices16staticMetaObjectE @ 6 NONAME DATA 16
+ _ZN13MusicServices17setCurrentServiceENS_12MusicServiceE @ 7 NONAME
+ _ZN13MusicServices19getStaticMetaObjectEv @ 8 NONAME
+ _ZN13MusicServices9playReadyERK14XQSharableFile @ 9 NONAME
+ _ZN13MusicServices9playReadyERK7QString @ 10 NONAME
+ _ZN13MusicServicesC1Ev @ 11 NONAME
+ _ZN13MusicServicesC2Ev @ 12 NONAME
+ _ZN13MusicServicesD0Ev @ 13 NONAME
+ _ZN13MusicServicesD1Ev @ 14 NONAME
+ _ZN13MusicServicesD2Ev @ 15 NONAME
+ _ZNK13MusicServices10metaObjectEv @ 16 NONAME
+ _ZNK13MusicServices12contextTitleEv @ 17 NONAME
+ _ZTI13MusicServices @ 18 NONAME
+ _ZTV13MusicServices @ 19 NONAME
+
--- a/musicservices/musicservices.pro Fri Jun 11 13:36:36 2010 +0300
+++ b/musicservices/musicservices.pro Wed Jun 23 18:10:13 2010 +0300
@@ -14,38 +14,32 @@
# Description: Project file for Music Services.
#
-symbian:TARGET.UID3 = 0x10207C69
-
TEMPLATE = lib
CONFIG += hb
TARGET = musicservices
-
-TARGET.CAPABILITY = CAP_GENERAL_DLL
+symbian: {
+ TARGET.UID3 = 0x10207C69
+ MMP_RULES += "DEFFILE musicservices.def"
+ defFilePath = .
+ TARGET.CAPABILITY = CAP_GENERAL_DLL
+ TARGET.EPOCALLOWDLLDATA = 1
+}
+DEFINES += BUILD_MUSICSERVICES_LIB
INCLUDEPATH += . \
- inc \
- ../inc
+ inc \
+ ../inc
INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
LIBS += -lxqservice \
-lxqserviceutil
-symbian:TARGET.EPOCALLOWDLLDATA = 1
-
+# Input
HEADERS += inc/musicservices.h \
- inc/getmusicservice.h \
- inc/playmusicservice.h
+ inc/getmusicservice.h \
+ inc/playmusicservice.h
SOURCES += src/musicservices.cpp \
- src/getmusicservice.cpp \
- src/playmusicservice.cpp
-
-DEFINES += BUILD_MUSICSERVICES_LIB
+ src/getmusicservice.cpp \
+ src/playmusicservice.cpp
-myDefInclude = "NOSTRICTDEF" \
-"$${LITERAL_HASH}if defined(WINS)"\
-"DEFFILE bwins/musicservices.def "\
-"$${LITERAL_HASH}else "\
-"DEFFILE eabi/musicservices.def "\
-"$${LITERAL_HASH}endif"
-MMP_RULES += myDefInclude
--- a/qtmusicplayer.pro Fri Jun 11 13:36:36 2010 +0300
+++ b/qtmusicplayer.pro Wed Jun 23 18:10:13 2010 +0300
@@ -38,11 +38,11 @@
include(mpserviceplugins/m3uplaylistplugin/rom/rom.pri)
}
-SUBDIRS = utilities \
+SUBDIRS = mpdata \
+ mpengine \
+ utilities \
musicservices \
app \
- mpdata \
- mpengine \
mpviewplugins \
musicwidgetplugin
--- a/tsrc/tsrc.pro Fri Jun 11 13:36:36 2010 +0300
+++ b/tsrc/tsrc.pro Wed Jun 23 18:10:13 2010 +0300
@@ -18,6 +18,7 @@
SUBDIRS += ..\mpdata\tsrc
SUBDIRS += ..\mpengine\tsrc
+SUBDIRS += ..\app\tsrc
SUBDIRS += ..\mpviewplugins\mpcollectionviewplugin\tsrc
SUBDIRS += ..\mpviewplugins\mpmediawallviewplugin\tsrc
SUBDIRS += ..\mpviewplugins\mpplaybackviewplugin\tsrc
--- a/utilities/mpnowplayingbanner/mpnowplayingbanner.pro Fri Jun 11 13:36:36 2010 +0300
+++ b/utilities/mpnowplayingbanner/mpnowplayingbanner.pro Wed Jun 23 18:10:13 2010 +0300
@@ -14,41 +14,34 @@
# Description:
#
-symbian:TARGET.UID3 = 0x10207C67
-
TEMPLATE = lib
CONFIG += hb qt
HB += hbfeedback
TARGET = mpnowplayingbanner
-
-TARGET.CAPABILITY = All -TCB
+symbian: {
+ TARGET.UID3 = 0x10207C67
+ MMP_RULES += "DEFFILE mpnowplayingbanner.def"
+ defFilePath = .
+ TARGET.CAPABILITY = CAP_GENERAL_DLL
+ TARGET.EPOCALLOWDLLDATA = 1
+}
+DEFINES += BUILD_MPNOWPLAYINGBANNER
INCLUDEPATH += . \
inc \
../../inc
INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
-LIBS += -lmpengine \
- -lmpdata.dll \
- -lmpxcommon.dll
+LIBS += -lmpengine \
+ -lmpdata \
+ -lmpxcommon
-symbian:TARGET.EPOCALLOWDLLDATA = 1
-
-HEADERS = ../../inc/mpnowplayingwidget.h \
- inc/mpnowplayingwidget_p.h
+# Input
+HEADERS += ../../inc/mpnowplayingwidget.h \
+ inc/mpnowplayingwidget_p.h
SOURCES += src/mpnowplayingwidget.cpp \
- src/mpnowplayingwidget_p.cpp \
-
-
+ src/mpnowplayingwidget_p.cpp
+
RESOURCES += resources/mpnowplayingbanner.qrc
-DEFINES += BUILD_MPNOWPLAYINGBANNER
-
-myDefInclude = "NOSTRICTDEF" \
-"$${LITERAL_HASH}if defined(WINS)"\
-"DEFFILE bwins/mpnowplayingbanneru.def "\
-"$${LITERAL_HASH}else "\
-"DEFFILE eabi/mpnowplayingbanneru.def "\
-"$${LITERAL_HASH}endif"
-MMP_RULES += myDefInclude
--- a/utilities/mpsettingsmanager/bwins/mpsettingsmanageru.def Fri Jun 11 13:36:36 2010 +0300
+++ b/utilities/mpsettingsmanager/bwins/mpsettingsmanageru.def Wed Jun 23 18:10:13 2010 +0300
@@ -29,4 +29,7 @@
?setSongDetailsGb@MpSettingsManager@@SAX_N@Z @ 28 NONAME ; void MpSettingsManager::setSongDetailsGb(bool)
?SongDetailsGbChanged@MpSettingsManager@@IAEX_N@Z @ 29 NONAME ; void MpSettingsManager::SongDetailsGbChanged(bool)
?songDetailsGb@MpSettingsManager@@SA_NXZ @ 30 NONAME ; bool MpSettingsManager::songDetailsGb(void)
+ ?mtpInfoUrl@MpSettingsManager@@SA?AVQString@@XZ @ 31 NONAME ; class QString MpSettingsManager::mtpInfoUrl(void)
+ ?showMtpInfo@MpSettingsManager@@SA_NXZ @ 32 NONAME ; bool MpSettingsManager::showMtpInfo(void)
+ ?stopShowingMtpInfo@MpSettingsManager@@SAXXZ @ 33 NONAME ; void MpSettingsManager::stopShowingMtpInfo(void)
Binary file utilities/mpsettingsmanager/conf/musicplayer.confml has changed
Binary file utilities/mpsettingsmanager/conf/musicplayer_10207C92.crml has changed
--- a/utilities/mpsettingsmanager/eabi/mpsettingsmanageru.def Fri Jun 11 13:36:36 2010 +0300
+++ b/utilities/mpsettingsmanager/eabi/mpsettingsmanageru.def Wed Jun 23 18:10:13 2010 +0300
@@ -29,4 +29,7 @@
_ZN17MpSettingsManager13songDetailsGbEv @ 28 NONAME
_ZN17MpSettingsManager16setSongDetailsGbEb @ 29 NONAME
_ZN17MpSettingsManager20SongDetailsGbChangedEb @ 30 NONAME
+ _ZN17MpSettingsManager10mtpInfoUrlEv @ 31 NONAME
+ _ZN17MpSettingsManager11showMtpInfoEv @ 32 NONAME
+ _ZN17MpSettingsManager18stopShowingMtpInfoEv @ 33 NONAME
--- a/utilities/mpsettingsmanager/inc/mpsettingsmanagerdefs.h Fri Jun 11 13:36:36 2010 +0300
+++ b/utilities/mpsettingsmanager/inc/mpsettingsmanagerdefs.h Wed Jun 23 18:10:13 2010 +0300
@@ -26,7 +26,9 @@
const qint32 KMPCenRepSettingPresetIdKey = {0x00000004};
const qint32 KMPCenRepSettingRamdiskEnabled = {0x00000005};
const qint32 KMPCenRepSettingRamdiskMaxDiskSpace = {0x00000006};
- const qint32 KMPCenRepSettingInspireMeKey = {0x00000007};
- const qint32 KMPCenRepSettingSongDetailsGBKey = {0x00000008};
-
+ const qint32 KMPCenRepSettingInspireMeKey = {0x00000007};
+ const qint32 KMPCenRepSettingSongDetailsGBKey = {0x00000008};
+ const qint32 KMusicPlayerShowMtpInfoKey = {0x00000009};
+ const qint32 KMusicPlayerMtpInfoUrlKey = {0x0000000A};
+
#endif // MPSETTINGSMANAGERDEFS_H
--- a/utilities/mpsettingsmanager/mpsettingsmanager.pro Fri Jun 11 13:36:36 2010 +0300
+++ b/utilities/mpsettingsmanager/mpsettingsmanager.pro Wed Jun 23 18:10:13 2010 +0300
@@ -19,34 +19,28 @@
TEMPLATE = lib
CONFIG += hb qt
TARGET = mpsettingsmanager
-
-TARGET.CAPABILITY = All -TCB
+symbian: {
+ TARGET.UID3 = 0x10207C68
+ MMP_RULES += "DEFFILE mpsettingsmanager.def"
+ defFilePath = .
+ TARGET.CAPABILITY = CAP_GENERAL_DLL
+ TARGET.EPOCALLOWDLLDATA = 1
+ BLD_INF_RULES.prj_exports += \
+ "$${LITERAL_HASH}include <platform_paths.hrh>" \
+ "conf/musicplayer.confml APP_LAYER_CONFML(musicplayer.confml)" \
+ "conf/musicplayer_10207C92.crml APP_LAYER_CRML(musicplayer_10207C92.crml)"
+}
+DEFINES += BUILD_MPSETTINGSMANAGER
INCLUDEPATH += . \
inc \
../../inc
-
INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
-LIBS+= -lxqsettingsmanager
-
-symbian:TARGET.EPOCALLOWDLLDATA = 1
-
-HEADERS = ../../inc/mpsettingsmanager.h
-
-SOURCES += src/mpsettingsmanager.cpp
-DEFINES += BUILD_MPSETTINGSMANAGER
-
+LIBS += -lxqsettingsmanager.dll
-myDefInclude = "NOSTRICTDEF" \
-"$${LITERAL_HASH}if defined(WINS)"\
-"DEFFILE bwins/mpsettingsmanageru.def "\
-"$${LITERAL_HASH}else "\
-"DEFFILE eabi/mpsettingsmanageru.def "\
-"$${LITERAL_HASH}endif"
-MMP_RULES += myDefInclude
+# Input
+HEADERS += ../../inc/mpsettingsmanager.h
-BLD_INF_RULES.prj_exports += \
- "$${LITERAL_HASH}include <platform_paths.hrh>" \
- "conf/musicplayer.confml APP_LAYER_CONFML(musicplayer.confml)" \
- "conf/musicplayer_10207C92.crml APP_LAYER_CRML(musicplayer_10207C92.crml)"
+SOURCES += src/mpsettingsmanager.cpp
+
--- a/utilities/mpsettingsmanager/src/mpsettingsmanager.cpp Fri Jun 11 13:36:36 2010 +0300
+++ b/utilities/mpsettingsmanager/src/mpsettingsmanager.cpp Wed Jun 23 18:10:13 2010 +0300
@@ -93,6 +93,17 @@
KMPCenRepSettingSongDetailsGBKey);
mSongDetailsGb = mSettingsManager->readItemValue(SongDetailsGbKey).toInt();
mSettingsManager->startMonitoring(SongDetailsGbKey);
+
+ XQSettingsKey showMtpInfo(XQSettingsKey::TargetCentralRepository,
+ KMPCenRepSettingsFeature,
+ KMusicPlayerShowMtpInfoKey);
+ mShowMtpInfo = mSettingsManager->readItemValue(showMtpInfo).toInt();
+ mSettingsManager->startMonitoring(showMtpInfo);
+
+ XQSettingsKey mtpInfoUrl(XQSettingsKey::TargetCentralRepository,
+ KMPCenRepSettingsFeature,
+ KMusicPlayerMtpInfoUrlKey);
+ mMtpInfoUrl = mSettingsManager->readItemValue(mtpInfoUrl, XQSettingsManager::TypeString).toString();
TX_EXIT
}
@@ -161,6 +172,22 @@
return instance()->mSongDetailsGb;
}
+/*!
+ Returns wheter mtp info should be showed.
+ */
+bool MpSettingsManager::showMtpInfo()
+{
+ return instance()->mShowMtpInfo;
+}
+
+/*!
+ Returns mtp info url.
+ */
+QString MpSettingsManager::mtpInfoUrl()
+{
+ return instance()->mMtpInfoUrl;
+}
+
/*!
Slot to be called when a setting is changed.
@@ -195,6 +222,10 @@
TX_LOG_ARGS("SongDetailsGB changed to "<< mSongDetailsGb);
emit SongDetailsGbChanged( mSongDetailsGb );
break;
+ case KMusicPlayerShowMtpInfoKey:
+ mShowMtpInfo = value.toInt();
+ TX_LOG_ARGS("Show MTP info changed to "<< mShowMtpInfo);
+ break;
default :
TX_LOG_ARGS(" unhandled cenrep key: " << key.key() <<
"; should never get here.");
@@ -277,3 +308,16 @@
TX_EXIT
}
+/*!
+ Slot to be called to stop showing mtp info.
+ */
+void MpSettingsManager::stopShowingMtpInfo()
+{
+ TX_STATIC_ENTRY_ARGS("preset=" << preset);
+ XQSettingsKey showMtpInfo(XQSettingsKey::TargetCentralRepository,
+ KMPCenRepSettingsFeature,
+ KMusicPlayerShowMtpInfoKey);
+ instance()->mSettingsManager->writeItemValue(showMtpInfo, 0);
+ TX_EXIT
+}
+
--- a/utilities/mpsettingsmanager/tsrc/unittest_mpsettingsmanager/inc/unittest_mpsettingsmanager.h Fri Jun 11 13:36:36 2010 +0300
+++ b/utilities/mpsettingsmanager/tsrc/unittest_mpsettingsmanager/inc/unittest_mpsettingsmanager.h Wed Jun 23 18:10:13 2010 +0300
@@ -41,13 +41,20 @@
private slots:
void testConstructor(); //don't change the order, this should be the first test.
void testInstanceConstruction();
+ void testFirstStartupGet();
void testShuffleGetAndSet();
void testRepeatGetAndSet();
void testPresetGetAndSet();
+ void testInspireMeGetAndSet();
+ void testSongDetailsGbGetAndSet();
+ void testShowMtpInfoGetAndStop();
+ void testMtpInfoUrlGet();
void testValueChangedShuffleCase();
void testValueChangedRepeatCase();
void testValueChangedPresetCase();
-
+ void testValueChangedInspireMe();
+ void testValueChangedSongDetailsGb();
+ void testValueChangedShowMtpInfo();
};
--- a/utilities/mpsettingsmanager/tsrc/unittest_mpsettingsmanager/src/unittest_mpsettingsmanager.cpp Fri Jun 11 13:36:36 2010 +0300
+++ b/utilities/mpsettingsmanager/tsrc/unittest_mpsettingsmanager/src/unittest_mpsettingsmanager.cpp Wed Jun 23 18:10:13 2010 +0300
@@ -51,7 +51,7 @@
pass[2] = "c:\\data\\unittest_mpsettingsmanager.txt";
return QTest::qExec(&tv, 3, pass);
- }
+ }
}
TestMpSettingsManager::TestMpSettingsManager()
@@ -102,15 +102,40 @@
test = new MpSettingsManager();
QVERIFY(test);
QVERIFY(test->mSettingsManager);
-
+
+ QCOMPARE(test->mSettingsManager->readItemValueRequestCount(KMPCenRepSettingFirstStartupKey),1);
+ QCOMPARE(test->mSettingsManager->writeItemValueRequestCount(KMPCenRepSettingFirstStartupKey),1);
+ QCOMPARE(test->mSettingsManager->startMonitoringRequestCount(KMPCenRepSettingFirstStartupKey),0);
+ QCOMPARE(test->mFirstStartup, true);
+
QCOMPARE(test->mSettingsManager->readItemValueRequestCount(KMPCenRepSettingShuffleKey),1);
QCOMPARE(test->mSettingsManager->startMonitoringRequestCount(KMPCenRepSettingShuffleKey), 1);
QCOMPARE(test->mShuffle, true);
-
+
QCOMPARE(test->mSettingsManager->readItemValueRequestCount(KMPCenRepSettingRepeatKey),1);
QCOMPARE(test->mSettingsManager->startMonitoringRequestCount(KMPCenRepSettingRepeatKey),1);
QCOMPARE(test->mRepeat, true);
-
+
+ QCOMPARE(test->mSettingsManager->readItemValueRequestCount(KMPCenRepSettingPresetIdKey),1);
+ QCOMPARE(test->mSettingsManager->startMonitoringRequestCount(KMPCenRepSettingPresetIdKey),1);
+ QCOMPARE(test->mPreset, 1);
+
+ QCOMPARE(test->mSettingsManager->readItemValueRequestCount(KMPCenRepSettingInspireMeKey),1);
+ QCOMPARE(test->mSettingsManager->startMonitoringRequestCount(KMPCenRepSettingInspireMeKey),1);
+ QCOMPARE(test->mInspireMe, true);
+
+ QCOMPARE(test->mSettingsManager->readItemValueRequestCount(KMPCenRepSettingSongDetailsGBKey),1);
+ QCOMPARE(test->mSettingsManager->startMonitoringRequestCount(KMPCenRepSettingSongDetailsGBKey),1);
+ QCOMPARE(test->mSongDetailsGb, true);
+
+ QCOMPARE(test->mSettingsManager->readItemValueRequestCount(KMusicPlayerShowMtpInfoKey),1);
+ QCOMPARE(test->mSettingsManager->startMonitoringRequestCount(KMusicPlayerShowMtpInfoKey),1);
+ QCOMPARE(test->mShowMtpInfo, true);
+
+ QCOMPARE(test->mSettingsManager->readItemValueRequestCount(KMusicPlayerMtpInfoUrlKey),1);
+ QCOMPARE(test->mSettingsManager->startMonitoringRequestCount(KMusicPlayerMtpInfoUrlKey),0);
+ QCOMPARE(test->mMtpInfoUrl, QString("testText"));
+
delete test;
test = 0;
}
@@ -124,19 +149,56 @@
test = MpSettingsManager::instance();
QVERIFY(test);
QVERIFY(test->mSettingsManager);
-
+
+ QCOMPARE(test->mSettingsManager->readItemValueRequestCount(KMPCenRepSettingFirstStartupKey),1);
+ QCOMPARE(test->mSettingsManager->writeItemValueRequestCount(KMPCenRepSettingFirstStartupKey),1);
+ QCOMPARE(test->mSettingsManager->startMonitoringRequestCount(KMPCenRepSettingFirstStartupKey),0);
+ QCOMPARE(test->mFirstStartup, true);
+
QCOMPARE(test->mSettingsManager->readItemValueRequestCount(KMPCenRepSettingShuffleKey),1);
QCOMPARE(test->mSettingsManager->startMonitoringRequestCount(KMPCenRepSettingShuffleKey), 1);
QCOMPARE(test->mShuffle, true);
-
+
QCOMPARE(test->mSettingsManager->readItemValueRequestCount(KMPCenRepSettingRepeatKey),1);
QCOMPARE(test->mSettingsManager->startMonitoringRequestCount(KMPCenRepSettingRepeatKey),1);
QCOMPARE(test->mRepeat, true);
-
+
+ QCOMPARE(test->mSettingsManager->readItemValueRequestCount(KMPCenRepSettingPresetIdKey),1);
+ QCOMPARE(test->mSettingsManager->startMonitoringRequestCount(KMPCenRepSettingPresetIdKey),1);
+ QCOMPARE(test->mPreset, 1);
+
+ QCOMPARE(test->mSettingsManager->readItemValueRequestCount(KMPCenRepSettingInspireMeKey),1);
+ QCOMPARE(test->mSettingsManager->startMonitoringRequestCount(KMPCenRepSettingInspireMeKey),1);
+ QCOMPARE(test->mInspireMe, true);
+
+ QCOMPARE(test->mSettingsManager->readItemValueRequestCount(KMPCenRepSettingSongDetailsGBKey),1);
+ QCOMPARE(test->mSettingsManager->startMonitoringRequestCount(KMPCenRepSettingSongDetailsGBKey),1);
+ QCOMPARE(test->mSongDetailsGb, true);
+
+ QCOMPARE(test->mSettingsManager->readItemValueRequestCount(KMusicPlayerShowMtpInfoKey),1);
+ QCOMPARE(test->mSettingsManager->startMonitoringRequestCount(KMusicPlayerShowMtpInfoKey),1);
+ QCOMPARE(test->mShowMtpInfo, true);
+
+ QCOMPARE(test->mSettingsManager->readItemValueRequestCount(KMusicPlayerMtpInfoUrlKey),1);
+ QCOMPARE(test->mSettingsManager->startMonitoringRequestCount(KMusicPlayerMtpInfoUrlKey),0);
+ QCOMPARE(test->mMtpInfoUrl, QString("testText"));
+
QCOMPARE(test, MpSettingsManager::instance()); // test that instance returns the singleton
}
/*!
+testFirstStartupGet
+ */
+void TestMpSettingsManager::testFirstStartupGet()
+{
+ MpSettingsManager *test;
+ test = MpSettingsManager::instance();
+
+ QCOMPARE(test->firstStartup(), true);
+
+}
+
+/*!
testShuffleGetAndSet
*/
void TestMpSettingsManager::testShuffleGetAndSet()
@@ -148,13 +210,13 @@
test->mShuffle = true;
MpSettingsManager::setShuffle(false);
QCOMPARE(test->mSettingsManager->writeRequestValue(KMPCenRepSettingShuffleKey),QVariant(false));
- QCOMPARE(test->mShuffle, true); //should not chaqnge until stored in cenrep
+ QCOMPARE(MpSettingsManager::shuffle(), true); //should not chaqnge until stored in cenrep
test->mShuffle = false;
test->setShuffle(true);
QCOMPARE(test->mSettingsManager->writeRequestValue(KMPCenRepSettingShuffleKey),QVariant(true));
- QCOMPARE(test->mShuffle, false);//should not chaqnge until stored in cenrep
+ QCOMPARE(MpSettingsManager::shuffle(), false);//should not chaqnge until stored in cenrep
//make sure there are not unecesary request to cenrep.
QCOMPARE(test->mSettingsManager->writeItemValueRequestCount(KMPCenRepSettingShuffleKey),2);
@@ -174,13 +236,13 @@
test->mRepeat = true;
MpSettingsManager::setRepeat(false);
QCOMPARE(test->mSettingsManager->writeRequestValue(KMPCenRepSettingRepeatKey),QVariant(false));
- QCOMPARE(test->mRepeat, true); //should not chaqnge until stored in cenrep
+ QCOMPARE(MpSettingsManager::repeat(), true); //should not chaqnge until stored in cenrep
test->mRepeat = false;
test->setRepeat(true);
QCOMPARE(test->mSettingsManager->writeRequestValue(KMPCenRepSettingRepeatKey),QVariant(true));
- QCOMPARE(test->mRepeat, false);//should not chaqnge until stored in cenrep
+ QCOMPARE(MpSettingsManager::repeat(), false);//should not chaqnge until stored in cenrep
//make sure there are not unecesary request to cenrep.
QCOMPARE(test->mSettingsManager->writeItemValueRequestCount(KMPCenRepSettingRepeatKey),2);
@@ -200,13 +262,13 @@
test->mPreset = 1;
MpSettingsManager::setPreset(0);
QCOMPARE(test->mSettingsManager->writeRequestValue(KMPCenRepSettingPresetIdKey),QVariant(0));
- QCOMPARE(test->mPreset, 1); //should not chaqnge until stored in cenrep
+ QCOMPARE(MpSettingsManager::preset(), 1); //should not chaqnge until stored in cenrep
test->mPreset = 0;
test->setPreset(1);
QCOMPARE(test->mSettingsManager->writeRequestValue(KMPCenRepSettingPresetIdKey),QVariant(1));
- QCOMPARE(test->mPreset, 0);//should not chaqnge until stored in cenrep
+ QCOMPARE(MpSettingsManager::preset(), 0);//should not chaqnge until stored in cenrep
//make sure there are not unecesary request to cenrep.
QCOMPARE(test->mSettingsManager->writeItemValueRequestCount(KMPCenRepSettingPresetIdKey),2);
@@ -215,6 +277,100 @@
}
/*!
+testInspireMeGetAndSet
+ */
+void TestMpSettingsManager::testInspireMeGetAndSet()
+{
+ MpSettingsManager *test;
+ test = MpSettingsManager::instance();
+ test->mSettingsManager->clear();
+
+ test->mInspireMe = true;
+ MpSettingsManager::setInspireMe(false);
+ QCOMPARE(test->mSettingsManager->writeRequestValue(KMPCenRepSettingInspireMeKey),QVariant(false));
+ QCOMPARE(MpSettingsManager::inspireMe(), true); //should not chaqnge until stored in cenrep
+
+
+ test->mInspireMe = false;
+ test->setInspireMe(true);
+ QCOMPARE(test->mSettingsManager->writeRequestValue(KMPCenRepSettingInspireMeKey),QVariant(true));
+ QCOMPARE(MpSettingsManager::inspireMe(), false);//should not chaqnge until stored in cenrep
+
+ //make sure there are not unecesary request to cenrep.
+ QCOMPARE(test->mSettingsManager->writeItemValueRequestCount(KMPCenRepSettingInspireMeKey), 2);
+ QCOMPARE(test->mSettingsManager->readItemValueRequestCount(KMPCenRepSettingInspireMeKey), 0);
+ QCOMPARE(test->mSettingsManager->startMonitoringRequestCount(KMPCenRepSettingInspireMeKey), 0);
+}
+
+/*!
+testSongDetailsGbGetAndSet
+ */
+void TestMpSettingsManager::testSongDetailsGbGetAndSet()
+{
+ MpSettingsManager *test;
+ test = MpSettingsManager::instance();
+ test->mSettingsManager->clear();
+
+ test->mSongDetailsGb = true;
+ MpSettingsManager::setSongDetailsGb(false);
+ QCOMPARE(test->mSettingsManager->writeRequestValue(KMPCenRepSettingSongDetailsGBKey),QVariant(false));
+ QCOMPARE(MpSettingsManager::songDetailsGb(), true); //should not chaqnge until stored in cenrep
+
+
+ test->mSongDetailsGb = false;
+ test->setSongDetailsGb(true);
+ QCOMPARE(test->mSettingsManager->writeRequestValue(KMPCenRepSettingSongDetailsGBKey),QVariant(true));
+ QCOMPARE(MpSettingsManager::songDetailsGb(), false);//should not chaqnge until stored in cenrep
+
+ //make sure there are not unecesary request to cenrep.
+ QCOMPARE(test->mSettingsManager->writeItemValueRequestCount(KMPCenRepSettingSongDetailsGBKey), 2);
+ QCOMPARE(test->mSettingsManager->readItemValueRequestCount(KMPCenRepSettingSongDetailsGBKey), 0);
+ QCOMPARE(test->mSettingsManager->startMonitoringRequestCount(KMPCenRepSettingSongDetailsGBKey), 0);
+}
+
+/*!
+testShowMtpInfoGetAndStop
+ */
+void TestMpSettingsManager::testShowMtpInfoGetAndStop()
+{
+ MpSettingsManager *test;
+ test = MpSettingsManager::instance();
+ test->mSettingsManager->clear();
+
+ test->mShowMtpInfo = true;
+ MpSettingsManager::stopShowingMtpInfo();
+ QCOMPARE(test->mSettingsManager->writeRequestValue(KMusicPlayerShowMtpInfoKey),QVariant(false));
+ QCOMPARE(MpSettingsManager::showMtpInfo(), true); //should not chaqnge until stored in cenrep
+
+
+ test->mShowMtpInfo = false;
+ QCOMPARE(MpSettingsManager::showMtpInfo(), false);
+
+ //make sure there are not unecesary request to cenrep.
+ QCOMPARE(test->mSettingsManager->writeItemValueRequestCount(KMusicPlayerShowMtpInfoKey), 1);
+ QCOMPARE(test->mSettingsManager->readItemValueRequestCount(KMusicPlayerShowMtpInfoKey), 0);
+ QCOMPARE(test->mSettingsManager->startMonitoringRequestCount(KMusicPlayerShowMtpInfoKey), 0);
+}
+
+/*!
+testMtpInfoUrlGet
+ */
+void TestMpSettingsManager::testMtpInfoUrlGet()
+{
+ MpSettingsManager *test;
+ test = MpSettingsManager::instance();
+ test->mSettingsManager->clear();
+
+ test->mMtpInfoUrl = QString("http:\\nokia.com");
+ QCOMPARE(MpSettingsManager::mtpInfoUrl(), QString("http:\\nokia.com"));
+
+ //make sure there are not unecesary request to cenrep.
+ QCOMPARE(test->mSettingsManager->writeItemValueRequestCount(KMusicPlayerMtpInfoUrlKey), 0);
+ QCOMPARE(test->mSettingsManager->readItemValueRequestCount(KMusicPlayerMtpInfoUrlKey), 0);
+ QCOMPARE(test->mSettingsManager->startMonitoringRequestCount(KMusicPlayerMtpInfoUrlKey), 0);
+}
+
+/*!
testValueChangedShuffleCase.
*/
void TestMpSettingsManager::testValueChangedShuffleCase()
@@ -286,5 +442,70 @@
}
+/*!
+ testValueChangedInspireMe.
+ */
+void TestMpSettingsManager::testValueChangedInspireMe()
+{
+ MpSettingsManager *test;
+ test = MpSettingsManager::instance();
+
+ XQSettingsKey InspireMeKey(XQSettingsKey::TargetCentralRepository,
+ KMPCenRepSettingsFeature,
+ KMPCenRepSettingInspireMeKey);
+ test->mInspireMe = true;
+ test->valueChanged(InspireMeKey, QVariant(0));
+ QCOMPARE(test->mInspireMe, false);
+
+ test->mInspireMe = false;
+ QSignalSpy spy( test, SIGNAL(InspireMeChanged(bool) ) );
+ test->mSettingsManager->emitValueChanged(InspireMeKey, QVariant(1));
+ QCOMPARE(spy.count(), 1);
+ QCOMPARE(spy.at(0).at(0), QVariant(true) );
+ QCOMPARE(test->mInspireMe, true);
+}
+
+/*!
+ testValueChangedSongDetailsGb.
+ */
+void TestMpSettingsManager::testValueChangedSongDetailsGb()
+{
+ MpSettingsManager *test;
+ test = MpSettingsManager::instance();
+
+ XQSettingsKey SongDetailsGbKey(XQSettingsKey::TargetCentralRepository,
+ KMPCenRepSettingsFeature,
+ KMPCenRepSettingSongDetailsGBKey);
+ test->mSongDetailsGb = true;
+ test->valueChanged(SongDetailsGbKey, QVariant(0));
+ QCOMPARE(test->mSongDetailsGb, false);
+
+ test->mSongDetailsGb = false;
+ QSignalSpy spy( test, SIGNAL(SongDetailsGbChanged(bool) ) );
+ test->mSettingsManager->emitValueChanged(SongDetailsGbKey, QVariant(1));
+ QCOMPARE(spy.count(), 1);
+ QCOMPARE(spy.at(0).at(0), QVariant(true) );
+ QCOMPARE(test->mSongDetailsGb, true);
+}
+
+/*!
+ testValueChangedShowMtpInfo.
+ */
+void TestMpSettingsManager::testValueChangedShowMtpInfo()
+{
+ MpSettingsManager *test;
+ test = MpSettingsManager::instance();
+
+ XQSettingsKey showMtpInfo(XQSettingsKey::TargetCentralRepository,
+ KMPCenRepSettingsFeature,
+ KMusicPlayerShowMtpInfoKey);
+ test->mShowMtpInfo = true;
+ test->valueChanged(showMtpInfo, QVariant(0));
+ QCOMPARE(test->mShowMtpInfo, false);
+
+ test->mShowMtpInfo = false;
+ test->mSettingsManager->emitValueChanged(showMtpInfo, QVariant(1));
+ QCOMPARE(test->mShowMtpInfo, true);
+}
// End of file
--- a/utilities/mpsettingsmanager/tsrc/unittest_mpsettingsmanager/stub/src/xqsettingsmanager.cpp Fri Jun 11 13:36:36 2010 +0300
+++ b/utilities/mpsettingsmanager/tsrc/unittest_mpsettingsmanager/stub/src/xqsettingsmanager.cpp Wed Jun 23 18:10:13 2010 +0300
@@ -38,15 +38,24 @@
*/
QVariant XQSettingsManager::readItemValue(const XQSettingsKey& key, XQSettingsManager::Type type)
{
- Q_UNUSED(type);
+
if ( mReadCount.contains( key.key() ) ) {
mReadCount.insert(key.key(), mReadCount.take ( key.key() ) + 1 );
}
else {
mReadCount.insert(key.key(), 1);
}
- // 1 seems compatible for int and bool keys, change it if new key types are added.
- return QVariant(1);
+
+ QVariant result;
+ switch ( type ) {
+ case TypeString :
+ result = QString("testText") ;
+ break;
+ default:
+ result = int(1);
+ break;
+ }
+ return result;
}
/*!