videocollection/videocollectionview/inc/videolistview.h
changeset 35 3738fe97f027
parent 34 bbb98528c666
child 36 8aed59de29f9
equal deleted inserted replaced
34:bbb98528c666 35:3738fe97f027
    13 *
    13 *
    14 * Description:   Videolist view class definition
    14 * Description:   Videolist view class definition
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 
       
    19 #ifndef VIDEOLISTVIEW_H
    18 #ifndef VIDEOLISTVIEW_H
    20 #define VIDEOLISTVIEW_H
    19 #define VIDEOLISTVIEW_H
    21 
    20 
    22 #include <hbview.h>
    21 #include <hbview.h>
    23 #include <qnamespace.h>
    22 #include <qnamespace.h>
   105      * get the emitted commands transported uotside plugin.
   104      * get the emitted commands transported uotside plugin.
   106      *
   105      *
   107      * @param int command id
   106      * @param int command id
   108      */
   107      */
   109     void command(int);
   108     void command(int);
       
   109     
       
   110     /**
       
   111      * Signaled to do delayed loading of components not loaded initially at start up phase
       
   112      *
       
   113      */
       
   114     void doDelayeds();
   110 
   115 
   111 private slots:
   116 private slots:
   112 
   117 
   113     /**
   118     /**
   114      * slot is connected to model's modelReady -signal
   119      * slot is connected to model's modelReady -signal
   115      */
   120      */
   116     void modelReadySlot();
   121     void modelReadySlot();
   117 
   122 
       
   123     /**
       
   124      * slot is connected to plugin's doDelayeds -signal
       
   125      *
       
   126      */
       
   127     void doDelayedsSlot();
       
   128     
   118     /**
   129     /**
   119      * slot is connected to service's titleReady -signal
   130      * slot is connected to service's titleReady -signal
   120      */
   131      */
   121 	void titleReadySlot(const QString& title);
   132 	void titleReadySlot(const QString& title);
   122 
   133 
   132      * triggered signal.
   143      * triggered signal.
   133      *
   144      *
   134      * Activates all videos widget by calling changeWidget.
   145      * Activates all videos widget by calling changeWidget.
   135      *
   146      *
   136      */
   147      */
   137     void openAllVideosViewSlot();
   148     void openAllVideosViewSlot();  
   138 
   149 
   139     /**
   150     /**
   140      * Slot is connected into toolbar's video collection tab's
   151      * Slot is connected into toolbar's video collection tab's
   141      * triggered signal.
   152      * triggered signal.
   142      *
   153      *
   160      */
   171      */
   161     void openServicesViewSlot();
   172     void openServicesViewSlot();
   162 
   173 
   163      /**
   174      /**
   164      * Slot is connected into main menus sort -items
   175      * Slot is connected into main menus sort -items
   165      * Method checks sorting role based on active menu item and starts sorting
   176      * Method checks sorting role based on active menu item and initiates sorting
   166      *
   177      *
   167      */
   178      */
   168     void startSorting();
   179     void startSorting();
   169 
   180 
       
   181      /**
       
   182      * Method checks the sorting role and starts sorting
       
   183      *
       
   184      */
       
   185     void doSorting(int role);
       
   186     
   170     /**
   187     /**
   171      * Slot is connected into main menus "delete items" (delete...) signal
   188      * Slot is connected into main menus "delete items" (delete...) signal
   172      *
   189      *
   173      * Calls ui utils to show multiple delete dialog for current widget
   190      * Calls ui utils to show multiple delete dialog for current widget
   174      *
   191      *
   185     /**
   202     /**
   186      * Slot is connected into toolbar's  "Add videos" signal
   203      * Slot is connected into toolbar's  "Add videos" signal
   187      *
   204      *
   188      */
   205      */
   189     void addVideosToCollectionSlot();
   206     void addVideosToCollectionSlot();
       
   207     
       
   208     /**
       
   209      * Slot is connected into toolbar's "remove videos" signal
       
   210      */
       
   211     void removeVideosFromCollectionSlot();
   190 
   212 
   191     /**
   213     /**
   192      * Slot is connected into main menus aboutToShow -signal
   214      * Slot is connected into main menus aboutToShow -signal
   193      *
   215      *
   194      */
   216      */
   229     void collectionOpenedSlot(bool collectionOpened,
   251     void collectionOpenedSlot(bool collectionOpened,
   230         const QString& collection,
   252         const QString& collection,
   231         const QModelIndex &index);
   253         const QModelIndex &index);
   232 
   254 
   233     /**
   255     /**
   234      * Slot is connected into toolbar's sort by tab's
   256      * Slot is called when effect for opening a collection finishes.
   235      * triggered signal.
   257      */
   236      *
   258     void finishCollectionOpenedSlot(const HbEffect::EffectStatus &status);
   237      * Activates sort by popup menu.
   259     
   238      */
   260     /**
   239     void openSortByMenuSlot();
   261      * Slot is called when effect for closing a collection finishes.
       
   262      */
       
   263     void finishCollectionClosedSlot(const HbEffect::EffectStatus &status);    
   240     
   264     
   241     /**
   265     /**
   242      * Slot which is called when a widget has been loaded.
   266      * Slot which is called when a widget has been loaded.
   243      */
   267      */
   244     void widgetReadySlot(QGraphicsWidget *widget, const QString &name);
   268     void widgetReadySlot(QGraphicsWidget *widget, const QString &name);
   254      * Slot shows "Not yet implemented" note
   278      * Slot shows "Not yet implemented" note
   255      */
   279      */
   256     void debugNotImplementedYet();
   280     void debugNotImplementedYet();
   257 
   281 
   258 private:
   282 private:
       
   283 
       
   284     /**
       
   285      * Delayed load of multiselection dialog component
       
   286 	 *
       
   287      */
       
   288     void loadMultiSelection();
       
   289 
       
   290     /**
       
   291      * Delayed load videolistwidgets
       
   292 	 *
       
   293      */
       
   294     void loadLists(bool doAsync);
       
   295     
       
   296     /**
       
   297      * Delayed load of hint components
       
   298 	 *
       
   299      */
       
   300     void loadHint(bool doAsync);
   259 
   301 
   260     /**
   302     /**
   261      * Cleans all possibly created objects from this. In some cases there are no quarantees
   303      * Cleans all possibly created objects from this. In some cases there are no quarantees
   262      * that they were created correctly, and thus is better to start again from clean slate.
   304      * that they were created correctly, and thus is better to start again from clean slate.
   263      */
   305      */
   325     {
   367     {
   326         ETBActionAllVideos     = 10,
   368         ETBActionAllVideos     = 10,
   327         ETBActionCollections   = 11,
   369         ETBActionCollections   = 11,
   328         ETBActionServices      = 12,
   370         ETBActionServices      = 12,
   329         ETBActionAddVideos     = 13,
   371         ETBActionAddVideos     = 13,
   330         ETBActionRemoveVideos  = 14,
   372         ETBActionRemoveVideos  = 14
   331         ETBActionSortVideos    = 15
       
   332     };
   373     };
   333 
   374 
   334     /**
   375     /**
   335      * reference to video collection view utils
   376      * reference to video collection view utils
   336      */
   377      */
   348     
   389     
   349     /**
   390     /**
   350      * Boolean for knowing when the app was started as a service.
   391      * Boolean for knowing when the app was started as a service.
   351      */
   392      */
   352     bool mIsService;
   393     bool mIsService;
   353 
   394     
       
   395     /**
       
   396      * Boolean for knowing wether the hint component has been loaded or not.
       
   397      */
       
   398     bool mHintLoaded;
       
   399 
       
   400     /**
       
   401      * Boolean for knowing wether the list widgets have been loaded or not.
       
   402      */
       
   403     bool mListsLoaded;
       
   404     
       
   405     /**
       
   406      * Boolean for knowing wether the multiselection component has been loaded or not.
       
   407      */
       
   408     bool mMultiselectionLoaded;
       
   409     
   354     /**
   410     /**
   355      * Boolean for knowing when the model is ready.
   411      * Boolean for knowing when the model is ready.
   356      */
   412      */
   357     bool mModelReady;
   413     bool mModelReady;
       
   414     
       
   415     /**
       
   416      * Collection being opened or closed.
       
   417      */
       
   418     bool mTransitionOngoing;
       
   419 
       
   420     /**
       
   421      * Hint level for the hint widget.
       
   422      */
       
   423     VideoHintWidget::HintLevel mHintLevel;
   358 
   424 
   359     /**
   425     /**
   360      * pointer to videoservices instance
   426      * pointer to videoservices instance
   361      */
   427      */
   362     VideoServices* mVideoServices;
   428     VideoServices* mVideoServices;
   363 
   429 
   364     /**
   430     /**
   365      * Currently used list
   431      * Currently used list
   366      */
   432      */
   367     VideoListWidget* mCurrentList;
   433     VideoListWidget* mCurrentList;
   368     
   434 
   369     /**
   435     /**
   370      * Action group for the toolbar.
   436      * Action group for the toolbar.
   371      */
   437      */
   372     QActionGroup* mToolbarViewsActionGroup;
   438     QActionGroup* mToolbarViewsActionGroup;
   373 
   439