119
|
1 |
/*
|
|
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:
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef ACTIVITYTSMODEL_H
|
|
19 |
#define ACTIVITYTSMODEL_H
|
|
20 |
|
|
21 |
#include <QObject>
|
|
22 |
#include <QVariantHash>
|
|
23 |
|
|
24 |
#include "activitytsentry.h"
|
125
|
25 |
#include "tswindowgroupsobserver.h"
|
119
|
26 |
|
125
|
27 |
class MTsWindowGroupsMonitor;
|
|
28 |
|
|
29 |
class ActivityTsModel : public QObject,
|
|
30 |
public MTsWindowGroupsObserver
|
119
|
31 |
{
|
|
32 |
Q_OBJECT
|
|
33 |
|
|
34 |
public:
|
|
35 |
ActivityTsModel(QObject *parent = 0);
|
|
36 |
virtual ~ActivityTsModel();
|
|
37 |
|
125
|
38 |
public: //from MTsWindowGroupsObserver
|
|
39 |
void HandleWindowGroupChanged(MTsResourceManager& resources,
|
|
40 |
const MTsRunningApplicationStorage& storage);
|
|
41 |
|
|
42 |
private:
|
|
43 |
bool filterActivity();
|
|
44 |
ActivityTsEntry *findEntryWithScreenshot(const QList<ActivityTsEntry*> &entryList, const QVariantHash &activityEntry);
|
|
45 |
|
119
|
46 |
public slots:
|
|
47 |
QList<QVariantHash> taskList() const;
|
|
48 |
QList<QVariantHash> taskList(int limit) const;
|
|
49 |
|
|
50 |
bool openTask(const QVariant &id);
|
|
51 |
bool closeTask(const QVariant &id);
|
|
52 |
|
|
53 |
signals:
|
|
54 |
void dataChanged();
|
|
55 |
|
|
56 |
private slots:
|
125
|
57 |
void getActivities();
|
119
|
58 |
|
125
|
59 |
public slots:
|
119
|
60 |
void convertScreenshotToThumbnail(const QPixmap &thumbnail, void *userData);
|
|
61 |
void thumbnailCreated(const QPixmap &thumbnail, const void *userData);
|
125
|
62 |
void setResources(MTsResourceManager& resources);
|
|
63 |
|
119
|
64 |
signals:
|
|
65 |
void createThumbnail(const QPixmap &source, int angle, const void *userData);
|
|
66 |
|
|
67 |
private:
|
125
|
68 |
MTsWindowGroupsMonitor* mMonitor;
|
119
|
69 |
QObject *mAfManager;
|
|
70 |
int mMaxItems;
|
125
|
71 |
QList<ActivityTsEntry*> mData;
|
|
72 |
QList<ActivityTsEntry*> mPublishedData;
|
119
|
73 |
|
125
|
74 |
QList<int> mRunningAppsUid;
|
119
|
75 |
};
|
|
76 |
|
|
77 |
#endif // ACTIVITYTSMODEL_H
|