videocollection/videocollectionview/inc/videolistview.h
changeset 36 8aed59de29f9
parent 35 3738fe97f027
child 37 4eb2df7f7cbe
equal deleted inserted replaced
35:3738fe97f027 36:8aed59de29f9
    36 class VideoCollectionUiLoader;
    36 class VideoCollectionUiLoader;
    37 class HbGroupBox;
    37 class HbGroupBox;
    38 class VideoListSelectionDialog;
    38 class VideoListSelectionDialog;
    39 class HbMenu;
    39 class HbMenu;
    40 class VideoServices;
    40 class VideoServices;
    41 
    41 class TMPXItemId;
    42 
    42 
    43 /**
    43 /**
    44  * Class acts as an container for widgets that are used to display different
    44  * Class acts as an container for widgets that are used to display different
    45  * data: all videos, video collections or video services.
    45  * data: all videos, video collections or video services.
    46  *
    46  *
    76 
    76 
    77     /**
    77     /**
    78      * Activates current widget to be shown, enables menu and connects
    78      * Activates current widget to be shown, enables menu and connects
    79      * orientation change signals.
    79      * orientation change signals.
    80      *
    80      *
       
    81      * @param itemId, Id of the widget which is to be activated
    81      * @return 0 activation ok, < 0 if activation fails
    82      * @return 0 activation ok, < 0 if activation fails
    82      */
    83      */
    83     int activateView();
    84     int activateView(const TMPXItemId &itemId);
    84 
    85 
    85     /**
    86     /**
    86      * Deactivates current widget, disables menu and disconnects
    87      * Deactivates current widget, disables menu and disconnects
    87      * orientation change signals.
    88      * orientation change signals.
    88      *
    89      *
   213     /**
   214     /**
   214      * Slot is connected into main menus aboutToShow -signal
   215      * Slot is connected into main menus aboutToShow -signal
   215      *
   216      *
   216      */
   217      */
   217     void aboutToShowMainMenuSlot();
   218     void aboutToShowMainMenuSlot();
       
   219     
       
   220     /**
       
   221      * Prepare menu when videos used through browsing service.
       
   222      */
       
   223     void prepareBrowseServiceMenu();
   218 
   224 
   219     /**
   225     /**
   220      * Slot is connected into hbInstance's primary window's
   226      * Slot is connected into hbInstance's primary window's
   221      * aboutToChangeOrientation -signal. This is called when
   227      * aboutToChangeOrientation -signal. This is called when
   222      * orientation is to be change.
   228      * orientation is to be change.
   261      * Slot is called when effect for closing a collection finishes.
   267      * Slot is called when effect for closing a collection finishes.
   262      */
   268      */
   263     void finishCollectionClosedSlot(const HbEffect::EffectStatus &status);    
   269     void finishCollectionClosedSlot(const HbEffect::EffectStatus &status);    
   264     
   270     
   265     /**
   271     /**
   266      * Slot which is called when a widget has been loaded.
       
   267      */
       
   268     void widgetReadySlot(QGraphicsWidget *widget, const QString &name);
       
   269     
       
   270     /**
       
   271      * Slot which is called when an object has been loaded.
   272      * Slot which is called when an object has been loaded.
   272      */
   273      */
   273     void objectReadySlot(QObject *object, const QString &name);
   274     void objectReadySlot(QObject *object, const QString &name);
   274     
   275     
   275     // TODO: following can be removed after all implementation ready
   276     // TODO: following can be removed after all implementation ready
   278      * Slot shows "Not yet implemented" note
   279      * Slot shows "Not yet implemented" note
   279      */
   280      */
   280     void debugNotImplementedYet();
   281     void debugNotImplementedYet();
   281 
   282 
   282 private:
   283 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);
       
   301 
       
   302     /**
   284     /**
   303      * Cleans all possibly created objects from this. In some cases there are no quarantees
   285      * Cleans all possibly created objects from this. In some cases there are no quarantees
   304      * that they were created correctly, and thus is better to start again from clean slate.
   286      * that they were created correctly, and thus is better to start again from clean slate.
   305      */
   287      */
   306     void cleanup();
   288     void cleanup();
   347      * Shows or hides a menu action.
   329      * Shows or hides a menu action.
   348      */
   330      */
   349     void showAction(bool show, const QString &name);
   331     void showAction(bool show, const QString &name);
   350     
   332     
   351     /**
   333     /**
   352      * Check if menu action is checked.
   334      * Activate to all videos view. 
   353      */
   335      */
   354     bool isActionChecked(const QString &name);
   336     int activateVideosView();
   355     
   337     
   356     /**
   338     /**
   357      * Sets an action as checked.
   339      * Activate to collection content view.
   358      */
   340      */
   359     void setActionChecked(bool setChecked, const QString &name);
   341     int activateCollectionContentView(const TMPXItemId &itemId);
   360     
   342     
   361 private:
   343 private:
   362 
   344 
   363     /**
   345     /**
   364      * actions ids used in main menu and tool bar
   346      * actions ids used in main menu and tool bar
   391      * Boolean for knowing when the app was started as a service.
   373      * Boolean for knowing when the app was started as a service.
   392      */
   374      */
   393     bool mIsService;
   375     bool mIsService;
   394     
   376     
   395     /**
   377     /**
   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     
       
   410     /**
       
   411      * Boolean for knowing when the model is ready.
   378      * Boolean for knowing when the model is ready.
   412      */
   379      */
   413     bool mModelReady;
   380     bool mModelReady;
   414     
   381     
   415     /**
   382     /**