summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/test
authorzecke <zecke>2002-10-13 15:31:12 (UTC)
committer zecke <zecke>2002-10-13 15:31:12 (UTC)
commit6a9726437a59cf3b18bf57d6e20fb2dfaaa2fc34 (patch) (side-by-side diff)
tree14fa6710ef6d80fa213250a97f13253eb88a80cd /noncore/apps/opie-console/test
parent5db679753dac04095a2fa4b03297785ed4ba4030 (diff)
downloadopie-6a9726437a59cf3b18bf57d6e20fb2dfaaa2fc34.zip
opie-6a9726437a59cf3b18bf57d6e20fb2dfaaa2fc34.tar.gz
opie-6a9726437a59cf3b18bf57d6e20fb2dfaaa2fc34.tar.bz2
Move some stuff in filetransfer around
make pid == 0 after a finished process. Introduce the FileReceive class it does not parse progress though
Diffstat (limited to 'noncore/apps/opie-console/test') (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.ui22
-rw-r--r--noncore/apps/opie-console/test/senderui.cpp7
-rw-r--r--noncore/apps/opie-console/test/senderui.h1
4 files changed, 32 insertions, 4 deletions
diff --git a/noncore/apps/opie-console/test/console.pro b/noncore/apps/opie-console/test/console.pro
index af0e9f7..6de2cd0 100644
--- a/noncore/apps/opie-console/test/console.pro
+++ b/noncore/apps/opie-console/test/console.pro
@@ -1,15 +1,17 @@
TEMPLATE = app
#CONFIG = qt warn_on release
CONFIG = qt debug
#DESTDIR = $(OPIEDIR)/bin
HEADERS = ../io_layer.h ../io_serial.h ../sz_transfer.h ../file_layer.h\
- senderui.h ../profile.h ../filetransfer.h ../procctl.h
+ senderui.h ../profile.h ../filetransfer.h ../procctl.h \
+ ../filereceive.h ../receive_layer.h
SOURCES = ../io_layer.cpp ../io_serial.cpp \
../profile.cpp ../sz_transfer.cpp ../file_layer.cpp\
- main.cpp senderui.cpp ../filetransfer.cpp ../procctl.cpp
+ main.cpp senderui.cpp ../filetransfer.cpp ../procctl.cpp \
+ ../filereceive.cpp ../receive_layer.cpp
INTERFACES = sender.ui
INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += $(OPIEDIR)/include
LIBS += -lqpe -lopie
TARGET = test
diff --git a/noncore/apps/opie-console/test/sender.ui b/noncore/apps/opie-console/test/sender.ui
index b946b81..74b9790 100644
--- a/noncore/apps/opie-console/test/sender.ui
+++ b/noncore/apps/opie-console/test/sender.ui
@@ -2,25 +2,25 @@
<class>Sender</class>
<widget>
<class>QWidget</class>
<property stdset="1">
<name>name</name>
<cstring>Form1</cstring>
</property>
<property stdset="1">
<name>geometry</name>
<rect>
<x>0</x>
<y>0</y>
- <width>596</width>
+ <width>592</width>
<height>480</height>
</rect>
</property>
<property stdset="1">
<name>caption</name>
<string>Form1</string>
</property>
<vbox>
<property stdset="1">
<name>margin</name>
<number>11</number>
</property>
@@ -30,24 +30,35 @@
</property>
<widget>
<class>QMultiLineEdit</class>
<property stdset="1">
<name>name</name>
<cstring>MultiLineEdit1</cstring>
</property>
</widget>
<widget>
<class>QPushButton</class>
<property stdset="1">
<name>name</name>
+ <cstring>PushButton3</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Receive File</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QPushButton</class>
+ <property stdset="1">
+ <name>name</name>
<cstring>PushButton1</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>&amp;Send</string>
</property>
</widget>
<widget>
<class>QPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>PushButton2</cstring>
@@ -57,22 +68,29 @@
<string>Send &amp;File</string>
</property>
</widget>
</vbox>
</widget>
<connections>
<connection>
<sender>PushButton1</sender>
<signal>clicked()</signal>
<receiver>Form1</receiver>
<slot>slotSend()</slot>
</connection>
- <slot access="public">slotSend()</slot>
<connection>
<sender>PushButton2</sender>
<signal>clicked()</signal>
<receiver>Form1</receiver>
<slot>slotSendFile()</slot>
</connection>
+ <connection>
+ <sender>PushButton3</sender>
+ <signal>clicked()</signal>
+ <receiver>Form1</receiver>
+ <slot>slotRev()</slot>
+ </connection>
+ <slot access="public">slotRev()</slot>
+ <slot access="public">slotSend()</slot>
<slot access="public">slotSendFile()</slot>
</connections>
</UI>
diff --git a/noncore/apps/opie-console/test/senderui.cpp b/noncore/apps/opie-console/test/senderui.cpp
index 8bc1676..2ce3f6d 100644
--- a/noncore/apps/opie-console/test/senderui.cpp
+++ b/noncore/apps/opie-console/test/senderui.cpp
@@ -1,23 +1,24 @@
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
#include <sys/termios.h>
#include <qmultilineedit.h>
#include <qsocketnotifier.h>
#include "../profile.h"
#include "../io_serial.h"
#include "../filetransfer.h"
+#include "../filereceive.h"
#include <opie/oprocess.h>
#include "senderui.h"
SenderUI::SenderUI()
: Sender() {
/* we do that manually */
Profile prof;
QString str = "/dev/ttyS0";
prof.writeEntry("Device",str );
@@ -57,12 +58,18 @@ void SenderUI::got(const QByteArray& ar) {
printf("%c", ar[i] );
}
//printf("\n");
}
void SenderUI::fileTransComplete() {
qWarning("file transfer complete");
}
void SenderUI::send() {
}
+void SenderUI::slotRev(){
+qWarning("Going to receive!");
+FileReceive *rev = new FileReceive( FileReceive::SZ, ser );
+rev->receive();
+
+} \ No newline at end of file
diff --git a/noncore/apps/opie-console/test/senderui.h b/noncore/apps/opie-console/test/senderui.h
index 5e613cd..c130dcf 100644
--- a/noncore/apps/opie-console/test/senderui.h
+++ b/noncore/apps/opie-console/test/senderui.h
@@ -10,24 +10,25 @@ class FileTransfer;
class QSocketNotifier;
class OProcess;
class SenderUI : public Sender {
Q_OBJECT
public:
SenderUI();
~SenderUI();
public slots:
void send();
void slotSendFile();
void slotSend();
+ void slotRev();
void got(const QByteArray& );
void fileTransComplete();
private:
IOSerial* ser;
FileTransfer* sz;
int m_fd;
QSocketNotifier* m_sock;
OProcess* m_proc;
};
#endif