ui/commandhandlers/commandhandlerbase/inc/glxmpxcommandhandler.h
changeset 29 2c833fc9e98f
parent 24 99ad1390cd33
child 62 36d93b4dc635
equal deleted inserted replaced
26:c499df2dbb33 29:2c833fc9e98f
    28 #else
    28 #else
    29 #define GLX_COMMANDHANDLERBASE_EXPORT Q_DECL_IMPORT
    29 #define GLX_COMMANDHANDLERBASE_EXPORT Q_DECL_IMPORT
    30 #endif
    30 #endif
    31 class MGlxMediaList;
    31 class MGlxMediaList;
    32 class HbProgressDialog;
    32 class HbProgressDialog;
       
    33 class HbAction;
    33 
    34 
    34 class GLX_COMMANDHANDLERBASE_EXPORT GlxMpxCommandHandler : public GlxCommandHandler, public MGlxMediaListObserver
    35 class GLX_COMMANDHANDLERBASE_EXPORT GlxMpxCommandHandler : public GlxCommandHandler, public MGlxMediaListObserver
    35 {
    36 {
       
    37 Q_OBJECT    
    36 public:
    38 public:
    37     GlxMpxCommandHandler();
    39     GlxMpxCommandHandler();
    38     virtual ~GlxMpxCommandHandler();
    40     virtual ~GlxMpxCommandHandler();
    39     virtual void executeCommand(int commandId,int collectionId,QList<QModelIndex> indexList = QList<QModelIndex>() );
    41     virtual void executeCommand(int commandId,int collectionId,QList<QModelIndex> indexList = QList<QModelIndex>() );
       
    42 
       
    43 public slots:
       
    44     void messageDialogClose(HbAction* action);
    40 
    45 
    41 protected: // From MGlxMediaListObserver    
    46 protected: // From MGlxMediaListObserver    
    42     /// See @ref MGlxMediaListObserver::HandleItemAddedL
    47     /// See @ref MGlxMediaListObserver::HandleItemAddedL
    43     void HandleItemAddedL(TInt aStartIndex, TInt aEndIndex, MGlxMediaList* aList);
    48     void HandleItemAddedL(TInt aStartIndex, TInt aEndIndex, MGlxMediaList* aList);
    44     
    49     
    79 	virtual void HandleErrorL(TInt aErrorCode);
    84 	virtual void HandleErrorL(TInt aErrorCode);
    80 	virtual QString CompletionTextL() const;
    85 	virtual QString CompletionTextL() const;
    81 	virtual QString ProgressTextL() const;        
    86 	virtual QString ProgressTextL() const;        
    82     virtual QString ConfirmationTextL(bool multiSelection = false) const; 
    87     virtual QString ConfirmationTextL(bool multiSelection = false) const; 
    83 private: 
    88 private: 
    84     bool ConfirmationNoteL(MGlxMediaList& aMediaList) const;
    89     void ConfirmationNoteL(MGlxMediaList& aMediaList);
    85     bool ConfirmationNoteSingleL(MGlxMediaList& aMediaList) const;
    90     void ConfirmationNoteSingleL(MGlxMediaList& aMediaList) ;
    86     bool ConfirmationNoteMultipleL(MGlxMediaList& aMediaList) const;
    91     void ConfirmationNoteMultipleL(MGlxMediaList& aMediaList) ;
    87 	void ProgressNoteL(TInt aCommandId);
    92 	void ProgressNoteL(TInt aCommandId);
    88 	void DismissProgressNoteL();
    93 	void DismissProgressNoteL();
    89 	void CompletionNoteL() const;
    94 	void CompletionNoteL() const;
    90     void TryExitL(TInt aErrorCode);
    95     void TryExitL(TInt aErrorCode);
    91     void CreateMediaListL(int aCollectionId, int aHierarchyId, TGlxFilterItemType aFilterType) ;
    96     void CreateMediaListL(int aCollectionId, int aHierarchyId, TGlxFilterItemType aFilterType) ;
    92     void CreateMediaListAlbumItemL(int aCollectionId, int aHierarchyId, TGlxFilterItemType aFilterType);
    97     void CreateMediaListAlbumItemL(int aCollectionId, int aHierarchyId, TGlxFilterItemType aFilterType);
       
    98     void executeMpxCommand(bool execute);
    93 private:
    99 private:
    94     // Instance of Media List
   100     // Instance of Media List
    95     MGlxMediaList* iMediaList;
   101     MGlxMediaList* iMediaList;
    96 	TBool iProgressComplete;
   102 	TBool iProgressComplete;
    97 	HbProgressDialog* mProgressDialog;
   103 	HbProgressDialog* mProgressDialog;
       
   104 	int mCommandId;
    98 };
   105 };
    99 #endif //GLXMPXCOMMANDHANDLER_H
   106 #endif //GLXMPXCOMMANDHANDLER_H