99
|
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: tsactivitymodelitem.h
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef TSACTIVITYMODELITEM_H
|
|
19 |
#define TSACTIVITYMODELITEM_H
|
107
|
20 |
|
99
|
21 |
#include <qvariant.h>
|
|
22 |
#include <qicon.h>
|
107
|
23 |
|
|
24 |
#include "tsmodelitem.h"
|
99
|
25 |
/*!
|
|
26 |
Implements model item which represents Activity entry
|
|
27 |
*/
|
|
28 |
class TsActivityModelItem : public TsModelItem
|
|
29 |
{
|
|
30 |
Q_OBJECT
|
|
31 |
public:
|
107
|
32 |
TsActivityModelItem(QAbstractListModel &model,
|
|
33 |
QObject &service,
|
|
34 |
const QVariantHash &activity);
|
99
|
35 |
~TsActivityModelItem();
|
|
36 |
QVariant data(int role) const;
|
|
37 |
void close();
|
|
38 |
void open();
|
|
39 |
static QString applicationKeyword();
|
|
40 |
static QString screenshotKeyword();
|
|
41 |
|
|
42 |
private:
|
|
43 |
QVariant decorationRole() const;
|
|
44 |
QVariant displayRole() const;
|
|
45 |
QVariant visibilityRole() const;
|
|
46 |
|
|
47 |
private slots:
|
|
48 |
void thumbnailReady(QPixmap, void *);
|
|
49 |
signals:
|
|
50 |
void entryChanged(TsModelItem *);
|
|
51 |
|
|
52 |
private:
|
|
53 |
QObject &mService;
|
|
54 |
const QVariantHash mActivity;
|
|
55 |
QIcon mIcon;
|
107
|
56 |
mutable bool mRequestPending;
|
|
57 |
|
|
58 |
Q_DISABLE_COPY(TsActivityModelItem)
|
|
59 |
|
99
|
60 |
};
|
|
61 |
|
|
62 |
#endif // TSACTIVITYMODELITEM_H
|