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 // System includes |
|
19 #include <QGraphicsSceneMouseEvent> |
|
20 |
|
21 // User includes |
|
22 #include "seccodeedit.h" |
|
23 |
|
24 // ======== MEMBER FUNCTIONS ======== |
|
25 |
|
26 /*! |
|
27 Constructor |
|
28 */ |
|
29 SecCodeEdit::SecCodeEdit(const QString &text, QGraphicsItem *parent/*= 0*/) |
|
30 : HbLineEdit(text, parent) |
|
31 { |
|
32 } |
|
33 |
|
34 /*! |
|
35 Destructor |
|
36 */ |
|
37 SecCodeEdit::~SecCodeEdit() |
|
38 { |
|
39 } |
|
40 |
|
41 /*! |
|
42 Mouse Press Event |
|
43 */ |
|
44 void SecCodeEdit::mousePressEvent(QGraphicsSceneMouseEvent *event) |
|
45 { |
|
46 if (event->button() != Qt::LeftButton) { |
|
47 event->ignore(); |
|
48 return; |
|
49 } |
|
50 |
|
51 if (rect().contains(event->pos())) { |
|
52 emit clicked(); |
|
53 event->accept(); |
|
54 } else { |
|
55 event->ignore(); |
|
56 } |
|
57 } |