ui/commandhandlers/commoncommandhandlers/inc/glxcommandhandleraddtocontainer.h
changeset 29 2c833fc9e98f
parent 24 99ad1390cd33
child 50 a0f57508af73
equal deleted inserted replaced
26:c499df2dbb33 29:2c833fc9e98f
    31 class HbPushButton;
    31 class HbPushButton;
    32 class HbListView;
    32 class HbListView;
    33 class QGraphicsGridLayout;
    33 class QGraphicsGridLayout;
    34 class GlxAlbumModel;
    34 class GlxAlbumModel;
    35 class QGraphicsItem;
    35 class QGraphicsItem;
       
    36 class HbDialog;
       
    37 class QItemSelectionModel;
       
    38 class QEventLoop;
    36 
    39 
    37 class GLX_COMMONCOMMANDHANDLERS_EXPORT GlxCommandHandlerAddToContainer : public GlxMpxCommandHandler
    40 class GLX_COMMONCOMMANDHANDLERS_EXPORT GlxCommandHandlerAddToContainer : public GlxMpxCommandHandler
    38 	{
    41 {
    39 	Q_OBJECT    
    42   
    40 public:
    43 public:
    41     GlxCommandHandlerAddToContainer();
    44     GlxCommandHandlerAddToContainer();
    42     ~GlxCommandHandlerAddToContainer();
    45     ~GlxCommandHandlerAddToContainer();
    43     CMPXCommand* CreateCommandL(TInt aCommandId, MGlxMediaList& aMediaList, TBool& aConsume) const ;
    46     CMPXCommand* CreateCommandL(TInt aCommandId, MGlxMediaList& aMediaList, TBool& aConsume) const ;
    44     QModelIndexList GetSelectionList(GlxAlbumModel *model,bool *ok = 0) const;
       
    45 
    47 
    46 private:
    48 private:
    47     QString CompletionTextL() const;
    49     QString CompletionTextL() const;
    48     QString ProgressTextL() const; 
    50     QString ProgressTextL() const; 
       
    51     void createNewMedia() const;
       
    52 
    49 private:
    53 private:
    50     static TInt iSelectionCount;
    54     static TInt iSelectionCount;
    51     mutable bool mNewMediaAdded ;
    55     mutable bool mNewMediaAdded ;
    52     mutable CMPXCollectionPath* mTargetContainers ;
    56     mutable CMPXCollectionPath* mTargetContainers ;
       
    57 };
    53 
    58 
    54 private slots:    
    59 class GlxAlbumSelectionPopup: public QObject
    55 	void createNewMedia();
    60 {
    56 	};
    61     Q_OBJECT
    57 
    62 
    58 class GlxQueryContentWidget :public QGraphicsWidget
       
    59 {
       
    60 	Q_OBJECT
       
    61 public:
    63 public:
    62     HbPushButton* mButton;
    64     GlxAlbumSelectionPopup();
    63     HbListView* mListView;
    65     ~GlxAlbumSelectionPopup();
    64     QGraphicsGridLayout *mGrid;
    66     QModelIndexList GetSelectionList(GlxAlbumModel *model,bool *ok = 0) ;
    65     GlxQueryContentWidget(QGraphicsItem* parent = 0);
    67     
    66     ~GlxQueryContentWidget();
    68 private slots:
       
    69     void changeButtonText();
       
    70     void dialogClosed( HbAction *action ) ;
       
    71     
       
    72 private :
       
    73     HbDialog* mPopupDlg;
       
    74     QItemSelectionModel * mSelectionModel; //no owner ship
       
    75     QEventLoop *mEventLoop;
       
    76     bool mResult;        
    67 };
    77 };
    68     
    78     
    69     
       
    70 #endif // GLXCOMMANDHANDLERADDTOCONTAINER_H
    79 #endif // GLXCOMMANDHANDLERADDTOCONTAINER_H