34
|
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: stub HbListViewItem
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef HBLISTVIEWITEM_H
|
|
19 |
#define HBLISTVIEWITEM_H
|
|
20 |
|
|
21 |
#include <QGraphicsItem>
|
|
22 |
#include <QModelIndex>
|
|
23 |
|
|
24 |
#include "hbwidget.h"
|
|
25 |
|
|
26 |
class HbAbstractViewItem : public HbWidget
|
|
27 |
{
|
|
28 |
public:
|
|
29 |
enum
|
|
30 |
{
|
|
31 |
PositionAtTop
|
|
32 |
};
|
|
33 |
|
|
34 |
public:
|
|
35 |
|
|
36 |
/**
|
|
37 |
* contructor
|
|
38 |
*/
|
|
39 |
HbAbstractViewItem(QGraphicsItem *parent=0) :
|
|
40 |
HbWidget(parent)
|
|
41 |
{
|
|
42 |
}
|
|
43 |
|
|
44 |
/**
|
|
45 |
* destructor
|
|
46 |
*/
|
|
47 |
virtual ~HbAbstractViewItem(){}
|
|
48 |
|
|
49 |
/**
|
|
50 |
* returns mModelIndex
|
|
51 |
*/
|
|
52 |
QModelIndex modelIndex()
|
|
53 |
{
|
|
54 |
return mModelIndex;
|
|
55 |
}
|
|
56 |
|
|
57 |
/**
|
|
58 |
* item index
|
|
59 |
*/
|
|
60 |
QModelIndex mModelIndex;
|
|
61 |
|
|
62 |
};
|
|
63 |
|
|
64 |
|
|
65 |
class HbListViewItem : public HbAbstractViewItem
|
|
66 |
{
|
|
67 |
Q_OBJECT
|
|
68 |
|
|
69 |
|
|
70 |
public:
|
|
71 |
|
|
72 |
enum GraphicsSize
|
|
73 |
{
|
|
74 |
InvalidSize,
|
35
|
75 |
Thumbnail,
|
|
76 |
WideThumbnail,
|
34
|
77 |
};
|
|
78 |
|
|
79 |
|
|
80 |
HbListViewItem(QGraphicsItem *parent=0) :
|
|
81 |
HbAbstractViewItem(parent)
|
|
82 |
{
|
|
83 |
}
|
|
84 |
|
|
85 |
virtual ~HbListViewItem(){}
|
|
86 |
|
|
87 |
void setGraphicsSize(GraphicsSize size)
|
|
88 |
{
|
|
89 |
mLatestSize = size;
|
|
90 |
}
|
|
91 |
static GraphicsSize mLatestSize;
|
|
92 |
|
|
93 |
};
|
|
94 |
|
|
95 |
#endif
|