-rw-r--r-- | noncore/apps/opie-console/file_layer.cpp | 7 | ||||
-rw-r--r-- | noncore/apps/opie-console/file_layer.h | 6 | ||||
-rw-r--r-- | noncore/apps/opie-console/io_layer.cpp | 8 | ||||
-rw-r--r-- | noncore/apps/opie-console/main.cpp | 9 | ||||
-rw-r--r-- | noncore/apps/opie-console/opie-console.pro | 4 |
5 files changed, 29 insertions, 5 deletions
diff --git a/noncore/apps/opie-console/file_layer.cpp b/noncore/apps/opie-console/file_layer.cpp index 3be5f10..3ff85af 100644 --- a/noncore/apps/opie-console/file_layer.cpp +++ b/noncore/apps/opie-console/file_layer.cpp | |||
@@ -1,8 +1,13 @@ | |||
1 | #include "file_layer.h" | 1 | #include "file_layer.h" |
2 | 2 | ||
3 | FileTransferLayer::FileTransferLayer(IOLayer *layer) { | 3 | FileTransferLayer::FileTransferLayer(IOLayer *layer) |
4 | : QObject(), m_layer( layer ) | ||
5 | { | ||
4 | } | 6 | } |
5 | 7 | ||
6 | FileTransferLayer::~FileTransferLayer() { | 8 | FileTransferLayer::~FileTransferLayer() { |
7 | } | 9 | } |
10 | IOLayer* FileTransferLayer::layer() { | ||
11 | return m_layer; | ||
12 | } | ||
8 | 13 | ||
diff --git a/noncore/apps/opie-console/file_layer.h b/noncore/apps/opie-console/file_layer.h index 75fd94b..035e125 100644 --- a/noncore/apps/opie-console/file_layer.h +++ b/noncore/apps/opie-console/file_layer.h | |||
@@ -1,50 +1,56 @@ | |||
1 | #ifndef OPIE_FILE_LAYER_H | 1 | #ifndef OPIE_FILE_LAYER_H |
2 | #define OPIE_FILE_LAYER_H | 2 | #define OPIE_FILE_LAYER_H |
3 | 3 | ||
4 | #include "io_layer.h" | 4 | #include "io_layer.h" |
5 | 5 | ||
6 | class QFile; | 6 | class QFile; |
7 | /** | 7 | /** |
8 | * this is the layer for sending files | 8 | * this is the layer for sending files |
9 | */ | 9 | */ |
10 | class FileTransferLayer : public QObject { | 10 | class FileTransferLayer : public QObject { |
11 | Q_OBJECT | 11 | Q_OBJECT |
12 | public: | 12 | public: |
13 | /** | 13 | /** |
14 | *the io layer to be used | 14 | *the io layer to be used |
15 | */ | 15 | */ |
16 | FileTransferLayer( IOLayer* ); | 16 | FileTransferLayer( IOLayer* ); |
17 | virtual ~FileTransferLayer(); | 17 | virtual ~FileTransferLayer(); |
18 | 18 | ||
19 | public slots: | 19 | public slots: |
20 | /** | 20 | /** |
21 | * send a file over the layer | 21 | * send a file over the layer |
22 | */ | 22 | */ |
23 | virtual void sendFile( const QString& file ) = 0; | 23 | virtual void sendFile( const QString& file ) = 0; |
24 | 24 | ||
25 | /** | 25 | /** |
26 | * convience method | 26 | * convience method |
27 | */ | 27 | */ |
28 | virtual void sendFile( const QFile& ) = 0; | 28 | virtual void sendFile( const QFile& ) = 0; |
29 | 29 | ||
30 | signals: | 30 | signals: |
31 | /** | 31 | /** |
32 | * sent the file | 32 | * sent the file |
33 | */ | 33 | */ |
34 | void sent(); | 34 | void sent(); |
35 | 35 | ||
36 | /** | 36 | /** |
37 | * an error occured | 37 | * an error occured |
38 | */ | 38 | */ |
39 | 39 | ||
40 | void error( int, const QString& ); | 40 | void error( int, const QString& ); |
41 | 41 | ||
42 | /* | 42 | /* |
43 | * 100 == done | 43 | * 100 == done |
44 | * | 44 | * |
45 | */ | 45 | */ |
46 | void progress( const QString& file, int progress ); | 46 | void progress( const QString& file, int progress ); |
47 | 47 | ||
48 | protected: | ||
49 | IOLayer* layer(); | ||
50 | |||
51 | private: | ||
52 | IOLayer* m_layer; | ||
53 | |||
48 | }; | 54 | }; |
49 | 55 | ||
50 | #endif | 56 | #endif |
diff --git a/noncore/apps/opie-console/io_layer.cpp b/noncore/apps/opie-console/io_layer.cpp index 8da5886..ca1deb8 100644 --- a/noncore/apps/opie-console/io_layer.cpp +++ b/noncore/apps/opie-console/io_layer.cpp | |||
@@ -1,10 +1,14 @@ | |||
1 | #include "io_layer.h" | 1 | #include "io_layer.h" |
2 | 2 | ||
3 | IOLayer::IOLayer() { | 3 | IOLayer::IOLayer() |
4 | : QObject() | ||
5 | { | ||
4 | } | 6 | } |
5 | 7 | ||
6 | IOLayer::IOLayer(const Config &config) { | 8 | IOLayer::IOLayer(const Config &) |
9 | : QObject() | ||
10 | { | ||
7 | } | 11 | } |
8 | 12 | ||
9 | IOLayer::~IOLayer() { | 13 | IOLayer::~IOLayer() { |
10 | } | 14 | } |
diff --git a/noncore/apps/opie-console/main.cpp b/noncore/apps/opie-console/main.cpp index 7594174..cf8bf05 100644 --- a/noncore/apps/opie-console/main.cpp +++ b/noncore/apps/opie-console/main.cpp | |||
@@ -1,5 +1,14 @@ | |||
1 | #include <qpe/qpeapplication.h> | 1 | #include <qpe/qpeapplication.h> |
2 | 2 | ||
3 | #include <mainwindow.h> | ||
4 | |||
3 | int main(int argc, char **argv) { | 5 | int main(int argc, char **argv) { |
6 | QPEApplication app( argc, argv ); | ||
7 | MainWindow* mw = new MainWindow(); | ||
8 | app.setMainWidget( mw ); | ||
9 | |||
10 | app.exec(); | ||
11 | |||
12 | delete mw; | ||
4 | return 0; | 13 | return 0; |
5 | } | 14 | } |
diff --git a/noncore/apps/opie-console/opie-console.pro b/noncore/apps/opie-console/opie-console.pro index 4ce11a9..5b6fdc3 100644 --- a/noncore/apps/opie-console/opie-console.pro +++ b/noncore/apps/opie-console/opie-console.pro | |||
@@ -1,11 +1,11 @@ | |||
1 | TEMPLATE = app | 1 | TEMPLATE = app |
2 | CONFIG = qt warn_on release | 2 | CONFIG = qt warn_on release |
3 | DESTDIR = $(OPIEDIR)/bin | 3 | DESTDIR = $(OPIEDIR)/bin |
4 | HEADERS = io_layer.h io_serial.h file_layer.h | 4 | HEADERS = io_layer.h io_serial.h file_layer.h |
5 | SOURCES = io_layer.cpp io_serial.cpp file_layer.cpp | 5 | SOURCES = io_layer.cpp io_serial.cpp file_layer.cpp main.cpp |
6 | INTERFACES = | 6 | INTERFACES = |
7 | INCLUDEPATH += $(OPIEDIR)/include | 7 | INCLUDEPATH += $(OPIEDIR)/include |
8 | DEPENDPATH += $(OPIEDIR)/include | 8 | DEPENDPATH += $(OPIEDIR)/include |
9 | LIBS += -lqpe -lopie | 9 | LIBS += -lqpe -lopie |
10 | TARGET = sysinfo | 10 | TARGET = opie-console |
11 | 11 | ||