Diffstat (limited to 'noncore/apps/opie-console/default.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/default.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/noncore/apps/opie-console/default.cpp b/noncore/apps/opie-console/default.cpp index b092273..4853785 100644 --- a/noncore/apps/opie-console/default.cpp +++ b/noncore/apps/opie-console/default.cpp | |||
@@ -1,76 +1,84 @@ | |||
1 | #include "io_serial.h" | 1 | #include "io_serial.h" |
2 | #include "io_irda.h" | ||
3 | #include "io_bt.h" | ||
2 | #include "filetransfer.h" | 4 | #include "filetransfer.h" |
3 | #include "serialconfigwidget.h" | 5 | #include "serialconfigwidget.h" |
4 | #include "irdaconfigwidget.h" | 6 | #include "irdaconfigwidget.h" |
5 | #include "btconfigwidget.h" | 7 | #include "btconfigwidget.h" |
8 | #include "modemconfigwidget.h" | ||
6 | #include "terminalwidget.h" | 9 | #include "terminalwidget.h" |
7 | #include "vt102emulation.h" | 10 | #include "vt102emulation.h" |
8 | 11 | ||
9 | #include "default.h" | 12 | #include "default.h" |
10 | 13 | ||
11 | extern "C" { | 14 | extern "C" { |
12 | // FILE Transfer Stuff | 15 | // FILE Transfer Stuff |
13 | FileTransferLayer* newSZTransfer(IOLayer* lay) { | 16 | FileTransferLayer* newSZTransfer(IOLayer* lay) { |
14 | return new FileTransfer( FileTransfer::SZ, lay ); | 17 | return new FileTransfer( FileTransfer::SZ, lay ); |
15 | } | 18 | } |
16 | FileTransferLayer* newSYTransfer(IOLayer* lay) { | 19 | FileTransferLayer* newSYTransfer(IOLayer* lay) { |
17 | return new FileTransfer( FileTransfer::SY, lay ); | 20 | return new FileTransfer( FileTransfer::SY, lay ); |
18 | } | 21 | } |
19 | FileTransferLayer* newSXTransfer(IOLayer* lay) { | 22 | FileTransferLayer* newSXTransfer(IOLayer* lay) { |
20 | return new FileTransfer(FileTransfer ::SX, lay ); | 23 | return new FileTransfer(FileTransfer ::SX, lay ); |
21 | } | 24 | } |
22 | 25 | ||
23 | // Layer stuff | 26 | // Layer stuff |
24 | IOLayer* newSerialLayer( const Profile& prof) { | 27 | IOLayer* newSerialLayer( const Profile& prof) { |
25 | return new IOSerial( prof ); | 28 | return new IOSerial( prof ); |
26 | } | 29 | } |
27 | IOLayer* newBTLayer( const Profile& ) { | 30 | IOLayer* newBTLayer( const Profile& prof ) { |
28 | return 0l; | 31 | return new IOBt( prof ); |
29 | } | 32 | } |
30 | IOLayer* newIrDaLayer( const Profile& ) { | 33 | IOLayer* newIrDaLayer( const Profile& prof ) { |
31 | return 0l; | 34 | return new IOIrda( prof ); |
32 | } | 35 | } |
33 | 36 | ||
34 | // Connection Widgets | 37 | // Connection Widgets |
35 | ProfileDialogWidget* newSerialWidget( const QString& str, QWidget* wid ) { | 38 | ProfileDialogWidget* newSerialWidget( const QString& str, QWidget* wid ) { |
36 | return new SerialConfigWidget( str, wid ); | 39 | return new SerialConfigWidget( str, wid ); |
37 | } | 40 | } |
38 | ProfileDialogWidget* newIrDaWidget( const QString& str, QWidget* wid ) { | 41 | ProfileDialogWidget* newIrDaWidget( const QString& str, QWidget* wid ) { |
39 | return new IrdaConfigWidget( str, wid ); | 42 | return new IrdaConfigWidget( str, wid ); |
40 | } | 43 | } |
44 | ProfileDialogWidget* newModemWidget( const QString& str, QWidget* wid ) { | ||
45 | return new ModemConfigWidget(str, wid ); | ||
46 | } | ||
41 | ProfileDialogWidget* newBTWidget( const QString& str, QWidget* wid ) { | 47 | ProfileDialogWidget* newBTWidget( const QString& str, QWidget* wid ) { |
42 | return new BTConfigWidget(str, wid ); | 48 | return new BTConfigWidget(str, wid ); |
43 | } | 49 | } |
44 | 50 | ||
51 | |||
45 | // Terminal Widget(s) | 52 | // Terminal Widget(s) |
46 | ProfileDialogWidget* newTerminalWidget(const QString& na, QWidget* wid) { | 53 | ProfileDialogWidget* newTerminalWidget(const QString& na, QWidget* wid) { |
47 | return new TerminalWidget(na, wid,0 ); | 54 | return new TerminalWidget(na, wid,0 ); |
48 | } | 55 | } |
49 | 56 | ||
50 | // VT Emulations | 57 | // VT Emulations |
51 | EmulationLayer* newVT102( WidgetLayer* wid ) { | 58 | EmulationLayer* newVT102( WidgetLayer* wid ) { |
52 | return new Vt102Emulation( wid ); | 59 | return new Vt102Emulation( wid ); |
53 | } | 60 | } |
54 | 61 | ||
55 | }; | 62 | }; |
56 | 63 | ||
57 | Default::Default( MetaFactory* fact ) { | 64 | Default::Default( MetaFactory* fact ) { |
58 | fact->addFileTransferLayer( "SZ", QObject::tr("Z-Modem"), newSZTransfer ); | 65 | fact->addFileTransferLayer( "SZ", QObject::tr("Z-Modem"), newSZTransfer ); |
59 | fact->addFileTransferLayer( "SY", QObject::tr("Y-Modem"), newSYTransfer ); | 66 | fact->addFileTransferLayer( "SY", QObject::tr("Y-Modem"), newSYTransfer ); |
60 | fact->addFileTransferLayer( "SX", QObject::tr("X-Modem"), newSXTransfer ); | 67 | fact->addFileTransferLayer( "SX", QObject::tr("X-Modem"), newSXTransfer ); |
61 | 68 | ||
62 | fact->addIOLayerFactory( "serial", QObject::tr("Serial"), newSerialLayer ); | 69 | fact->addIOLayerFactory( "serial", QObject::tr("Serial"), newSerialLayer ); |
63 | fact->addIOLayerFactory( "irda", QObject::tr("Infrared"), newIrDaLayer ); | 70 | fact->addIOLayerFactory( "irda", QObject::tr("Infrared"), newIrDaLayer ); |
64 | fact->addIOLayerFactory( "bt", QObject::tr("Bluetooth"), newBTLayer ); | 71 | fact->addIOLayerFactory( "bt", QObject::tr("Bluetooth"), newBTLayer ); |
65 | 72 | ||
66 | fact->addConnectionWidgetFactory( "serial", QObject::tr("Serial"), newSerialWidget ); | 73 | fact->addConnectionWidgetFactory( "serial", QObject::tr("Serial"), newSerialWidget ); |
67 | fact->addConnectionWidgetFactory( "irda", QObject::tr("Infrared"), newIrDaWidget ); | 74 | fact->addConnectionWidgetFactory( "irda", QObject::tr("Infrared"), newIrDaWidget ); |
75 | fact->addConnectionWidgetFactory( "modem", QObject::tr("Modem"), newModemWidget ); | ||
68 | fact->addConnectionWidgetFactory( "bt", QObject::tr("Bluetooth"), newBTWidget ); | 76 | fact->addConnectionWidgetFactory( "bt", QObject::tr("Bluetooth"), newBTWidget ); |
69 | 77 | ||
70 | fact->addTerminalWidgetFactory( "default", QObject::tr("Default Terminal"), newTerminalWidget ); | 78 | fact->addTerminalWidgetFactory( "default", QObject::tr("Default Terminal"), newTerminalWidget ); |
71 | 79 | ||
72 | fact->addEmulationLayer( "default", QObject::tr("Default Terminal"), newVT102 ); | 80 | fact->addEmulationLayer( "default", QObject::tr("Default Terminal"), newVT102 ); |
73 | } | 81 | } |
74 | Default::~Default() { | 82 | Default::~Default() { |
75 | 83 | ||
76 | } | 84 | } |