equal
deleted
inserted
replaced
33 |
33 |
34 This signal is emitted when there is a mouse press event. |
34 This signal is emitted when there is a mouse press event. |
35 */ |
35 */ |
36 |
36 |
37 /*! |
37 /*! |
38 Constructor. |
38 \deprecated class HbPreviewLabel |
39 @param previewSymbols The string of the label and parent Graphics Item. |
39 */ |
|
40 |
|
41 /*! |
|
42 \deprecated HbPreviewLabel::HbPreviewLabel(QString, QGraphicsItem *) |
|
43 is deprecated. |
40 */ |
44 */ |
41 HbPreviewLabel::HbPreviewLabel(QString previewSymbols, QGraphicsItem *parent) |
45 HbPreviewLabel::HbPreviewLabel(QString previewSymbols, QGraphicsItem *parent) |
42 :HbWidget(parent), |
46 :HbWidget(parent), |
43 mTextItem(0) |
47 mTextItem(0) |
44 { |
48 { |
47 mTextItem->setAlignment(Qt::AlignCenter); |
51 mTextItem->setAlignment(Qt::AlignCenter); |
48 mTextItem->setFontSpec(HbFontSpec(HbFontSpec::Primary)); |
52 mTextItem->setFontSpec(HbFontSpec(HbFontSpec::Primary)); |
49 } |
53 } |
50 |
54 |
51 /*! |
55 /*! |
52 Destroy the object |
56 \deprecated HbPreviewLabel::~HbPreviewLabel() |
|
57 is deprecated. |
53 */ |
58 */ |
54 HbPreviewLabel::~HbPreviewLabel() |
59 HbPreviewLabel::~HbPreviewLabel() |
55 { |
60 { |
56 } |
61 } |
57 |
62 |
58 /*! |
63 /*! |
59 sets geometry of textItem |
64 \deprecated HbPreviewLabel::setTextGeometry(qreal, qreal) |
60 @param itemsize the Geometry of Button. |
65 is deprecated. |
61 */ |
66 */ |
62 void HbPreviewLabel::setTextGeometry(qreal width, qreal height) |
67 void HbPreviewLabel::setTextGeometry(qreal width, qreal height) |
63 { |
68 { |
64 QColor color = HbColorScheme::color("qtc_editor_normal"); |
69 QColor color = HbColorScheme::color("qtc_editor_normal"); |
65 QRectF rect; |
70 QRectF rect; |
70 } |
75 } |
71 mTextItem->setGeometry(rect); |
76 mTextItem->setGeometry(rect); |
72 } |
77 } |
73 |
78 |
74 /*! |
79 /*! |
75 This function handles the mouse press event. |
80 \deprecated HbPreviewLabel::mousePressEvent(QGraphicsSceneMouseEvent *) |
76 @param event The mouse events in the graphics view framework. |
81 is deprecated. |
77 */ |
82 */ |
78 void HbPreviewLabel::mousePressEvent(QGraphicsSceneMouseEvent * event) |
83 void HbPreviewLabel::mousePressEvent(QGraphicsSceneMouseEvent * event) |
79 { |
84 { |
80 Q_UNUSED(event); |
85 Q_UNUSED(event); |
81 emit showAccentedPreview(mTextItem->text(),sceneBoundingRect()); |
86 emit showAccentedPreview(mTextItem->text(),sceneBoundingRect()); |
82 } |
87 } |
83 |
88 |
84 /*! |
89 /*! |
85 This function handles the mouse move event. |
90 \deprecated HbPreviewLabel::mouseMoveEvent(QGraphicsSceneMouseEvent *) |
86 @param event The mouse events in the graphics view framework. |
91 is deprecated. |
87 |
|
88 In case of a key/touch movement will activate a mousePressEvent on another Label |
|
89 and the next Label is set as the grabber item. |
|
90 */ |
92 */ |
91 void HbPreviewLabel::mouseMoveEvent(QGraphicsSceneMouseEvent * event) |
93 void HbPreviewLabel::mouseMoveEvent(QGraphicsSceneMouseEvent * event) |
92 { |
94 { |
93 bool transfered = false; |
95 bool transfered = false; |
94 if (!isUnderMouse()) { |
96 if (!isUnderMouse()) { |
126 } |
128 } |
127 } |
129 } |
128 } |
130 } |
129 |
131 |
130 /*! |
132 /*! |
131 This function handles the mouse release event. |
133 \deprecated HbPreviewLabel::mouseReleaseEvent(QGraphicsSceneMouseEvent *) |
132 @param event The mouse events in the graphics view framework. |
134 is deprecated. |
133 |
|
134 emits the signal selected to input the corrosponding character mapped to the key whenever |
|
135 a key is released and afterwards hides the PreviewPopup by emiitting hidePreview |
|
136 */ |
135 */ |
137 void HbPreviewLabel::mouseReleaseEvent(QGraphicsSceneMouseEvent * event) |
136 void HbPreviewLabel::mouseReleaseEvent(QGraphicsSceneMouseEvent * event) |
138 { |
137 { |
139 Q_UNUSED(event); |
138 Q_UNUSED(event); |
140 if (isUnderMouse()) { |
139 if (isUnderMouse()) { |
143 emit hidePreview(); |
142 emit hidePreview(); |
144 ungrabMouse(); |
143 ungrabMouse(); |
145 } |
144 } |
146 |
145 |
147 // End Of File |
146 // End Of File |
|
147 |