equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2010 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 #include <QGraphicsSceneMouseEvent> |
|
19 |
|
20 #include "customedit.h" |
|
21 #include "loggerutil.h" |
|
22 |
|
23 /*! |
|
24 Constructor |
|
25 */ |
|
26 CustomEdit::CustomEdit(QGraphicsItem *parent) |
|
27 : HbLineEdit(parent) |
|
28 { |
|
29 _DBGLOG("CustomEdit::CustomEdit()") |
|
30 } |
|
31 |
|
32 /*! |
|
33 Distructor |
|
34 */ |
|
35 CustomEdit::~CustomEdit() |
|
36 { |
|
37 _DBGLOG("CustomEdit::CustomEdit()") |
|
38 } |
|
39 |
|
40 /*! |
|
41 mousePressEvent |
|
42 */ |
|
43 void CustomEdit::focusInEvent(QFocusEvent *event) |
|
44 { |
|
45 _DBGLOG("CustomEdit::focusInEvent() >") |
|
46 if (!event->gotFocus()) { |
|
47 event->ignore(); |
|
48 _DBGLOG("CustomEdit::focusInEvent() ignore") |
|
49 return; |
|
50 } else { |
|
51 emit editItemClicked(); |
|
52 event->accept(); |
|
53 _DBGLOG("CustomEdit::focusInEvent() emit clicked") |
|
54 } |
|
55 _DBGLOG("CustomEdit::focusInEvent() <") |
|
56 } |
|
57 |
|
58 |
|
59 // End of file |