mpviewplugins/mpcollectionviewplugin/inc/mpmpxframeworkwrapper.h
changeset 22 ecf06a08d4d9
parent 20 82baf59ce8dd
child 23 d45f4c087764
child 25 3ec52facab4d
child 34 2c5162224003
equal deleted inserted replaced
20:82baf59ce8dd 22:ecf06a08d4d9
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: Wrapper for mpx framework utilities.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef MPMPXFRAMEWORKWRAPPER_H
       
    19 #define MPMPXFRAMEWORKWRAPPER_H
       
    20 
       
    21 #include <QObject>
       
    22 
       
    23 #include "mpmpxcollectionviewdefs.h"
       
    24 #include "mpcommondefs.h"
       
    25 
       
    26 class MpMpxFrameworkWrapperPrivate;
       
    27 class MpMpxCollectionData;
       
    28 class QStringList;
       
    29 
       
    30 
       
    31 class MpMpxFrameworkWrapper : public QObject
       
    32 {
       
    33     Q_OBJECT
       
    34 
       
    35     friend class MpMpxFrameworkWrapperPrivate;
       
    36 
       
    37 public:
       
    38 
       
    39     explicit MpMpxFrameworkWrapper( 
       
    40         MpCommon::MpViewMode viewMode=MpCommon::DefaultView, QObject *parent=0 );
       
    41     virtual ~MpMpxFrameworkWrapper();
       
    42 
       
    43     void openCollection( TCollectionContext context );
       
    44     void openCollectionItem( int index );
       
    45     void back();
       
    46     void findPlaylists( QStringList &playlists );
       
    47     void createPlaylist( QString &playlistName, QList<int> &selection, MpMpxCollectionData* collectionData = 0  );
       
    48     void saveToPlaylist( int playlistIndex, QList<int> &selection );
       
    49     void saveToCurrentPlaylist( QList<int> &selection, MpMpxCollectionData *collectionData );    
       
    50     void renamePlaylist( QString &newName, int index );
       
    51     void renamePlaylist( QString &newName );
       
    52     void deleteSongs( QList<int> &selection );
       
    53     void setShuffle( bool active );
       
    54     
       
    55     void previewItem( int index );
       
    56     void openIsolatedCollection( TCollectionContext context );
       
    57     void releaseIsolatedCollection();
       
    58     
       
    59     MpMpxCollectionData *collectionData();
       
    60     
       
    61 signals:
       
    62 
       
    63     void collectionPlaylistOpened();
       
    64     void playlistSaved( bool success );
       
    65     void songsDeleted( bool success );
       
    66     void playlistsRenamed( bool success );
       
    67     
       
    68     void isolatedCollectionOpened( MpMpxCollectionData* collectionData );
       
    69 
       
    70 public slots:
       
    71 
       
    72     void reopenCollection();
       
    73     void reorderPlaylist( int playlistId, int songId, int originalOrdinal, int newOrdinal );
       
    74 
       
    75 private:
       
    76 
       
    77     Q_DISABLE_COPY( MpMpxFrameworkWrapper )
       
    78     MpMpxFrameworkWrapperPrivate *d_ptr;
       
    79 
       
    80 };
       
    81 
       
    82 #endif // MPMPXFRAMEWORKWRAPPER_H