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