|
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: |
|
15 * |
|
16 */ |
|
17 |
|
18 // Orbit classes |
|
19 #include <hbicon.h> |
|
20 #include <hblineedit.h> |
|
21 #include <QVariant> |
|
22 |
|
23 |
|
24 QString mUTClipboard; |
|
25 |
|
26 // ----------------------------------------------------------------------------- |
|
27 // HbIcon::HbIcon |
|
28 // ----------------------------------------------------------------------------- |
|
29 // |
|
30 HbIcon::HbIcon() |
|
31 { |
|
32 mName = QString(); |
|
33 mTestIcon = new QIcon; |
|
34 } |
|
35 |
|
36 // ----------------------------------------------------------------------------- |
|
37 // HbIcon::HbIcon |
|
38 // ----------------------------------------------------------------------------- |
|
39 // |
|
40 HbIcon::HbIcon(const QString &iconName) |
|
41 { |
|
42 mName = iconName; |
|
43 mTestIcon = new QIcon; |
|
44 } |
|
45 |
|
46 // ----------------------------------------------------------------------------- |
|
47 // HbIcon::HbIcon |
|
48 // ----------------------------------------------------------------------------- |
|
49 // |
|
50 HbIcon::HbIcon(const QIcon &icon) |
|
51 { |
|
52 mName = "c:\\data\\images\\designer.png"; |
|
53 mTestIcon = new QIcon; |
|
54 } |
|
55 |
|
56 // ----------------------------------------------------------------------------- |
|
57 // HbIcon::HbIcon |
|
58 // ----------------------------------------------------------------------------- |
|
59 // |
|
60 HbIcon::HbIcon(const HbIcon &icon) |
|
61 { |
|
62 mName = "c:\\data\\images\\designer.png"; |
|
63 mTestIcon = new QIcon; |
|
64 } |
|
65 |
|
66 // ----------------------------------------------------------------------------- |
|
67 // HbIcon::~HbIcon |
|
68 // ----------------------------------------------------------------------------- |
|
69 // |
|
70 HbIcon::~HbIcon() |
|
71 { |
|
72 delete mTestIcon; |
|
73 } |
|
74 |
|
75 // ----------------------------------------------------------------------------- |
|
76 // HbIcon::isNull |
|
77 // ----------------------------------------------------------------------------- |
|
78 // |
|
79 bool HbIcon::isNull() const |
|
80 { |
|
81 return false; |
|
82 } |
|
83 |
|
84 // ----------------------------------------------------------------------------- |
|
85 // HbIcon::qicon |
|
86 // ----------------------------------------------------------------------------- |
|
87 // |
|
88 QIcon &HbIcon::qicon() const |
|
89 { |
|
90 return *mTestIcon; |
|
91 } |
|
92 |
|
93 // ----------------------------------------------------------------------------- |
|
94 // HbIcon::operator== |
|
95 // ----------------------------------------------------------------------------- |
|
96 // |
|
97 bool HbIcon::operator==(const HbIcon &other) const |
|
98 { |
|
99 return (other.mName == mName); |
|
100 } |
|
101 |
|
102 // ----------------------------------------------------------------------------- |
|
103 // HbIcon::operator QVariant |
|
104 // Returns the icon as a QVariant. |
|
105 // ----------------------------------------------------------------------------- |
|
106 // |
|
107 HbIcon::operator QVariant() const |
|
108 { |
|
109 return QVariant::fromValue(*this); |
|
110 } |
|
111 |
|
112 // ----------------------------------------------------------------------------- |
|
113 // HbLineEdit::HbLineEdit |
|
114 // ----------------------------------------------------------------------------- |
|
115 // |
|
116 HbLineEdit::HbLineEdit() |
|
117 { |
|
118 //mName = QString(); |
|
119 } |
|
120 |
|
121 // ----------------------------------------------------------------------------- |
|
122 // HbLineEdit::HbLineEdit |
|
123 // ----------------------------------------------------------------------------- |
|
124 // |
|
125 HbLineEdit::HbLineEdit(const QString &lineEditText) |
|
126 { |
|
127 //mName = iconName; |
|
128 } |
|
129 |
|
130 // ----------------------------------------------------------------------------- |
|
131 // HbLineEdit::~HbLineEdit |
|
132 // ----------------------------------------------------------------------------- |
|
133 // |
|
134 HbLineEdit::~HbLineEdit() |
|
135 { |
|
136 } |
|
137 |
|
138 // ----------------------------------------------------------------------------- |
|
139 // HbLineEdit::setText |
|
140 // ----------------------------------------------------------------------------- |
|
141 // |
|
142 void HbLineEdit::setText(const QString &text) |
|
143 { |
|
144 mText = text; |
|
145 } |
|
146 // ----------------------------------------------------------------------------- |
|
147 // HbLineEdit::selectAll |
|
148 // ----------------------------------------------------------------------------- |
|
149 // |
|
150 void HbLineEdit::selectAll() |
|
151 { |
|
152 } |
|
153 // ----------------------------------------------------------------------------- |
|
154 // HbLineEdit::selectAll |
|
155 // ----------------------------------------------------------------------------- |
|
156 // |
|
157 void HbLineEdit::setSelection(int start, int length) |
|
158 { |
|
159 Q_UNUSED(start); |
|
160 Q_UNUSED(length); |
|
161 } |
|
162 // ----------------------------------------------------------------------------- |
|
163 // HbLineEdit::copy |
|
164 // ----------------------------------------------------------------------------- |
|
165 // |
|
166 void HbLineEdit::copy() |
|
167 { |
|
168 mUTClipboard = mText; |
|
169 } |
|
170 // ----------------------------------------------------------------------------- |
|
171 // HbLineEdit::paste |
|
172 // ----------------------------------------------------------------------------- |
|
173 // |
|
174 void HbLineEdit::paste() |
|
175 { |
|
176 mText = mUTClipboard; |
|
177 } |
|
178 // ----------------------------------------------------------------------------- |
|
179 // HbLineEdit::text |
|
180 // ----------------------------------------------------------------------------- |
|
181 // |
|
182 QString HbLineEdit::text() const |
|
183 { |
|
184 return mText; |
|
185 } |