30
|
1 |
/*
|
34
|
2 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description: VideoCollectionViewPlugin class definition
|
|
15 |
*
|
|
16 |
*/
|
30
|
17 |
|
|
18 |
#ifndef VIDEOVIEWPLUGIN_H
|
|
19 |
#define VIDEOVIEWPLUGIN_H
|
|
20 |
|
34
|
21 |
#include <mpxviewpluginqt.h>
|
30
|
22 |
|
|
23 |
class VideoCollectionUiLoader;
|
|
24 |
class VideoListView;
|
41
|
25 |
class VideoServices;
|
30
|
26 |
|
34
|
27 |
class VideoCollectionViewPlugin: public MpxViewPlugin
|
|
28 |
{
|
30
|
29 |
Q_OBJECT
|
|
30 |
|
|
31 |
public: // Constructor / destructor
|
|
32 |
|
|
33 |
/**
|
|
34 |
* Contructor.
|
|
35 |
*
|
34
|
36 |
*/
|
30
|
37 |
VideoCollectionViewPlugin();
|
34
|
38 |
|
30
|
39 |
/**
|
|
40 |
* Destructor.
|
|
41 |
*
|
34
|
42 |
*/
|
30
|
43 |
virtual ~VideoCollectionViewPlugin();
|
|
44 |
|
|
45 |
public: // from QViewPlugin
|
34
|
46 |
|
30
|
47 |
/**
|
|
48 |
* Allocates view and it's objects to be ready to
|
|
49 |
* be activated.
|
|
50 |
*
|
|
51 |
*/
|
|
52 |
void createView();
|
34
|
53 |
|
30
|
54 |
/**
|
|
55 |
* Deallocates view and it's objects.
|
|
56 |
*/
|
|
57 |
void destroyView();
|
34
|
58 |
|
30
|
59 |
/**
|
|
60 |
* Activates view
|
|
61 |
*
|
|
62 |
*/
|
|
63 |
void activateView();
|
34
|
64 |
|
30
|
65 |
/**
|
|
66 |
* Deactivates view
|
|
67 |
*
|
|
68 |
*/
|
|
69 |
void deactivateView();
|
34
|
70 |
|
30
|
71 |
/**
|
|
72 |
* Returns a pointer to the view
|
|
73 |
*
|
|
74 |
* @return QGraphicsWidget*
|
|
75 |
*/
|
|
76 |
QGraphicsWidget* getView();
|
|
77 |
|
|
78 |
signals:
|
|
79 |
/**
|
37
|
80 |
* Command signal, plugin user should connect this in case it wants
|
30
|
81 |
* to receive commands emitted from the view.
|
|
82 |
*
|
|
83 |
* @param command id
|
|
84 |
*/
|
34
|
85 |
void command(int);
|
30
|
86 |
|
35
|
87 |
/**
|
|
88 |
* Signaled to do delayed loading of components not loaded initially at start up phase
|
|
89 |
*
|
|
90 |
*/
|
|
91 |
void doDelayeds();
|
|
92 |
|
30
|
93 |
public slots: // from QViewPlugin
|
|
94 |
|
|
95 |
/**
|
|
96 |
* Plugin user can notify orientation changes by connecting into this slot
|
37
|
97 |
* to it's signal. In normal cases, view handles orientation chages itself.
|
30
|
98 |
*
|
|
99 |
* @param orientation new orientation
|
|
100 |
*/
|
34
|
101 |
void orientationChange(Qt::Orientation orientation);
|
|
102 |
|
30
|
103 |
/**
|
|
104 |
* Plugin user can notify oback button changes by connecting into this slot
|
|
105 |
*
|
|
106 |
*/
|
|
107 |
void back();
|
37
|
108 |
|
|
109 |
private slots:
|
|
110 |
|
|
111 |
/**
|
|
112 |
* Gets notified when view is ready.
|
|
113 |
*/
|
|
114 |
void viewReadySlot();
|
30
|
115 |
|
|
116 |
private:
|
34
|
117 |
|
35
|
118 |
/** from QObject */
|
|
119 |
void timerEvent(QTimerEvent *event);
|
|
120 |
|
|
121 |
private:
|
|
122 |
|
|
123 |
// async loading timeout
|
37
|
124 |
static const int DELAYED_LOAD_TIMEOUT = 500; // ms
|
35
|
125 |
|
|
126 |
/** timer id */
|
|
127 |
int mTimerId;
|
|
128 |
|
30
|
129 |
/**
|
|
130 |
* docml ui loader, owned
|
|
131 |
*/
|
|
132 |
VideoCollectionUiLoader *mUiLoader;
|
34
|
133 |
|
30
|
134 |
/**
|
|
135 |
* View object, owned
|
|
136 |
*/
|
|
137 |
VideoListView *mView;
|
34
|
138 |
|
30
|
139 |
/**
|
|
140 |
* Activated flag. Set as true when view is properly activated.
|
|
141 |
* If flag is false, no operations can be do to the view.
|
|
142 |
*/
|
|
143 |
bool mActivated;
|
35
|
144 |
|
|
145 |
/*
|
41
|
146 |
* Video service object.
|
35
|
147 |
*
|
|
148 |
*/
|
41
|
149 |
VideoServices *mVideoServices;
|
34
|
150 |
};
|
30
|
151 |
|
|
152 |
#endif // VIDEOVIEWPLUGIN_H
|
|
153 |
// End of File
|