summaryrefslogtreecommitdiff
authorhash <hash>2002-10-09 19:37:41 (UTC)
committer hash <hash>2002-10-09 19:37:41 (UTC)
commit0f5a65dda7268881906743487672543ba8d3519f (patch) (side-by-side diff)
tree47ee29dde931539505a9dfc990d344ce8309ea5f
parent3689213cd06e8655b3f338ad170ad4e0fa040b80 (diff)
downloadopie-0f5a65dda7268881906743487672543ba8d3519f.zip
opie-0f5a65dda7268881906743487672543ba8d3519f.tar.gz
opie-0f5a65dda7268881906743487672543ba8d3519f.tar.bz2
added a file transfer button
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/test/console.pro6
-rw-r--r--noncore/apps/opie-console/test/sender.ui18
-rw-r--r--noncore/apps/opie-console/test/senderui.cpp17
-rw-r--r--noncore/apps/opie-console/test/senderui.h4
4 files changed, 41 insertions, 4 deletions
diff --git a/noncore/apps/opie-console/test/console.pro b/noncore/apps/opie-console/test/console.pro
index 721b820..b10b651 100644
--- a/noncore/apps/opie-console/test/console.pro
+++ b/noncore/apps/opie-console/test/console.pro
@@ -4,6 +4,6 @@ CONFIG = qt debug
#DESTDIR = $(OPIEDIR)/bin
-HEADERS = ../io_layer.h ../io_serial.h \
- senderui.h ../profile.h
+HEADERS = ../io_layer.h ../io_serial.h ../sz_transfer.h ../file_layer.h\
+ senderui.h ../profile.h
SOURCES = ../io_layer.cpp ../io_serial.cpp \
- ../profile.cpp \
+ ../profile.cpp ../sz_transfer.cpp ../file_layer.cpp\
main.cpp senderui.cpp
diff --git a/noncore/apps/opie-console/test/sender.ui b/noncore/apps/opie-console/test/sender.ui
index 092f6e3..b946b81 100644
--- a/noncore/apps/opie-console/test/sender.ui
+++ b/noncore/apps/opie-console/test/sender.ui
@@ -48,2 +48,13 @@
</widget>
+ <widget>
+ <class>QPushButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>PushButton2</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Send &amp;File</string>
+ </property>
+ </widget>
</vbox>
@@ -58,2 +69,9 @@
<slot access="public">slotSend()</slot>
+ <connection>
+ <sender>PushButton2</sender>
+ <signal>clicked()</signal>
+ <receiver>Form1</receiver>
+ <slot>slotSendFile()</slot>
+ </connection>
+ <slot access="public">slotSendFile()</slot>
</connections>
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
@@ -7,2 +7,3 @@
#include "../io_serial.h"
+#include "../sz_transfer.h"
@@ -16,3 +17,3 @@ SenderUI::SenderUI()
Profile prof;
- QString str = "/dev/ttyS0";
+ QString str = "/dev/ttyS1";
prof.writeEntry("Device",str );
@@ -36,2 +37,11 @@ SenderUI::~SenderUI() {
}
+void SenderUI::slotSendFile() {
+
+ sz = new SzTransfer(SzTransfer::SZ, ser);
+ sz->sendFile("/home/jake/test");
+
+ connect (sz, SIGNAL(sent()),
+ this, SLOT(fileTransComplete()));
+}
+
void SenderUI::slotSend() {
@@ -47 +57,6 @@ void SenderUI::got(const QByteArray& ar) {
}
+
+void SenderUI::fileTransComplete() {
+
+ qWarning("file transfer compete");
+}
diff --git a/noncore/apps/opie-console/test/senderui.h b/noncore/apps/opie-console/test/senderui.h
index bc69f5d..f6230cc 100644
--- a/noncore/apps/opie-console/test/senderui.h
+++ b/noncore/apps/opie-console/test/senderui.h
@@ -8,2 +8,3 @@
class IOSerial;
+class SzTransfer;
class SenderUI : public Sender {
@@ -15,6 +16,9 @@ public:
public slots:
+ void slotSendFile();
void slotSend();
void got(const QByteArray& );
+ void fileTransComplete();
private:
IOSerial* ser;
+ SzTransfer* sz;
};