34
|
1 |
/*
|
|
2 |
* Copyright (c) 2010 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: videolist selection dialog implementation
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#include <hbaction.h>
|
|
19 |
|
|
20 |
#include "videolistselectiondialog.h"
|
|
21 |
#include "videolistselectiondialogdata.h"
|
|
22 |
#include "videocollectionwrapper.h"
|
58
|
23 |
#include "videoproxymodelgeneric.h"
|
34
|
24 |
|
|
25 |
bool VideoListSelectionDialogData::mExecReturnPrimary = false;
|
|
26 |
int VideoListSelectionDialogData::mSelectionCount = 0;
|
|
27 |
int VideoListSelectionDialogData::mMultiSelectionLaunchCount = 0;
|
|
28 |
int VideoListSelectionDialogData::mMultiSelectionItemSelectionCount = 0;
|
35
|
29 |
int VideoListSelectionDialogData::mSelectionType = -1;
|
|
30 |
TMPXItemId VideoListSelectionDialogData::mSettedMpxId = TMPXItemId::InvalidId();
|
34
|
31 |
|
67
|
32 |
VideoListSelectionDialog::VideoListSelectionDialog(QGraphicsItem *parent)
|
|
33 |
: HbSelectionDialog(parent)
|
|
34 |
, mModel(0)
|
|
35 |
, mModelReady(false)
|
|
36 |
, mAlbumListReady(false)
|
|
37 |
, mListInitialised( false )
|
|
38 |
, mListWidget(0)
|
|
39 |
, mPrimaryAction(0)
|
|
40 |
, mSecondaryAction(0)
|
34
|
41 |
{
|
|
42 |
// create primary action
|
36
|
43 |
mPrimaryAction = new HbAction();
|
67
|
44 |
|
34
|
45 |
// create secondary action
|
36
|
46 |
mSecondaryAction = new HbAction();
|
34
|
47 |
}
|
|
48 |
|
67
|
49 |
VideoListSelectionDialog::~VideoListSelectionDialog()
|
34
|
50 |
{
|
|
51 |
VideoListSelectionDialogData::reset();
|
|
52 |
}
|
|
53 |
|
|
54 |
void VideoListSelectionDialog::setupContent(int type, TMPXItemId activeItem)
|
|
55 |
{
|
35
|
56 |
VideoListSelectionDialogData::mSelectionType = type;
|
|
57 |
VideoListSelectionDialogData::mSettedMpxId = activeItem;
|
34
|
58 |
}
|
|
59 |
|
|
60 |
bool VideoListSelectionDialog::initDialog()
|
|
61 |
{
|
|
62 |
// not stubbed
|
|
63 |
return false;
|
|
64 |
}
|
|
65 |
|
35
|
66 |
void VideoListSelectionDialog::exec()
|
34
|
67 |
{
|
|
68 |
// fill selection
|
|
69 |
VideoListSelectionDialogData::mMultiSelectionLaunchCount++;
|
|
70 |
VideoCollectionWrapper &wrapper = VideoCollectionWrapper::instance();
|
58
|
71 |
VideoProxyModelGeneric *model = wrapper.getGenericModel();
|
34
|
72 |
if (model)
|
|
73 |
{
|
|
74 |
for (int i = 0; i < VideoListSelectionDialogData::mSelectionCount; i++)
|
|
75 |
{
|
|
76 |
QModelIndex index = model->index(i, 0);
|
|
77 |
if(index.isValid())
|
|
78 |
{
|
|
79 |
mSelection.append(QItemSelectionRange(index));
|
|
80 |
}
|
|
81 |
}
|
|
82 |
}
|
|
83 |
VideoListSelectionDialogData::mMultiSelectionItemSelectionCount = mSelection.indexes().count();
|
67
|
84 |
|
35
|
85 |
}
|
|
86 |
|
|
87 |
void VideoListSelectionDialog::finishedSlot(HbAction *action)
|
|
88 |
{
|
|
89 |
Q_UNUSED(action);
|
34
|
90 |
}
|
|
91 |
|
|
92 |
void VideoListSelectionDialog::markAllStateChangedSlot(int state)
|
|
93 |
{
|
|
94 |
Q_UNUSED(state);
|
|
95 |
// not stubbed
|
|
96 |
}
|
|
97 |
|
|
98 |
void VideoListSelectionDialog::selectionChangedSlot(
|
|
99 |
const QItemSelection &selected,
|
|
100 |
const QItemSelection &deselected)
|
67
|
101 |
{
|
34
|
102 |
Q_UNUSED(selected);
|
|
103 |
Q_UNUSED(deselected);
|
|
104 |
// not stubbed
|
|
105 |
}
|
|
106 |
|
|
107 |
void VideoListSelectionDialog::singleItemSelectedSlot(const QModelIndex &index)
|
|
108 |
{
|
|
109 |
Q_UNUSED(index);
|
|
110 |
// not stubbed
|
|
111 |
}
|
|
112 |
|
|
113 |
void VideoListSelectionDialog::modelReadySlot()
|
|
114 |
{
|
|
115 |
// not stubbed
|
|
116 |
}
|
|
117 |
|
50
|
118 |
void VideoListSelectionDialog::albumListReadySlot()
|
|
119 |
{
|
|
120 |
// not stubbed
|
|
121 |
}
|
|
122 |
|
34
|
123 |
void VideoListSelectionDialog::updateCounterSlot()
|
|
124 |
{
|
|
125 |
// not stubbed
|
|
126 |
}
|
|
127 |
|
|
128 |
void VideoListSelectionDialog::primaryActionTriggeredSlot()
|
|
129 |
{
|
|
130 |
// not stubbed
|
|
131 |
}
|
|
132 |
|
|
133 |
void VideoListSelectionDialog::connectSignals()
|
|
134 |
{
|
|
135 |
// not stubbed
|
|
136 |
}
|
67
|
137 |
|
34
|
138 |
void VideoListSelectionDialog::disconnectSignals()
|
|
139 |
{
|
|
140 |
// not stubbed
|
|
141 |
}
|
|
142 |
|
38
|
143 |
void VideoListSelectionDialog::newAlbumNameDialogFinished(HbAction *action)
|
|
144 |
{
|
|
145 |
Q_UNUSED(action);
|
|
146 |
// not stubbed
|
|
147 |
}
|
|
148 |
|
|
149 |
void VideoListSelectionDialog::finalize(QString albumName)
|
|
150 |
{
|
|
151 |
Q_UNUSED(albumName);
|
|
152 |
// not stubbed
|
|
153 |
}
|
|
154 |
|
34
|
155 |
// end of file
|