videocollection/videocollectionview/inc/videocollectionviewplugin.h
changeset 34 bbb98528c666
parent 30 4f111d64a341
child 35 3738fe97f027
equal deleted inserted replaced
33:48e74db5d516 34:bbb98528c666
     1 /*
     1 /*
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
     2  * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
     3 * All rights reserved.
     3  * All rights reserved.
     4 * This component and the accompanying materials are made available
     4  * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5  * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6  * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 *
     8  *
     9 * Initial Contributors:
     9  * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    10  * Nokia Corporation - initial contribution.
    11 *
    11  *
    12 * Contributors:
    12  * Contributors:
    13 *
    13  *
    14 * Description:   VideoCollectionViewPlugin class definition
    14  * Description:   VideoCollectionViewPlugin class definition
    15 * 
    15  * 
    16 */
    16  */
    17 
    17 
    18 #ifndef VIDEOVIEWPLUGIN_H
    18 #ifndef VIDEOVIEWPLUGIN_H
    19 #define VIDEOVIEWPLUGIN_H
    19 #define VIDEOVIEWPLUGIN_H
    20 
    20 
       
    21 #include <mpxviewpluginqt.h>
    21 
    22 
    22 // INCLUDES
       
    23 #include <qobject>
       
    24 #include <mpxviewpluginqt.h>
       
    25 #include <qpointer.h>
       
    26 
       
    27 class HbAction;
       
    28 class VideoCollectionUiLoader;
    23 class VideoCollectionUiLoader;
    29 class VideoListView;
    24 class VideoListView;
    30 
    25 
    31 
    26 class VideoCollectionViewPlugin: public MpxViewPlugin
    32 class VideoCollectionViewPlugin : public MpxViewPlugin
    27 {
    33 	{
       
    34     
       
    35     Q_OBJECT
    28     Q_OBJECT
    36 
    29 
    37 public: // Constructor / destructor
    30 public: // Constructor / destructor
    38 
    31 
    39     /**
    32     /**
    40      * Contructor.
    33      * Contructor.
    41      *
    34      *
    42      */ 
    35      */
    43     VideoCollectionViewPlugin();
    36     VideoCollectionViewPlugin();
    44     
    37 
    45     /**
    38     /**
    46      * Destructor.
    39      * Destructor.
    47      *
    40      *
    48      */ 
    41      */
    49     virtual ~VideoCollectionViewPlugin();
    42     virtual ~VideoCollectionViewPlugin();
    50 
    43 
    51 public: // from QViewPlugin
    44 public: // from QViewPlugin
    52     
    45 
    53     /**
    46     /**
    54      * Allocates view and it's objects to be ready to 
    47      * Allocates view and it's objects to be ready to 
    55      * be activated.
    48      * be activated.
    56      *
    49      *
    57      */
    50      */
    58     void createView();
    51     void createView();
    59     
    52 
    60     /**
    53     /**
    61      * Deallocates view and it's objects.
    54      * Deallocates view and it's objects.
    62      */
    55      */
    63     void destroyView();
    56     void destroyView();
    64     
    57 
    65     /**
    58     /**
    66      * Activates view
    59      * Activates view
    67      *
    60      *
    68      */
    61      */
    69     void activateView();
    62     void activateView();
    70     
    63 
    71     /**
    64     /**
    72      * Deactivates view
    65      * Deactivates view
    73      *
    66      *
    74      */
    67      */
    75     void deactivateView();
    68     void deactivateView();
    76     
    69 
    77     /**
    70     /**
    78      * Returns a pointer to the view
    71      * Returns a pointer to the view
    79      *
    72      *
    80      * @return QGraphicsWidget*
    73      * @return QGraphicsWidget*
    81      */
    74      */
    86      * Command signal, plugin user shoulf connect this in case it wants
    79      * Command signal, plugin user shoulf connect this in case it wants
    87      * to receive commands emitted from the view.
    80      * to receive commands emitted from the view.
    88      *
    81      *
    89      * @param command id
    82      * @param command id
    90      */
    83      */
    91     void command( int );
    84     void command(int);
    92 
    85 
    93 public slots: // from QViewPlugin
    86 public slots: // from QViewPlugin
    94 
    87 
    95     /**
    88     /**
    96      * Plugin user can notify orientation changes by connecting into this slot
    89      * Plugin user can notify orientation changes by connecting into this slot
    97      * ti it's signal. In normal cases, view handles orientation chages itself.
    90      * ti it's signal. In normal cases, view handles orientation chages itself.
    98      *
    91      *
    99      * @param orientation new orientation
    92      * @param orientation new orientation
   100      */
    93      */
   101     void orientationChange( Qt::Orientation orientation );
    94     void orientationChange(Qt::Orientation orientation);
   102     
    95 
   103     /**
    96     /**
   104      * Plugin user can notify oback button changes by connecting into this slot
    97      * Plugin user can notify oback button changes by connecting into this slot
   105      *
    98      *
   106      */
    99      */
   107     void back();
   100     void back();
   108     
       
   109 
   101 
   110 private:
   102 private:
   111     
   103 
   112     /**
   104     /**
   113      * docml ui loader, owned
   105      * docml ui loader, owned
   114      */
   106      */
   115     VideoCollectionUiLoader *mUiLoader;
   107     VideoCollectionUiLoader *mUiLoader;
   116     
   108 
   117     /**
   109     /**
   118      * View object, owned
   110      * View object, owned
   119      */
   111      */
   120     VideoListView *mView;
   112     VideoListView *mView;
   121     
   113 
   122     /**
   114     /**
   123      * Activated flag. Set as true when view is properly activated.
   115      * Activated flag. Set as true when view is properly activated.
   124      * If flag is false, no operations can be do to the view.
   116      * If flag is false, no operations can be do to the view.
   125      */
   117      */
   126     bool mActivated;
   118     bool mActivated;
   127     
   119 };
   128     };
       
   129 
   120 
   130 #endif  // VIDEOVIEWPLUGIN_H
   121 #endif  // VIDEOVIEWPLUGIN_H
   131 
       
   132 // End of File
   122 // End of File