summaryrefslogtreecommitdiff
authordwmw2 <dwmw2>2002-04-04 14:08:17 (UTC)
committer dwmw2 <dwmw2>2002-04-04 14:08:17 (UTC)
commitd3ef7996a0c857451395fcdd2eed63399100586a (patch) (unidiff)
tree054563aae8769f9bf584fab3beee2c63f880c869
parent351f962d07ad32ab3cc3442f85b9fd20fe621b4c (diff)
downloadopie-d3ef7996a0c857451395fcdd2eed63399100586a.zip
opie-d3ef7996a0c857451395fcdd2eed63399100586a.tar.gz
opie-d3ef7996a0c857451395fcdd2eed63399100586a.tar.bz2
SMS sending
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/gsmtool/gsmtool.cpp129
-rw-r--r--noncore/unsupported/gsmtool/gsmtool.h9
-rw-r--r--noncore/unsupported/gsmtool/gsmtoolbase.ui237
3 files changed, 307 insertions, 68 deletions
diff --git a/noncore/unsupported/gsmtool/gsmtool.cpp b/noncore/unsupported/gsmtool/gsmtool.cpp
index 8273461..6fea596 100644
--- a/noncore/unsupported/gsmtool/gsmtool.cpp
+++ b/noncore/unsupported/gsmtool/gsmtool.cpp
@@ -1,313 +1,424 @@
1#include "gsmtool.h" 1#include "gsmtool.h"
2#include <qpushbutton.h> 2#include <qpushbutton.h>
3#include <qcombobox.h> 3#include <qcombobox.h>
4#include <qlineedit.h> 4#include <qlineedit.h>
5#include <qlabel.h> 5#include <qlabel.h>
6#include <qtabwidget.h> 6#include <qtabwidget.h>
7#include <qlistview.h> 7#include <qlistview.h>
8#include <qtextbrowser.h> 8#include <qtextbrowser.h>
9#include <qmultilineedit.h> 9#include <qmultilineedit.h>
10 10
11#include <termios.h> 11#include <termios.h>
12 12
13#include <gsmlib/gsm_me_ta.h> 13#include <gsmlib/gsm_me_ta.h>
14#include <gsmlib/gsm_unix_serial.h> 14#include <gsmlib/gsm_unix_serial.h>
15#include <gsmlib/gsm_sms.h> 15#include <gsmlib/gsm_sms.h>
16#include <gsmlib/gsm_sorted_sms_store.h> 16#include <gsmlib/gsm_sorted_sms_store.h>
17 17
18using namespace gsmlib; 18using namespace gsmlib;
19 19
20 20
21/* 21/*
22 * Constructs a GSMTool which is a child of 'parent', with the 22 * Constructs a GSMTool which is a child of 'parent', with the
23 * name 'name' and widget flags set to 'f' 23 * name 'name' and widget flags set to 'f'
24 */ 24 */
25GSMTool::GSMTool( QWidget* parent, const char* name, WFlags fl ) 25GSMTool::GSMTool( QWidget* parent, const char* name, WFlags fl )
26 : GSMToolBase( parent, name, fl ) 26 : GSMToolBase( parent, name, fl )
27{ 27{
28 devicelocked = 0; 28 devicelocked = 0;
29 me = NULL; 29 me = NULL;
30 sms_store = NULL; 30 sms_store = NULL;
31 setConnected(FALSE); 31 setConnected(FALSE);
32 /* FIXME: Persistent settings for device/baudrate */ 32 /* FIXME: Persistent settings for device/baudrate */
33 connect(ConnectButton, SIGNAL(clicked()), this, SLOT(doConnectButton())); 33 connect(ConnectButton, SIGNAL(clicked()), this, SLOT(doConnectButton()));
34 connect(SMSDeleteButton, SIGNAL(clicked()), this, SLOT(doSMSDeleteButton()));
35 connect(SMSSendButton, SIGNAL(clicked()), this, SLOT(doSMSSendButton()));
36 connect(NewSMSClearButton, SIGNAL(clicked()), this, SLOT(doNewSMSClearButton()));
37 connect(NewSMSSaveButton, SIGNAL(clicked()), this, SLOT(doNewSMSSaveButton()));
38 connect(NewSMSSendButton, SIGNAL(clicked()), this, SLOT(doNewSMSSendButton()));
34 connect(ScanButton, SIGNAL(clicked()), this, SLOT(doScanButton())); 39 connect(ScanButton, SIGNAL(clicked()), this, SLOT(doScanButton()));
35 connect(TabWidget2, SIGNAL(currentChanged(QWidget *)), this, SLOT(doTabChanged())); 40 connect(TabWidget2, SIGNAL(currentChanged(QWidget *)), this, SLOT(doTabChanged()));
36 connect(SMSStoreList, SIGNAL(activated(int)), this, SLOT(doSMSStoreChanged())); 41 connect(SMSStoreList, SIGNAL(activated(int)), this, SLOT(doSMSStoreChanged()));
37 connect(SMSViewType, SIGNAL(activated(int)), this, SLOT(doSMSTypeChanged())); 42 connect(SMSViewType, SIGNAL(activated(int)), this, SLOT(doSMSTypeChanged()));
38 connect(SMSList, SIGNAL(selectionChanged(QListViewItem *)), this, SLOT(doSelectedSMSChanged(QListViewItem *))); 43 connect(SMSList, SIGNAL(selectionChanged(QListViewItem *)), this, SLOT(doSelectedSMSChanged(QListViewItem *)));
39 timerid = -1; // Is this not possible normally? 44 timerid = -1; // Is this not possible normally?
40} 45}
41 46
42/* 47/*
43 * Destroys the object and frees any allocated resources 48 * Destroys the object and frees any allocated resources
44 */ 49 */
45GSMTool::~GSMTool() 50GSMTool::~GSMTool()
46{ 51{
47 // no need to delete child widgets, Qt does it all for us 52 // no need to delete child widgets, Qt does it all for us
48 if (devicelocked) 53 if (devicelocked)
49 unlockDevice(); 54 unlockDevice();
50} 55}
51const speed_t GSMTool::baudrates[12] = { 56const speed_t GSMTool::baudrates[12] = {
52 B300, B600, B1200, B2400, B4800, B9600, B19200, 57 B300, B600, B1200, B2400, B4800, B9600, B19200,
53 B38400, B57600, B115200, B230400, B460800 58 B38400, B57600, B115200, B230400, B460800
54}; 59};
55 60
56int GSMTool::lockDevice( ) 61int GSMTool::lockDevice( )
57{ 62{
58 devicelocked = 1; 63 devicelocked = 1;
59 /* FIXME */ 64 /* FIXME */
60 return 0; 65 return 0;
61} 66}
62 67
63void GSMTool::unlockDevice( ) 68void GSMTool::unlockDevice( )
64{ 69{
65 devicelocked = 0; 70 devicelocked = 0;
66} 71}
67 72
68void GSMTool::setConnected( bool conn ) 73void GSMTool::setConnected( bool conn )
69{ 74{
70 TabWidget2->setTabEnabled(tab_2, conn); 75 TabWidget2->setTabEnabled(tab_2, conn);
71 TabWidget2->setTabEnabled(tab_3, conn); 76 TabWidget2->setTabEnabled(tab_3, conn);
77 TabWidget2->setTabEnabled(tab_4, conn);
72 MfrLabel->setEnabled(conn); 78 MfrLabel->setEnabled(conn);
73 MfrText->setEnabled(conn); 79 MfrText->setEnabled(conn);
74 ModelLabel->setEnabled(conn); 80 ModelLabel->setEnabled(conn);
75 ModelText->setEnabled(conn); 81 ModelText->setEnabled(conn);
76 RevisionLabel->setEnabled(conn); 82 RevisionLabel->setEnabled(conn);
77 RevisionText->setEnabled(conn); 83 RevisionText->setEnabled(conn);
78 SerialLabel->setEnabled(conn); 84 SerialLabel->setEnabled(conn);
79 SerialText->setEnabled(conn); 85 SerialText->setEnabled(conn);
80 86
81} 87}
82void GSMTool::doTabChanged() 88void GSMTool::doTabChanged()
83{ 89{
84 int index = TabWidget2->currentPageIndex(); 90 int index = TabWidget2->currentPageIndex();
85 qDebug("tab changed to %d", index); 91 qDebug("tab changed to %d", index);
86 92
87 if (index == 1) { 93 if (index == 1) {
88 timerid = startTimer(5000); 94 timerid = startTimer(5000);
89 timerEvent(NULL); 95 timerEvent(NULL);
90 } else if (timerid != -1) { 96 } else if (timerid != -1) {
91 killTimer(timerid); 97 killTimer(timerid);
92 timerid = -1; 98 timerid = -1;
93 } 99 }
94} 100}
95 101
96void GSMTool::timerEvent( QTimerEvent * ) 102void GSMTool::timerEvent( QTimerEvent * )
97{ 103{
98 OPInfo opi; 104 OPInfo opi;
99 105
100 opi = me->getCurrentOPInfo(); 106 opi = me->getCurrentOPInfo();
101 107
102 if (opi._numericName == NOT_SET) { 108 if (opi._numericName == NOT_SET) {
103 NetStatText->setText("No network"); 109 NetStatText->setText("No network");
104 NetworkLabel->setEnabled(FALSE); 110 NetworkLabel->setEnabled(FALSE);
105 NetworkText->setEnabled(FALSE); 111 NetworkText->setEnabled(FALSE);
106 NetworkText->setText(""); 112 NetworkText->setText("");
107 SigStrText->setEnabled(FALSE); 113 SigStrText->setEnabled(FALSE);
108 SigStrText->setText(""); 114 SigStrText->setText("");
109 dB->setEnabled(FALSE); 115 dB->setEnabled(FALSE);
110 SigStrLabel->setEnabled(FALSE); 116 SigStrLabel->setEnabled(FALSE);
111 } else { 117 } else {
112 // FIXME: Add 'roaming' info from AT+CFUN 118 // FIXME: Add 'roaming' info from AT+CFUN
113 qDebug("network"); 119 qDebug("network");
114 NetStatText->setText("Registered"); 120 NetStatText->setText("Registered");
115 NetworkLabel->setEnabled(TRUE); 121 NetworkLabel->setEnabled(TRUE);
116 NetworkText->setEnabled(TRUE); 122 NetworkText->setEnabled(TRUE);
117 NetworkText->setText(opi._longName.c_str()); 123 NetworkText->setText(opi._longName.c_str());
118 SigStrText->setEnabled(TRUE); 124 SigStrText->setEnabled(TRUE);
119 125
120 qDebug("get sig str"); 126 qDebug("get sig str");
121 int csq = me->getSignalStrength(); 127 int csq = me->getSignalStrength();
122 if (csq == 0) { 128 if (csq == 0) {
123 SigStrText->setText("<= -113"); 129 SigStrText->setText("<= -113");
124 dB->setEnabled(TRUE); 130 dB->setEnabled(TRUE);
125 SigStrLabel->setEnabled(TRUE); 131 SigStrLabel->setEnabled(TRUE);
126 } else if (csq == 99) { 132 } else if (csq == 99) {
127 SigStrText->setText("Unknown"); 133 SigStrText->setText("Unknown");
128 dB->setEnabled(FALSE); 134 dB->setEnabled(FALSE);
129 SigStrLabel->setEnabled(FALSE); 135 SigStrLabel->setEnabled(FALSE);
130 } else { 136 } else {
131 char buf[6]; 137 char buf[6];
132 sprintf(buf, "%d", -113 + (2*csq)); 138 sprintf(buf, "%d", -113 + (2*csq));
133 SigStrText->setText(buf); 139 SigStrText->setText(buf);
134 dB->setEnabled(TRUE); 140 dB->setEnabled(TRUE);
135 SigStrLabel->setEnabled(TRUE); 141 SigStrLabel->setEnabled(TRUE);
136 } 142 }
137 } 143 }
138} 144}
139 145
140void GSMTool::doSMSStoreChanged() 146void GSMTool::doSMSStoreChanged()
141{ 147{
142 const char *storename = SMSStoreList->currentText().ascii(); 148 const char *storename = SMSStoreList->currentText().ascii();
143 qDebug("Store Changed to '%s'", storename); 149 qDebug("Store Changed to '%s'", storename);
144 if (!strcmp(storename, "None")) { 150 if (!strcmp(storename, "None")) {
145 sms_store = NULL; 151 sms_store = NULL;
146 } else try { 152 } else try {
147 sms_store = me->getSMSStore(storename); 153 sms_store = new SortedSMSStore(me->getSMSStore(storename));
154 sms_store->setSortOrder(ByIndex);
148 155
149 qDebug("got store of size %d", sms_store->size()); 156 qDebug("got store of size %d", sms_store->size());
150 } catch (GsmException) { 157 } catch (GsmException) {
151 sms_store = NULL; 158 sms_store = NULL;
152 qDebug("get store failed"); 159 qDebug("get store failed");
153 } 160 }
154 161
155 SMSList->setEnabled(!(sms_store == NULL)); 162 SMSList->setEnabled(!(sms_store == NULL));
163 NewSMSSaveButton->setEnabled(!(sms_store == NULL));
156 doSMSTypeChanged(); 164 doSMSTypeChanged();
157} 165}
158 166
159void GSMTool::doSMSTypeChanged() 167void GSMTool::doSMSTypeChanged()
160{ 168{
161 int direction = SMSViewType->currentItem(); 169 int direction = SMSViewType->currentItem();
162 qDebug("direction %s\n", direction?"outgoing":"incoming"); 170 qDebug("direction %s\n", direction?"outgoing":"incoming");
171 if (direction)
172 SMSSendButton->setText("Send");
173 else
174 SMSSendButton->setText("Reply");
163 175
164 SMSList->clear(); 176 SMSList->clear();
165 doSelectedSMSChanged(NULL); 177 doSelectedSMSChanged(NULL);
166 178
167 if (sms_store == NULL) 179 if (sms_store == NULL)
168 return; 180 return;
169 for (int i = 0; i < sms_store->size(); i++) { 181 for (SortedSMSStore::iterator e = sms_store->begin();
170 qDebug("Message %d", i); 182 e != sms_store->end(); e++) {
171 qDebug("Is%sempty", sms_store()[i].empty()?" ":" not "); 183 // qDebug("Message %d", i);
172 if (sms_store()[i].empty()) 184 qDebug("Is%sempty", e->empty()?" ":" not ");
185 if (e->empty())
173 continue; 186 continue;
174 187
175 qDebug("Status %d", sms_store()[i].status()); 188 qDebug("Status %d", e->status());
176 SMSMessageRef message = sms_store()[i].message(); 189 SMSMessageRef message = e->message();
177 qDebug("Got message."); 190 qDebug("Got message.");
178 191
179 // qDebug(message->toString().c_str()); 192 // qDebug(message->toString().c_str());
180 if (direction == message->messageType()) { 193 if (direction == message->messageType()) {
181 qDebug("yes\n"); 194 qDebug("yes\n");
182 char buf[3]; 195 char buf[3];
183 snprintf(buf, 3, "%d", i); 196 snprintf(buf, 3, "%d", e->index());
184 new QListViewItem(SMSList, message->address()._number.c_str(), message->serviceCentreTimestamp().toString().c_str(), buf); 197 new QListViewItem(SMSList, message->address()._number.c_str(), message->serviceCentreTimestamp().toString().c_str(), buf);
185 } 198 }
186 } 199 }
187} 200}
188 201
189void GSMTool::doSelectedSMSChanged(QListViewItem *item) 202void GSMTool::doSelectedSMSChanged(QListViewItem *item)
190{ 203{
191 qDebug("message changed\n"); 204 qDebug("message changed\n");
192 205
193 if (!item || sms_store == NULL) { 206 if (!item || sms_store == NULL) {
194 SMSText->setText(""); 207 SMSText->setText("");
195 SMSText->setEnabled(FALSE); 208 SMSText->setEnabled(FALSE);
196 SMSDeleteButton->setEnabled(FALSE); 209 SMSDeleteButton->setEnabled(FALSE);
197 SMSSendButton->setEnabled(FALSE); 210 SMSSendButton->setEnabled(FALSE);
198 return; 211 return;
199 } 212 }
200 /* ARGH. This sucks. Surely there's an app-private pointer in the 213 /* ARGH. This sucks. Surely there's an app-private pointer in the
201 QListViewItem that I've failed to notice? 214 QListViewItem that I've failed to notice?
202 215
203 SMSMessageRef message = *(SMSMessageRef*)item->private; 216 SMSMessageRef message = *(SMSMessageRef*)item->private;
204 */ 217 */
205 qDebug("item %p\n", item); 218 qDebug("item %p\n", item);
206 219
207 qDebug("text(2) is %s\n", item->text(2).ascii()); 220 qDebug("text(2) is %s\n", item->text(2).ascii());
208 int index = atoi(item->text(2).ascii()); 221 int index = atoi(item->text(2).ascii());
209 qDebug("index %d\n", index); 222 qDebug("index %d\n", index);
210 SMSMessageRef message = sms_store()[index].message(); 223 SMSMessageRef message = sms_store->find(index)->message();
211 224
212 SMSText->setText(message->userData().c_str()); 225 SMSText->setText(message->userData().c_str());
213 SMSText->setEnabled(TRUE); 226 SMSText->setEnabled(TRUE);
214 SMSDeleteButton->setEnabled(TRUE); 227 SMSDeleteButton->setEnabled(TRUE);
215 SMSSendButton->setEnabled(TRUE); 228 SMSSendButton->setEnabled(TRUE);
216 229
217} 230}
231
232void GSMTool::doSMSSendButton()
233{
234 qDebug("SMSSendButton");
235
236 QListViewItem *item = SMSList->currentItem();
237 if (!item)
238 return;
239
240 int index = atoi(item->text(2).ascii());
241 qDebug("index %d\n", index);
242
243 int direction = SMSViewType->currentItem();
244 qDebug("direction %s\n", direction?"outgoing":"incoming");
245
246 SMSMessageRef message = sms_store->find(index)->message();
247
248 if (direction)
249 NewSMSText->setText(message->userData().c_str());
250 else
251 NewSMSText->setText("");
252 NewSMSToBox->insertItem(message->address()._number.c_str(), 0);
253 TabWidget2->setCurrentPage(3);
254
255}
256
257void GSMTool::doNewSMSClearButton()
258{
259 NewSMSText->setText("");
260}
261
262void GSMTool::doNewSMSSaveButton()
263{
264 qDebug("NewSMSSaveButton");
265 const char *msgtext = strdup(NewSMSText->text().local8Bit());
266 const char *dest = NewSMSToBox->currentText().ascii();
267
268 NewSMSStatusLabel->setText("Sending...");
269 me->setMessageService(1);
270
271 qDebug("NewSMSSendButton: '%s' to '%s'", msgtext, dest);
272
273 SMSMessageRef m = new SMSSubmitMessage (msgtext, dest);
274 sms_store->insert(m);
275 free((void *)msgtext);
276
277}
278void GSMTool::doNewSMSSendButton()
279{
280 const char *msgtext = strdup(NewSMSText->text().local8Bit());
281 const char *dest = NewSMSToBox->currentText().ascii();
282
283 NewSMSStatusLabel->setText("Sending...");
284 me->setMessageService(1);
285
286 qDebug("NewSMSSendButton: '%s' to '%s'", msgtext, dest);
287
288 SMSSubmitMessage m(msgtext, dest);
289 try {
290 Ref<SMSMessage> ackPDU;
291 m.setAt(new GsmAt(*me));
292 m.send(ackPDU);
293
294 // print acknowledgement if available
295 if (! ackPDU.isnull())
296 cout << ackPDU->toString();
297 NewSMSStatusLabel->setText("Message sent.");
298 } catch (GsmException &ge) {
299 NewSMSStatusLabel->setText("Failed.");
300 qDebug(ge.what());
301 }
302 free((void *)msgtext);
303
304
305}
306
307
308void GSMTool::doSMSDeleteButton()
309{
310 QListViewItem *item = SMSList->currentItem();
311 if (!item)
312 return;
313
314 int index = atoi(item->text(2).ascii());
315 qDebug("delete SMS with index %d\n", index);
316
317
318
319 SortedSMSStore::iterator e = sms_store->find(index);
320
321 if (e != sms_store->end()) {
322 qDebug("message is %s\n", e->message()->userData().c_str());
323 sms_store->erase(e);
324
325 }
326 doSMSTypeChanged();
327}
328
218void GSMTool::doScanButton() 329void GSMTool::doScanButton()
219{ 330{
220 qDebug("ScanButton"); 331 qDebug("ScanButton");
221 332
222 NetworkList->setEnabled(FALSE); 333 NetworkList->setEnabled(FALSE);
223 AvailNetsLabel->setEnabled(FALSE); 334 AvailNetsLabel->setEnabled(FALSE);
224 NetworkList->clear(); 335 NetworkList->clear();
225 new QListViewItem(NetworkList, "Scanning..."); 336 new QListViewItem(NetworkList, "Scanning...");
226 337
227 vector<OPInfo> opis; 338 vector<OPInfo> opis;
228 339
229 try { 340 try {
230 opis = me->getAvailableOPInfo(); 341 opis = me->getAvailableOPInfo();
231 } catch (GsmException) { 342 } catch (GsmException) {
232 NetworkList->clear(); 343 NetworkList->clear();
233 new QListViewItem(NetworkList, "Scan failed..."); 344 new QListViewItem(NetworkList, "Scan failed...");
234 return; 345 return;
235 } 346 }
236 347
237 NetworkList->clear(); 348 NetworkList->clear();
238 for (vector<OPInfo>::iterator i = opis.begin(); i != opis.end(); ++i) { 349 for (vector<OPInfo>::iterator i = opis.begin(); i != opis.end(); ++i) {
239 char *statustext; 350 char *statustext;
240 switch (i->_status) { 351 switch (i->_status) {
241 352
242 case UnknownOPStatus: 353 case UnknownOPStatus:
243 statustext = "unknown"; 354 statustext = "unknown";
244 break; 355 break;
245 356
246 case CurrentOPStatus: 357 case CurrentOPStatus:
247 statustext = "current"; 358 statustext = "current";
248 break; 359 break;
249 360
250 case AvailableOPStatus: 361 case AvailableOPStatus:
251 statustext = "available"; 362 statustext = "available";
252 break; 363 break;
253 364
254 case ForbiddenOPStatus: 365 case ForbiddenOPStatus:
255 statustext = "forbidden"; 366 statustext = "forbidden";
256 break; 367 break;
257 368
258 default: 369 default:
259 statustext = "(ERROR)"; 370 statustext = "(ERROR)";
260 } 371 }
261 char num[7]; 372 char num[7];
262 snprintf(num, 6, "%d", i->_numericName); 373 snprintf(num, 6, "%d", i->_numericName);
263 new QListViewItem(NetworkList, i->_longName.c_str(), statustext, num, i->_shortName.c_str()); 374 new QListViewItem(NetworkList, i->_longName.c_str(), statustext, num, i->_shortName.c_str());
264 } 375 }
265 NetworkList->setEnabled(TRUE); 376 NetworkList->setEnabled(TRUE);
266 AvailNetsLabel->setEnabled(TRUE); 377 AvailNetsLabel->setEnabled(TRUE);
267} 378}
268/* 379/*
269 * A simple slot... not very interesting. 380 * A simple slot... not very interesting.
270 */ 381 */
271void GSMTool::doConnectButton() 382void GSMTool::doConnectButton()
272{ 383{
273 gsmlib::Port *port; 384 gsmlib::Port *port;
274 385
275 speed_t rate; 386 speed_t rate;
276 devicename = strdup(DeviceName->currentText().local8Bit().data()); 387 devicename = strdup(DeviceName->currentText().local8Bit().data());
277 rate = baudrates[BaudRate->currentItem()]; 388 rate = baudrates[BaudRate->currentItem()];
278 389
279 qDebug("Connect Button Pressed"); 390 qDebug("Connect Button Pressed");
280 MfrText->setText("Opening..."); 391 MfrText->setText("Opening...");
281 ModelText->setText(""); 392 ModelText->setText("");
282 RevisionText->setText(""); 393 RevisionText->setText("");
283 SerialText->setText(""); 394 SerialText->setText("");
284 395
285 setConnected(FALSE); 396 setConnected(FALSE);
286 if (me) { 397 if (me) {
287 me = NULL; 398 me = NULL;
288 } 399 }
289 400
290 if (lockDevice()) { 401 if (lockDevice()) {
291 qDebug("lockDevice() failed\n"); 402 qDebug("lockDevice() failed\n");
292 MfrText->setText("Lock port failed"); 403 MfrText->setText("Lock port failed");
293 }; 404 };
294 405
295 qDebug("Device name is %s\n", devicename); 406 qDebug("Device name is %s\n", devicename);
296 407
297 try { 408 try {
298 port = new UnixSerialPort(devicename, rate, DEFAULT_INIT_STRING, 0); 409 port = new UnixSerialPort(devicename, rate, DEFAULT_INIT_STRING, 0);
299 } catch (GsmException) { 410 } catch (GsmException) {
300 qDebug("port failed"); 411 qDebug("port failed");
301 MfrText->setText("Open port failed"); 412 MfrText->setText("Open port failed");
302 return; 413 return;
303 } 414 }
304 MfrText->setText("Initialising..."); 415 MfrText->setText("Initialising...");
305 qDebug("got port"); 416 qDebug("got port");
306 try { 417 try {
307 me = new MeTa(port); 418 me = new MeTa(port);
308 } catch (GsmException) { 419 } catch (GsmException) {
309 qDebug("meta failed"); 420 qDebug("meta failed");
310 MfrText->setText("Initialise GSM unit failed"); 421 MfrText->setText("Initialise GSM unit failed");
311 me = NULL; 422 me = NULL;
312 unlockDevice(); 423 unlockDevice();
313 return; 424 return;
diff --git a/noncore/unsupported/gsmtool/gsmtool.h b/noncore/unsupported/gsmtool/gsmtool.h
index b8d9a86..b38ff88 100644
--- a/noncore/unsupported/gsmtool/gsmtool.h
+++ b/noncore/unsupported/gsmtool/gsmtool.h
@@ -1,45 +1,50 @@
1#ifndef EXAMPLE_H 1#ifndef EXAMPLE_H
2#define EXAMPLE_H 2#define EXAMPLE_H
3#include "gsmtoolbase.h" 3#include "gsmtoolbase.h"
4 4
5#include <termios.h> 5#include <termios.h>
6 6
7#include <gsmlib/gsm_me_ta.h> 7#include <gsmlib/gsm_me_ta.h>
8#include <gsmlib/gsm_sorted_sms_store.h>
8 9
9class GSMTool : public GSMToolBase 10class GSMTool : public GSMToolBase
10{ 11{
11 Q_OBJECT 12 Q_OBJECT
12 13
13public: 14public:
14 GSMTool( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); 15 GSMTool( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
15 ~GSMTool(); 16 ~GSMTool();
16 17
17protected: 18protected:
18 void timerEvent(QTimerEvent *te ); 19 void timerEvent(QTimerEvent *te );
19 20
20private slots: 21private slots:
21 void doConnectButton(); 22 void doConnectButton();
22 void doScanButton(); 23 void doScanButton();
23 void doTabChanged(); 24 void doTabChanged();
24 void doSMSStoreChanged(); 25 void doSMSStoreChanged();
25 void doSMSTypeChanged(); 26 void doSMSTypeChanged();
26 void doSelectedSMSChanged(QListViewItem *); 27 void doSelectedSMSChanged(QListViewItem *);
27 28 void doSMSSendButton();
29 void doSMSDeleteButton();
30 void doNewSMSClearButton();
31 void doNewSMSSaveButton();
32 void doNewSMSSendButton();
28private: 33private:
29 static const speed_t baudrates[]; 34 static const speed_t baudrates[];
30 int devicelocked; 35 int devicelocked;
31 int timerid; 36 int timerid;
32 37
33 gsmlib::MeTa *me; 38 gsmlib::MeTa *me;
34 gsmlib::SMSStoreRef sms_store; 39 gsmlib::SortedSMSStoreRef sms_store;
35 40
36 char *devicename; 41 char *devicename;
37 speed_t baudrate; 42 speed_t baudrate;
38 43
39 int lockDevice( ); 44 int lockDevice( );
40 void unlockDevice( ); 45 void unlockDevice( );
41 46
42 void setConnected( bool conn ); 47 void setConnected( bool conn );
43}; 48};
44 49
45#endif // EXAMPLE_H 50#endif // EXAMPLE_H
diff --git a/noncore/unsupported/gsmtool/gsmtoolbase.ui b/noncore/unsupported/gsmtool/gsmtoolbase.ui
index 2cca852..65e75ec 100644
--- a/noncore/unsupported/gsmtool/gsmtoolbase.ui
+++ b/noncore/unsupported/gsmtool/gsmtoolbase.ui
@@ -1,217 +1,221 @@
1<!DOCTYPE UI><UI> 1<!DOCTYPE UI><UI>
2<class>GSMToolBase</class> 2<class>GSMToolBase</class>
3<widget> 3<widget>
4 <class>QWidget</class> 4 <class>QWidget</class>
5 <property stdset="1"> 5 <property stdset="1">
6 <name>name</name> 6 <name>name</name>
7 <cstring>GSM Tool</cstring> 7 <cstring>GSM Tool</cstring>
8 </property> 8 </property>
9 <property stdset="1"> 9 <property stdset="1">
10 <name>geometry</name> 10 <name>geometry</name>
11 <rect> 11 <rect>
12 <x>0</x> 12 <x>0</x>
13 <y>0</y> 13 <y>0</y>
14 <width>371</width> 14 <width>404</width>
15 <height>390</height> 15 <height>390</height>
16 </rect> 16 </rect>
17 </property> 17 </property>
18 <property stdset="1"> 18 <property stdset="1">
19 <name>caption</name> 19 <name>caption</name>
20 <string>GSM Tool</string> 20 <string>GSM Tool</string>
21 </property> 21 </property>
22 <property> 22 <property>
23 <name>layoutMargin</name> 23 <name>layoutMargin</name>
24 </property> 24 </property>
25 <property> 25 <property>
26 <name>layoutSpacing</name> 26 <name>layoutSpacing</name>
27 </property> 27 </property>
28 <vbox> 28 <grid>
29 <property stdset="1"> 29 <property stdset="1">
30 <name>margin</name> 30 <name>margin</name>
31 <number>2</number> 31 <number>2</number>
32 </property> 32 </property>
33 <property stdset="1"> 33 <property stdset="1">
34 <name>spacing</name> 34 <name>spacing</name>
35 <number>1</number> 35 <number>1</number>
36 </property> 36 </property>
37 <widget> 37 <widget row="0" column="0" >
38 <class>QTabWidget</class> 38 <class>QTabWidget</class>
39 <property stdset="1"> 39 <property stdset="1">
40 <name>name</name> 40 <name>name</name>
41 <cstring>TabWidget2</cstring> 41 <cstring>TabWidget2</cstring>
42 </property> 42 </property>
43 <property stdset="1"> 43 <property stdset="1">
44 <name>sizePolicy</name> 44 <name>sizePolicy</name>
45 <sizepolicy> 45 <sizepolicy>
46 <hsizetype>7</hsizetype> 46 <hsizetype>7</hsizetype>
47 <vsizetype>7</vsizetype> 47 <vsizetype>7</vsizetype>
48 </sizepolicy> 48 </sizepolicy>
49 </property> 49 </property>
50 <property stdset="1"> 50 <property stdset="1">
51 <name>focusPolicy</name> 51 <name>focusPolicy</name>
52 <enum>NoFocus</enum> 52 <enum>NoFocus</enum>
53 </property> 53 </property>
54 <property> 54 <property>
55 <name>layoutMargin</name> 55 <name>layoutMargin</name>
56 </property> 56 </property>
57 <property> 57 <property>
58 <name>layoutSpacing</name> 58 <name>layoutSpacing</name>
59 </property> 59 </property>
60 <widget> 60 <widget>
61 <class>QWidget</class> 61 <class>QWidget</class>
62 <property stdset="1"> 62 <property stdset="1">
63 <name>name</name> 63 <name>name</name>
64 <cstring>tab</cstring> 64 <cstring>tab</cstring>
65 </property> 65 </property>
66 <attribute> 66 <attribute>
67 <name>title</name> 67 <name>title</name>
68 <string>Device</string> 68 <string>Device</string>
69 </attribute> 69 </attribute>
70 <vbox> 70 <vbox>
71 <property stdset="1"> 71 <property stdset="1">
72 <name>margin</name> 72 <name>margin</name>
73 <number>2</number> 73 <number>2</number>
74 </property> 74 </property>
75 <property stdset="1"> 75 <property stdset="1">
76 <name>spacing</name> 76 <name>spacing</name>
77 <number>1</number> 77 <number>1</number>
78 </property> 78 </property>
79 <widget> 79 <widget>
80 <class>QLabel</class> 80 <class>QLabel</class>
81 <property stdset="1"> 81 <property stdset="1">
82 <name>name</name> 82 <name>name</name>
83 <cstring>DeviceLabel</cstring> 83 <cstring>DeviceLabel</cstring>
84 </property> 84 </property>
85 <property stdset="1"> 85 <property stdset="1">
86 <name>text</name> 86 <name>text</name>
87 <string>Modem Device:</string> 87 <string>Modem Device:</string>
88 </property> 88 </property>
89 </widget> 89 </widget>
90 <widget> 90 <widget>
91 <class>QComboBox</class> 91 <class>QComboBox</class>
92 <item> 92 <item>
93 <property> 93 <property>
94 <name>text</name> 94 <name>text</name>
95 <string>/dev/ircomm0</string> 95 <string>/dev/ircomm0</string>
96 </property> 96 </property>
97 </item> 97 </item>
98 <item> 98 <item>
99 <property> 99 <property>
100 <name>text</name> 100 <name>text</name>
101 <string>/dev/ttySA0</string> 101 <string>/dev/ttySA0</string>
102 </property> 102 </property>
103 </item> 103 </item>
104 <item> 104 <item>
105 <property> 105 <property>
106 <name>text</name> 106 <name>text</name>
107 <string>/dev/ttyS0</string> 107 <string>/dev/ttyS0</string>
108 </property> 108 </property>
109 </item> 109 </item>
110 <property stdset="1"> 110 <property stdset="1">
111 <name>name</name> 111 <name>name</name>
112 <cstring>DeviceName</cstring> 112 <cstring>DeviceName</cstring>
113 </property> 113 </property>
114 <property stdset="1"> 114 <property stdset="1">
115 <name>editable</name> 115 <name>editable</name>
116 <bool>true</bool> 116 <bool>true</bool>
117 </property> 117 </property>
118 <property stdset="1"> 118 <property stdset="1">
119 <name>currentItem</name> 119 <name>currentItem</name>
120 <number>0</number> 120 <number>0</number>
121 </property> 121 </property>
122 <property stdset="1">
123 <name>duplicatesEnabled</name>
124 <bool>false</bool>
125 </property>
122 </widget> 126 </widget>
123 <widget> 127 <widget>
124 <class>QLabel</class> 128 <class>QLabel</class>
125 <property stdset="1"> 129 <property stdset="1">
126 <name>name</name> 130 <name>name</name>
127 <cstring>BaudLabel</cstring> 131 <cstring>BaudLabel</cstring>
128 </property> 132 </property>
129 <property stdset="1"> 133 <property stdset="1">
130 <name>text</name> 134 <name>text</name>
131 <string>Baud Rate:</string> 135 <string>Baud Rate:</string>
132 </property> 136 </property>
133 </widget> 137 </widget>
134 <widget> 138 <widget>
135 <class>QLayoutWidget</class> 139 <class>QLayoutWidget</class>
136 <property stdset="1"> 140 <property stdset="1">
137 <name>name</name> 141 <name>name</name>
138 <cstring>Layout8</cstring> 142 <cstring>Layout8</cstring>
139 </property> 143 </property>
140 <property> 144 <property>
141 <name>layoutMargin</name> 145 <name>layoutMargin</name>
142 </property> 146 </property>
143 <hbox> 147 <hbox>
144 <property stdset="1"> 148 <property stdset="1">
145 <name>margin</name> 149 <name>margin</name>
146 <number>0</number> 150 <number>0</number>
147 </property> 151 </property>
148 <property stdset="1"> 152 <property stdset="1">
149 <name>spacing</name> 153 <name>spacing</name>
150 <number>1</number> 154 <number>1</number>
151 </property> 155 </property>
152 <widget> 156 <widget>
153 <class>QComboBox</class> 157 <class>QComboBox</class>
154 <item> 158 <item>
155 <property> 159 <property>
156 <name>text</name> 160 <name>text</name>
157 <string>300</string> 161 <string>300</string>
158 </property> 162 </property>
159 </item> 163 </item>
160 <item> 164 <item>
161 <property> 165 <property>
162 <name>text</name> 166 <name>text</name>
163 <string>600</string> 167 <string>600</string>
164 </property> 168 </property>
165 </item> 169 </item>
166 <item> 170 <item>
167 <property> 171 <property>
168 <name>text</name> 172 <name>text</name>
169 <string>1200</string> 173 <string>1200</string>
170 </property> 174 </property>
171 </item> 175 </item>
172 <item> 176 <item>
173 <property> 177 <property>
174 <name>text</name> 178 <name>text</name>
175 <string>2400</string> 179 <string>2400</string>
176 </property> 180 </property>
177 </item> 181 </item>
178 <item> 182 <item>
179 <property> 183 <property>
180 <name>text</name> 184 <name>text</name>
181 <string>4800</string> 185 <string>4800</string>
182 </property> 186 </property>
183 </item> 187 </item>
184 <item> 188 <item>
185 <property> 189 <property>
186 <name>text</name> 190 <name>text</name>
187 <string>9600</string> 191 <string>9600</string>
188 </property> 192 </property>
189 </item> 193 </item>
190 <item> 194 <item>
191 <property> 195 <property>
192 <name>text</name> 196 <name>text</name>
193 <string>19200</string> 197 <string>19200</string>
194 </property> 198 </property>
195 </item> 199 </item>
196 <item> 200 <item>
197 <property> 201 <property>
198 <name>text</name> 202 <name>text</name>
199 <string>38400</string> 203 <string>38400</string>
200 </property> 204 </property>
201 </item> 205 </item>
202 <item> 206 <item>
203 <property> 207 <property>
204 <name>text</name> 208 <name>text</name>
205 <string>57600</string> 209 <string>57600</string>
206 </property> 210 </property>
207 </item> 211 </item>
208 <item> 212 <item>
209 <property> 213 <property>
210 <name>text</name> 214 <name>text</name>
211 <string>115200</string> 215 <string>115200</string>
212 </property> 216 </property>
213 </item> 217 </item>
214 <item> 218 <item>
215 <property> 219 <property>
216 <name>text</name> 220 <name>text</name>
217 <string>230400</string> 221 <string>230400</string>
@@ -653,305 +657,424 @@
653 </column> 657 </column>
654 <property stdset="1"> 658 <property stdset="1">
655 <name>name</name> 659 <name>name</name>
656 <cstring>NetworkList</cstring> 660 <cstring>NetworkList</cstring>
657 </property> 661 </property>
658 <property stdset="1"> 662 <property stdset="1">
659 <name>enabled</name> 663 <name>enabled</name>
660 <bool>false</bool> 664 <bool>false</bool>
661 </property> 665 </property>
662 <property stdset="1"> 666 <property stdset="1">
663 <name>sizePolicy</name> 667 <name>sizePolicy</name>
664 <sizepolicy> 668 <sizepolicy>
665 <hsizetype>7</hsizetype> 669 <hsizetype>7</hsizetype>
666 <vsizetype>7</vsizetype> 670 <vsizetype>7</vsizetype>
667 </sizepolicy> 671 </sizepolicy>
668 </property> 672 </property>
669 <property stdset="1"> 673 <property stdset="1">
670 <name>allColumnsShowFocus</name> 674 <name>allColumnsShowFocus</name>
671 <bool>true</bool> 675 <bool>true</bool>
672 </property> 676 </property>
673 </widget> 677 </widget>
674 <widget> 678 <widget>
675 <class>QLayoutWidget</class> 679 <class>QLayoutWidget</class>
676 <property stdset="1"> 680 <property stdset="1">
677 <name>name</name> 681 <name>name</name>
678 <cstring>Layout11</cstring> 682 <cstring>Layout11</cstring>
679 </property> 683 </property>
680 <hbox> 684 <hbox>
681 <property stdset="1"> 685 <property stdset="1">
682 <name>margin</name> 686 <name>margin</name>
683 <number>2</number> 687 <number>2</number>
684 </property> 688 </property>
685 <property stdset="1"> 689 <property stdset="1">
686 <name>spacing</name> 690 <name>spacing</name>
687 <number>1</number> 691 <number>1</number>
688 </property> 692 </property>
689 <spacer> 693 <spacer>
690 <property> 694 <property>
691 <name>name</name> 695 <name>name</name>
692 <cstring>Spacer14</cstring> 696 <cstring>Spacer14</cstring>
693 </property> 697 </property>
694 <property stdset="1"> 698 <property stdset="1">
695 <name>orientation</name> 699 <name>orientation</name>
696 <enum>Horizontal</enum> 700 <enum>Horizontal</enum>
697 </property> 701 </property>
698 <property stdset="1"> 702 <property stdset="1">
699 <name>sizeType</name> 703 <name>sizeType</name>
700 <enum>Expanding</enum> 704 <enum>Expanding</enum>
701 </property> 705 </property>
702 <property> 706 <property>
703 <name>sizeHint</name> 707 <name>sizeHint</name>
704 <size> 708 <size>
705 <width>20</width> 709 <width>20</width>
706 <height>20</height> 710 <height>20</height>
707 </size> 711 </size>
708 </property> 712 </property>
709 </spacer> 713 </spacer>
710 <widget> 714 <widget>
711 <class>QPushButton</class> 715 <class>QPushButton</class>
712 <property stdset="1"> 716 <property stdset="1">
713 <name>name</name> 717 <name>name</name>
714 <cstring>RegisterButton</cstring> 718 <cstring>RegisterButton</cstring>
715 </property> 719 </property>
716 <property stdset="1"> 720 <property stdset="1">
717 <name>enabled</name> 721 <name>enabled</name>
718 <bool>false</bool> 722 <bool>false</bool>
719 </property> 723 </property>
720 <property stdset="1"> 724 <property stdset="1">
721 <name>sizePolicy</name> 725 <name>sizePolicy</name>
722 <sizepolicy> 726 <sizepolicy>
723 <hsizetype>7</hsizetype> 727 <hsizetype>7</hsizetype>
724 <vsizetype>0</vsizetype> 728 <vsizetype>0</vsizetype>
725 </sizepolicy> 729 </sizepolicy>
726 </property> 730 </property>
727 <property stdset="1"> 731 <property stdset="1">
728 <name>text</name> 732 <name>text</name>
729 <string>Register</string> 733 <string>Register</string>
730 </property> 734 </property>
731 </widget> 735 </widget>
732 </hbox> 736 </hbox>
733 </widget> 737 </widget>
734 </vbox> 738 </vbox>
735 </widget> 739 </widget>
736 <widget> 740 <widget>
737 <class>QWidget</class> 741 <class>QWidget</class>
738 <property stdset="1"> 742 <property stdset="1">
739 <name>name</name> 743 <name>name</name>
740 <cstring>tab</cstring> 744 <cstring>tab</cstring>
741 </property> 745 </property>
742 <attribute> 746 <attribute>
743 <name>title</name> 747 <name>title</name>
744 <string>SMS</string> 748 <string>SMS</string>
745 </attribute> 749 </attribute>
746 <grid> 750 <grid>
747 <property stdset="1"> 751 <property stdset="1">
748 <name>margin</name> 752 <name>margin</name>
749 <number>-1</number> 753 <number>2</number>
750 </property> 754 </property>
751 <property stdset="1"> 755 <property stdset="1">
752 <name>spacing</name> 756 <name>spacing</name>
753 <number>-1</number> 757 <number>1</number>
754 </property> 758 </property>
755 <widget row="0" column="0" > 759 <widget row="0" column="0" rowspan="1" colspan="3" >
756 <class>QLayoutWidget</class> 760 <class>QLayoutWidget</class>
757 <property stdset="1"> 761 <property stdset="1">
758 <name>name</name> 762 <name>name</name>
759 <cstring>Layout6</cstring> 763 <cstring>Layout6</cstring>
760 </property> 764 </property>
761 <property> 765 <property>
762 <name>layoutSpacing</name> 766 <name>layoutSpacing</name>
763 </property> 767 </property>
764 <hbox> 768 <hbox>
765 <property stdset="1"> 769 <property stdset="1">
766 <name>margin</name> 770 <name>margin</name>
767 <number>0</number> 771 <number>0</number>
768 </property> 772 </property>
769 <property stdset="1"> 773 <property stdset="1">
770 <name>spacing</name> 774 <name>spacing</name>
771 <number>6</number> 775 <number>6</number>
772 </property> 776 </property>
773 <widget> 777 <widget>
774 <class>QLabel</class> 778 <class>QLabel</class>
775 <property stdset="1"> 779 <property stdset="1">
776 <name>name</name> 780 <name>name</name>
777 <cstring>SMSStoreLabel</cstring> 781 <cstring>SMSStoreLabel</cstring>
778 </property> 782 </property>
779 <property stdset="1"> 783 <property stdset="1">
780 <name>text</name> 784 <name>text</name>
781 <string>Store:</string> 785 <string>Store:</string>
782 </property> 786 </property>
783 </widget> 787 </widget>
784 <widget> 788 <widget>
785 <class>QComboBox</class> 789 <class>QComboBox</class>
786 <item> 790 <item>
787 <property> 791 <property>
788 <name>text</name> 792 <name>text</name>
789 <string>None</string> 793 <string>None</string>
790 </property> 794 </property>
791 </item> 795 </item>
792 <property stdset="1"> 796 <property stdset="1">
793 <name>name</name> 797 <name>name</name>
794 <cstring>SMSStoreList</cstring> 798 <cstring>SMSStoreList</cstring>
795 </property> 799 </property>
796 <property stdset="1"> 800 <property stdset="1">
797 <name>enabled</name> 801 <name>enabled</name>
798 <bool>true</bool> 802 <bool>true</bool>
799 </property> 803 </property>
800 </widget> 804 </widget>
801 <widget> 805 <widget>
802 <class>QLabel</class> 806 <class>QLabel</class>
803 <property stdset="1"> 807 <property stdset="1">
804 <name>name</name> 808 <name>name</name>
805 <cstring>SMSTypeLabel</cstring> 809 <cstring>SMSTypeLabel</cstring>
806 </property> 810 </property>
807 <property stdset="1"> 811 <property stdset="1">
808 <name>text</name> 812 <name>text</name>
809 <string>Type:</string> 813 <string>Type:</string>
810 </property> 814 </property>
811 </widget> 815 </widget>
812 <widget> 816 <widget>
813 <class>QComboBox</class> 817 <class>QComboBox</class>
814 <item> 818 <item>
815 <property> 819 <property>
816 <name>text</name> 820 <name>text</name>
817 <string>Incoming</string> 821 <string>Incoming</string>
818 </property> 822 </property>
819 </item> 823 </item>
820 <item> 824 <item>
821 <property> 825 <property>
822 <name>text</name> 826 <name>text</name>
823 <string>Outgoing</string> 827 <string>Outgoing</string>
824 </property> 828 </property>
825 </item> 829 </item>
826 <property stdset="1"> 830 <property stdset="1">
827 <name>name</name> 831 <name>name</name>
828 <cstring>SMSViewType</cstring> 832 <cstring>SMSViewType</cstring>
829 </property> 833 </property>
830 </widget> 834 </widget>
831 </hbox> 835 </hbox>
832 </widget> 836 </widget>
833 <widget row="1" column="0" > 837 <widget row="1" column="0" rowspan="1" colspan="3" >
834 <class>QListView</class> 838 <class>QListView</class>
835 <column> 839 <column>
836 <property> 840 <property>
837 <name>text</name> 841 <name>text</name>
838 <string>Number</string> 842 <string>Number</string>
839 </property> 843 </property>
840 <property> 844 <property>
841 <name>clickable</name> 845 <name>clickable</name>
842 <bool>true</bool> 846 <bool>true</bool>
843 </property> 847 </property>
844 <property> 848 <property>
845 <name>resizeable</name> 849 <name>resizeable</name>
846 <bool>true</bool> 850 <bool>true</bool>
847 </property> 851 </property>
848 </column> 852 </column>
849 <column> 853 <column>
850 <property> 854 <property>
851 <name>text</name> 855 <name>text</name>
852 <string>Date</string> 856 <string>Date</string>
853 </property> 857 </property>
854 <property> 858 <property>
855 <name>clickable</name> 859 <name>clickable</name>
856 <bool>true</bool> 860 <bool>true</bool>
857 </property> 861 </property>
858 <property> 862 <property>
859 <name>resizeable</name> 863 <name>resizeable</name>
860 <bool>true</bool> 864 <bool>true</bool>
861 </property> 865 </property>
862 </column> 866 </column>
863 <property stdset="1"> 867 <property stdset="1">
864 <name>name</name> 868 <name>name</name>
865 <cstring>SMSList</cstring> 869 <cstring>SMSList</cstring>
866 </property> 870 </property>
867 <property stdset="1"> 871 <property stdset="1">
868 <name>enabled</name> 872 <name>enabled</name>
869 <bool>false</bool> 873 <bool>false</bool>
870 </property> 874 </property>
871 <property stdset="1"> 875 <property stdset="1">
872 <name>allColumnsShowFocus</name> 876 <name>allColumnsShowFocus</name>
873 <bool>true</bool> 877 <bool>true</bool>
874 </property> 878 </property>
875 </widget> 879 </widget>
880 <widget row="3" column="0" rowspan="1" colspan="3" >
881 <class>QMultiLineEdit</class>
882 <property stdset="1">
883 <name>name</name>
884 <cstring>SMSText</cstring>
885 </property>
886 <property stdset="1">
887 <name>enabled</name>
888 <bool>false</bool>
889 </property>
890 <property stdset="1">
891 <name>hMargin</name>
892 <number>1</number>
893 </property>
894 <property stdset="1">
895 <name>wordWrap</name>
896 <enum>WidgetWidth</enum>
897 </property>
898 <property stdset="1">
899 <name>readOnly</name>
900 <bool>true</bool>
901 </property>
902 </widget>
876 <widget row="2" column="0" > 903 <widget row="2" column="0" >
877 <class>QLayoutWidget</class> 904 <class>QPushButton</class>
905 <property stdset="1">
906 <name>name</name>
907 <cstring>SMSDeleteButton</cstring>
908 </property>
909 <property stdset="1">
910 <name>text</name>
911 <string>Delete</string>
912 </property>
913 </widget>
914 <widget row="2" column="2" >
915 <class>QPushButton</class>
878 <property stdset="1"> 916 <property stdset="1">
879 <name>name</name> 917 <name>name</name>
880 <cstring>Layout15</cstring> 918 <cstring>SMSSendButton</cstring>
919 </property>
920 <property stdset="1">
921 <name>text</name>
922 <string>Send</string>
881 </property> 923 </property>
924 </widget>
925 <spacer row="2" column="1" >
882 <property> 926 <property>
883 <name>layoutMargin</name> 927 <name>name</name>
928 <cstring>Spacer6_2</cstring>
929 </property>
930 <property stdset="1">
931 <name>orientation</name>
932 <enum>Horizontal</enum>
933 </property>
934 <property stdset="1">
935 <name>sizeType</name>
936 <enum>Expanding</enum>
937 </property>
938 <property>
939 <name>sizeHint</name>
940 <size>
941 <width>20</width>
942 <height>20</height>
943 </size>
944 </property>
945 </spacer>
946 </grid>
947 </widget>
948 <widget>
949 <class>QWidget</class>
950 <property stdset="1">
951 <name>name</name>
952 <cstring>tab</cstring>
953 </property>
954 <attribute>
955 <name>title</name>
956 <string>New</string>
957 </attribute>
958 <grid>
959 <property stdset="1">
960 <name>margin</name>
961 <number>2</number>
962 </property>
963 <property stdset="1">
964 <name>spacing</name>
965 <number>1</number>
966 </property>
967 <widget row="0" column="0" rowspan="1" colspan="3" >
968 <class>QLabel</class>
969 <property stdset="1">
970 <name>name</name>
971 <cstring>NewSMSMessageLabel</cstring>
972 </property>
973 <property stdset="1">
974 <name>text</name>
975 <string>Message:</string>
884 </property> 976 </property>
885 <hbox>
886 <property stdset="1">
887 <name>margin</name>
888 <number>0</number>
889 </property>
890 <property stdset="1">
891 <name>spacing</name>
892 <number>1</number>
893 </property>
894 <widget>
895 <class>QPushButton</class>
896 <property stdset="1">
897 <name>name</name>
898 <cstring>SMSDeleteButton</cstring>
899 </property>
900 <property stdset="1">
901 <name>text</name>
902 <string>Delete</string>
903 </property>
904 </widget>
905 <widget>
906 <class>QPushButton</class>
907 <property stdset="1">
908 <name>name</name>
909 <cstring>SMSSendButton</cstring>
910 </property>
911 <property stdset="1">
912 <name>text</name>
913 <string>Send</string>
914 </property>
915 </widget>
916 <widget>
917 <class>QPushButton</class>
918 <property stdset="1">
919 <name>name</name>
920 <cstring>SMSNewButton</cstring>
921 </property>
922 <property stdset="1">
923 <name>text</name>
924 <string>New</string>
925 </property>
926 </widget>
927 </hbox>
928 </widget> 977 </widget>
929 <widget row="3" column="0" > 978 <widget row="3" column="0" >
979 <class>QLabel</class>
980 <property stdset="1">
981 <name>name</name>
982 <cstring>NewSMSToLabel</cstring>
983 </property>
984 <property stdset="1">
985 <name>text</name>
986 <string>To:</string>
987 </property>
988 </widget>
989 <widget row="3" column="1" rowspan="1" colspan="4" >
990 <class>QComboBox</class>
991 <property stdset="1">
992 <name>name</name>
993 <cstring>NewSMSToBox</cstring>
994 </property>
995 <property stdset="1">
996 <name>editable</name>
997 <bool>true</bool>
998 </property>
999 <property stdset="1">
1000 <name>duplicatesEnabled</name>
1001 <bool>false</bool>
1002 </property>
1003 </widget>
1004 <widget row="1" column="0" rowspan="1" colspan="5" >
930 <class>QMultiLineEdit</class> 1005 <class>QMultiLineEdit</class>
931 <property stdset="1"> 1006 <property stdset="1">
932 <name>name</name> 1007 <name>name</name>
933 <cstring>SMSText</cstring> 1008 <cstring>NewSMSText</cstring>
934 </property> 1009 </property>
935 <property stdset="1"> 1010 <property stdset="1">
936 <name>enabled</name> 1011 <name>enabled</name>
937 <bool>false</bool> 1012 <bool>true</bool>
938 </property> 1013 </property>
939 <property stdset="1"> 1014 <property stdset="1">
940 <name>hMargin</name> 1015 <name>hMargin</name>
941 <number>1</number> 1016 <number>1</number>
942 </property> 1017 </property>
943 <property stdset="1"> 1018 <property stdset="1">
944 <name>wordWrap</name> 1019 <name>wordWrap</name>
945 <enum>WidgetWidth</enum> 1020 <enum>WidgetWidth</enum>
946 </property> 1021 </property>
947 <property stdset="1"> 1022 <property stdset="1">
948 <name>readOnly</name> 1023 <name>readOnly</name>
949 <bool>true</bool> 1024 <bool>false</bool>
1025 </property>
1026 </widget>
1027 <widget row="4" column="4" >
1028 <class>QPushButton</class>
1029 <property stdset="1">
1030 <name>name</name>
1031 <cstring>NewSMSSendButton</cstring>
1032 </property>
1033 <property stdset="1">
1034 <name>text</name>
1035 <string>Send</string>
1036 </property>
1037 </widget>
1038 <widget row="0" column="3" rowspan="1" colspan="2" >
1039 <class>QLabel</class>
1040 <property stdset="1">
1041 <name>name</name>
1042 <cstring>NewSMSStatusLabel</cstring>
1043 </property>
1044 <property stdset="1">
1045 <name>text</name>
1046 <string></string>
1047 </property>
1048 </widget>
1049 <widget row="4" column="2" rowspan="1" colspan="2" >
1050 <class>QPushButton</class>
1051 <property stdset="1">
1052 <name>name</name>
1053 <cstring>NewSMSSaveButton</cstring>
1054 </property>
1055 <property stdset="1">
1056 <name>enabled</name>
1057 <bool>false</bool>
1058 </property>
1059 <property stdset="1">
1060 <name>text</name>
1061 <string>Save</string>
1062 </property>
1063 </widget>
1064 <widget row="4" column="0" rowspan="1" colspan="2" >
1065 <class>QPushButton</class>
1066 <property stdset="1">
1067 <name>name</name>
1068 <cstring>NewSMSClearButton</cstring>
1069 </property>
1070 <property stdset="1">
1071 <name>text</name>
1072 <string>Clear</string>
950 </property> 1073 </property>
951 </widget> 1074 </widget>
952 </grid> 1075 </grid>
953 </widget> 1076 </widget>
954 </widget> 1077 </widget>
955 </vbox> 1078 </grid>
956</widget> 1079</widget>
957</UI> 1080</UI>