ui/commandhandlers/commoncommandhandlers/inc/glxcommandhandleraddtocontainer.h
branchRCL_3
changeset 59 8e5f6eea9c9f
equal deleted inserted replaced
57:ea65f74e6de4 59:8e5f6eea9c9f
       
     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: 
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef GLXCOMMANDHANDLERADDTOCONTAINER_H
       
    19 #define GLXCOMMANDHANDLERADDTOCONTAINER_H
       
    20 
       
    21 #include <QModelIndexList>
       
    22 #include <glxmpxcommandhandler.h>
       
    23 #include <QGraphicsWidget>
       
    24 
       
    25 #ifdef BUILD_COMMONCOMMANDHANDLERS
       
    26 #define GLX_COMMONCOMMANDHANDLERS_EXPORT Q_DECL_EXPORT
       
    27 #else
       
    28 #define GLX_COMMONCOMMANDHANDLERS_EXPORT Q_DECL_IMPORT
       
    29 #endif
       
    30 class CMPXCollectionPath;
       
    31 class HbPushButton;
       
    32 class HbListView;
       
    33 class QGraphicsGridLayout;
       
    34 class GlxAlbumModel;
       
    35 class QGraphicsItem;
       
    36 class QItemSelectionModel;
       
    37 class QEventLoop;
       
    38 
       
    39 class GLX_COMMONCOMMANDHANDLERS_EXPORT GlxCommandHandlerAddToContainer : public GlxMpxCommandHandler
       
    40 {
       
    41   
       
    42 public:
       
    43     GlxCommandHandlerAddToContainer();
       
    44     ~GlxCommandHandlerAddToContainer();
       
    45     CMPXCommand* CreateCommandL(TInt aCommandId, MGlxMediaList& aMediaList, TBool& aConsume) const ;
       
    46 
       
    47 private:
       
    48     QString CompletionTextL() const;
       
    49     QString ProgressTextL() const; 
       
    50     void createNewMedia() const;
       
    51 
       
    52 private:
       
    53     mutable bool mNewMediaAdded ;
       
    54     mutable CMPXCollectionPath* mTargetContainers ;
       
    55     mutable QString mAlbumName;
       
    56 };
       
    57 
       
    58 class GlxAlbumSelectionPopup: public QObject
       
    59 {
       
    60     Q_OBJECT
       
    61 
       
    62 public:
       
    63     GlxAlbumSelectionPopup();
       
    64     ~GlxAlbumSelectionPopup();
       
    65     QModelIndexList GetSelectionList(GlxAlbumModel *model,bool *ok = 0) ;
       
    66     
       
    67 private slots:
       
    68     void dialogClosed( HbAction *action ) ;
       
    69     
       
    70 private :
       
    71     QItemSelectionModel * mSelectionModel; //no owner ship
       
    72     QEventLoop *mEventLoop;
       
    73     bool mResult;        
       
    74 };
       
    75     
       
    76 #endif // GLXCOMMANDHANDLERADDTOCONTAINER_H