author | hash <hash> | 2002-10-09 19:37:41 (UTC) |
---|---|---|
committer | hash <hash> | 2002-10-09 19:37:41 (UTC) |
commit | 0f5a65dda7268881906743487672543ba8d3519f (patch) (unidiff) | |
tree | 47ee29dde931539505a9dfc990d344ce8309ea5f /noncore/apps/opie-console/test/senderui.cpp | |
parent | 3689213cd06e8655b3f338ad170ad4e0fa040b80 (diff) | |
download | opie-0f5a65dda7268881906743487672543ba8d3519f.zip opie-0f5a65dda7268881906743487672543ba8d3519f.tar.gz opie-0f5a65dda7268881906743487672543ba8d3519f.tar.bz2 |
added a file transfer button
Diffstat (limited to 'noncore/apps/opie-console/test/senderui.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/test/senderui.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/noncore/apps/opie-console/test/senderui.cpp b/noncore/apps/opie-console/test/senderui.cpp index fc93c04..24d3eb2 100644 --- a/noncore/apps/opie-console/test/senderui.cpp +++ b/noncore/apps/opie-console/test/senderui.cpp | |||
@@ -4,8 +4,9 @@ | |||
4 | #include <qmultilineedit.h> | 4 | #include <qmultilineedit.h> |
5 | 5 | ||
6 | #include "../profile.h" | 6 | #include "../profile.h" |
7 | #include "../io_serial.h" | 7 | #include "../io_serial.h" |
8 | #include "../sz_transfer.h" | ||
8 | 9 | ||
9 | 10 | ||
10 | #include "senderui.h" | 11 | #include "senderui.h" |
11 | 12 | ||
@@ -13,9 +14,9 @@ SenderUI::SenderUI() | |||
13 | : Sender() { | 14 | : Sender() { |
14 | 15 | ||
15 | /* we do that manually */ | 16 | /* we do that manually */ |
16 | Profile prof; | 17 | Profile prof; |
17 | QString str = "/dev/ttyS0"; | 18 | QString str = "/dev/ttyS1"; |
18 | prof.writeEntry("Device",str ); | 19 | prof.writeEntry("Device",str ); |
19 | prof.writeEntry("Baud", 115200 ); | 20 | prof.writeEntry("Baud", 115200 ); |
20 | 21 | ||
21 | qWarning("prof " + prof.readEntry("Device") + " " + str); | 22 | qWarning("prof " + prof.readEntry("Device") + " " + str); |
@@ -33,8 +34,17 @@ SenderUI::SenderUI() | |||
33 | } | 34 | } |
34 | SenderUI::~SenderUI() { | 35 | SenderUI::~SenderUI() { |
35 | 36 | ||
36 | } | 37 | } |
38 | void SenderUI::slotSendFile() { | ||
39 | |||
40 | sz = new SzTransfer(SzTransfer::SZ, ser); | ||
41 | sz->sendFile("/home/jake/test"); | ||
42 | |||
43 | connect (sz, SIGNAL(sent()), | ||
44 | this, SLOT(fileTransComplete())); | ||
45 | } | ||
46 | |||
37 | void SenderUI::slotSend() { | 47 | void SenderUI::slotSend() { |
38 | QCString str = MultiLineEdit1->text().utf8(); | 48 | QCString str = MultiLineEdit1->text().utf8(); |
39 | qWarning("sending: %s", str.data() ); | 49 | qWarning("sending: %s", str.data() ); |
40 | ser->send( str ); | 50 | ser->send( str ); |
@@ -44,4 +54,9 @@ void SenderUI::got(const QByteArray& ar) { | |||
44 | printf("%c", ar[i] ); | 54 | printf("%c", ar[i] ); |
45 | } | 55 | } |
46 | //printf("\n"); | 56 | //printf("\n"); |
47 | } | 57 | } |
58 | |||
59 | void SenderUI::fileTransComplete() { | ||
60 | |||
61 | qWarning("file transfer compete"); | ||
62 | } | ||