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: ?Description |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include <hblabel.h> |
|
20 #include "glxdetailsnamelabel.h" |
|
21 #include <QEvent> |
|
22 #include <QDebug> |
|
23 |
|
24 //-------------------------------------------------------------------------------------------------------------------------------------------- |
|
25 //mousePressEvent |
|
26 //-------------------------------------------------------------------------------------------------------------------------------------------- |
|
27 void GlxDetailsNameLabel::mousePressEvent(QGraphicsSceneMouseEvent *event) |
|
28 { |
|
29 Q_UNUSED(event) |
|
30 } |
|
31 |
|
32 //-------------------------------------------------------------------------------------------------------------------------------------------- |
|
33 //mouseReleaseEvent |
|
34 //-------------------------------------------------------------------------------------------------------------------------------------------- |
|
35 void GlxDetailsNameLabel::mouseReleaseEvent (QGraphicsSceneMouseEvent *event) |
|
36 { |
|
37 qDebug("GlxDetailsNameLabel::mouseReleaseEvent"); |
|
38 Q_UNUSED(event) |
|
39 emit labelPressed(); |
|
40 } |
|
41 |
|
42 //-------------------------------------------------------------------------------------------------------------------------------------------- |
|
43 //GlxDetailsNameLabel |
|
44 //-------------------------------------------------------------------------------------------------------------------------------------------- |
|
45 GlxDetailsNameLabel::GlxDetailsNameLabel(QGraphicsItem *parent) : HbLabel( parent ) |
|
46 { |
|
47 qDebug("GlxDetailsNameLabel::GlxDetailsNameLabel"); |
|
48 setTextWrapping(Hb::TextWordWrap); |
|
49 setAlignment(Qt::AlignHCenter); |
|
50 } |
|
51 |
|
52 //-------------------------------------------------------------------------------------------------------------------------------------------- |
|
53 //~GlxDetailsCustomLabel |
|
54 //-------------------------------------------------------------------------------------------------------------------------------------------- |
|
55 GlxDetailsNameLabel::~GlxDetailsNameLabel() |
|
56 { |
|
57 |
|
58 } |
|
59 |
|
60 //-------------------------------------------------------------------------------------------------------------------------------------------- |
|
61 //setItemText |
|
62 //-------------------------------------------------------------------------------------------------------------------------------------------- |
|
63 void GlxDetailsNameLabel::setItemText( const QString &text ) |
|
64 { |
|
65 qDebug("GlxDetailsNameLabel::setItemText"); |
|
66 setHtml(text); |
|
67 } |
|