Diffstat (limited to 'noncore/apps/opie-console/default.cpp') (more/less context) (ignore 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 5c1c05a..64c9542 100644 --- a/noncore/apps/opie-console/default.cpp +++ b/noncore/apps/opie-console/default.cpp | |||
@@ -1,24 +1,24 @@ | |||
1 | #include "io_serial.h" | 1 | #include "io_serial.h" |
2 | #include "io_irda.h" | 2 | #include "io_irda.h" |
3 | #include "io_bt.h" | 3 | #include "io_bt.h" |
4 | #include "io_modem.h" | 4 | #include "io_modem.h" |
5 | #include "filetransfer.h" | 5 | #include "filetransfer.h" |
6 | #include "filereceive.h" | 6 | #include "filereceive.h" |
7 | #include "serialconfigwidget.h" | 7 | #include "serialconfigwidget.h" |
8 | #include "irdaconfigwidget.h" | 8 | #include "irdaconfigwidget.h" |
9 | #include "btconfigwidget.h" | 9 | #include "btconfigwidget.h" |
10 | #include "modemconfigwidget.h" | 10 | #include "modemconfigwidget.h" |
11 | #include "terminalwidget.h" | 11 | #include "terminalwidget.h" |
12 | #include "vt102emulation.h" | 12 | #include "MyPty.h" |
13 | 13 | ||
14 | #include "default.h" | 14 | #include "default.h" |
15 | 15 | ||
16 | extern "C" { | 16 | extern "C" { |
17 | // FILE Transfer Stuff | 17 | // FILE Transfer Stuff |
18 | FileTransferLayer* newSZTransfer(IOLayer* lay) { | 18 | FileTransferLayer* newSZTransfer(IOLayer* lay) { |
19 | return new FileTransfer( FileTransfer::SZ, lay ); | 19 | return new FileTransfer( FileTransfer::SZ, lay ); |
20 | } | 20 | } |
21 | FileTransferLayer* newSYTransfer(IOLayer* lay) { | 21 | FileTransferLayer* newSYTransfer(IOLayer* lay) { |
22 | return new FileTransfer( FileTransfer::SY, lay ); | 22 | return new FileTransfer( FileTransfer::SY, lay ); |
23 | } | 23 | } |
24 | FileTransferLayer* newSXTransfer(IOLayer* lay) { | 24 | FileTransferLayer* newSXTransfer(IOLayer* lay) { |
@@ -40,66 +40,74 @@ extern "C" { | |||
40 | IOLayer* newSerialLayer( const Profile& prof) { | 40 | IOLayer* newSerialLayer( const Profile& prof) { |
41 | return new IOSerial( prof ); | 41 | return new IOSerial( prof ); |
42 | } | 42 | } |
43 | IOLayer* newBTLayer( const Profile& prof ) { | 43 | IOLayer* newBTLayer( const Profile& prof ) { |
44 | return new IOBt( prof ); | 44 | return new IOBt( prof ); |
45 | } | 45 | } |
46 | IOLayer* newIrDaLayer( const Profile& prof ) { | 46 | IOLayer* newIrDaLayer( const Profile& prof ) { |
47 | return new IOIrda( prof ); | 47 | return new IOIrda( prof ); |
48 | } | 48 | } |
49 | IOLayer* newModemLayer( const Profile& prof ) { | 49 | IOLayer* newModemLayer( const Profile& prof ) { |
50 | return new IOModem( prof ); | 50 | return new IOModem( prof ); |
51 | } | 51 | } |
52 | IOLayer* newConsole( const Profile& prof ) { | ||
53 | return new MyPty(prof ); | ||
54 | } | ||
52 | 55 | ||
53 | // Connection Widgets | 56 | // Connection Widgets |
54 | ProfileDialogWidget* newSerialWidget( const QString& str, QWidget* wid ) { | 57 | ProfileDialogWidget* newSerialWidget( const QString& str, QWidget* wid ) { |
55 | return new SerialConfigWidget( str, wid ); | 58 | return new SerialConfigWidget( str, wid ); |
56 | } | 59 | } |
57 | ProfileDialogWidget* newIrDaWidget( const QString& str, QWidget* wid ) { | 60 | ProfileDialogWidget* newIrDaWidget( const QString& str, QWidget* wid ) { |
58 | return new IrdaConfigWidget( str, wid ); | 61 | return new IrdaConfigWidget( str, wid ); |
59 | } | 62 | } |
60 | ProfileDialogWidget* newModemWidget( const QString& str, QWidget* wid ) { | 63 | ProfileDialogWidget* newModemWidget( const QString& str, QWidget* wid ) { |
61 | return new ModemConfigWidget(str, wid ); | 64 | return new ModemConfigWidget(str, wid ); |
62 | } | 65 | } |
63 | ProfileDialogWidget* newBTWidget( const QString& str, QWidget* wid ) { | 66 | ProfileDialogWidget* newBTWidget( const QString& str, QWidget* wid ) { |
64 | return new BTConfigWidget(str, wid ); | 67 | return new BTConfigWidget(str, wid ); |
65 | } | 68 | } |
69 | ProfileDialogWidget* newConsoleWid( const QString& str, QWidget* wid ) { | ||
70 | return 0l; | ||
71 | } | ||
66 | 72 | ||
67 | 73 | ||
68 | // Terminal Widget(s) | 74 | // Terminal Widget(s) |
69 | /* ProfileDialogWidget* newTerminalWidget(const QString& na, QWidget* wid) { | 75 | ProfileDialogWidget* newTerminalWidget(const QString& na, QWidget* wid) { |
70 | return new TerminalWidget(na, wid,0 ); | 76 | return new TerminalWidget(na, wid,0 ); |
71 | } | 77 | } |
72 | */ | 78 | |
73 | /* // VT Emulations | 79 | /* // VT Emulations |
74 | EmulationLayer* newVT102( WidgetLayer* wid ) { | 80 | EmulationLayer* newVT102( WidgetLayer* wid ) { |
75 | return new Vt102Emulation( wid ); | 81 | return new Vt102Emulation( wid ); |
76 | } | 82 | } |
77 | */ | 83 | */ |
78 | }; | 84 | }; |
79 | 85 | ||
80 | Default::Default( MetaFactory* fact ) { | 86 | Default::Default( MetaFactory* fact ) { |
81 | fact->addFileTransferLayer( "SZ", QObject::tr("Z-Modem"), newSZTransfer ); | 87 | fact->addFileTransferLayer( "SZ", QObject::tr("Z-Modem"), newSZTransfer ); |
82 | fact->addFileTransferLayer( "SY", QObject::tr("Y-Modem"), newSYTransfer ); | 88 | fact->addFileTransferLayer( "SY", QObject::tr("Y-Modem"), newSYTransfer ); |
83 | fact->addFileTransferLayer( "SX", QObject::tr("X-Modem"), newSXTransfer ); | 89 | fact->addFileTransferLayer( "SX", QObject::tr("X-Modem"), newSXTransfer ); |
84 | 90 | ||
85 | fact->addReceiveLayer( "SZ", QObject::tr("Z-Modem"), newSZReceive ); | 91 | fact->addReceiveLayer( "SZ", QObject::tr("Z-Modem"), newSZReceive ); |
86 | fact->addReceiveLayer( "SY", QObject::tr("Y-Modem"), newSYReceive ); | 92 | fact->addReceiveLayer( "SY", QObject::tr("Y-Modem"), newSYReceive ); |
87 | fact->addReceiveLayer( "SX", QObject::tr("X-Modem"), newSXReceive ); | 93 | fact->addReceiveLayer( "SX", QObject::tr("X-Modem"), newSXReceive ); |
88 | 94 | ||
89 | fact->addIOLayerFactory( "serial", QObject::tr("Serial"), newSerialLayer ); | 95 | fact->addIOLayerFactory( "serial", QObject::tr("Serial"), newSerialLayer ); |
90 | fact->addIOLayerFactory( "irda", QObject::tr("Infrared"), newIrDaLayer ); | 96 | fact->addIOLayerFactory( "irda", QObject::tr("Infrared"), newIrDaLayer ); |
91 | fact->addIOLayerFactory( "bt", QObject::tr("Bluetooth"), newBTLayer ); | 97 | fact->addIOLayerFactory( "bt", QObject::tr("Bluetooth"), newBTLayer ); |
92 | fact->addIOLayerFactory( "modem", QObject::tr("Modem"), newModemLayer ); | 98 | fact->addIOLayerFactory( "modem", QObject::tr("Modem"), newModemLayer ); |
99 | fact->addIOLayerFactory( "console", QObject::tr("Console"), newConsole ); | ||
93 | 100 | ||
94 | fact->addConnectionWidgetFactory( "serial", QObject::tr("Serial"), newSerialWidget ); | 101 | fact->addConnectionWidgetFactory( "serial", QObject::tr("Serial"), newSerialWidget ); |
95 | fact->addConnectionWidgetFactory( "irda", QObject::tr("Infrared"), newIrDaWidget ); | 102 | fact->addConnectionWidgetFactory( "irda", QObject::tr("Infrared"), newIrDaWidget ); |
96 | fact->addConnectionWidgetFactory( "modem", QObject::tr("Modem"), newModemWidget ); | 103 | fact->addConnectionWidgetFactory( "modem", QObject::tr("Modem"), newModemWidget ); |
97 | fact->addConnectionWidgetFactory( "bt", QObject::tr("Bluetooth"), newBTWidget ); | 104 | fact->addConnectionWidgetFactory( "bt", QObject::tr("Bluetooth"), newBTWidget ); |
105 | fact->addConnectionWidgetFactory( "console", QObject::tr("Console"), newConsoleWid ); | ||
98 | 106 | ||
99 | // fact->addTerminalWidgetFactory( "default", QObject::tr("Default Terminal"), newTerminalWidget ); | 107 | fact->addTerminalWidgetFactory( "default", QObject::tr("Default Terminal"), newTerminalWidget ); |
100 | 108 | ||
101 | // fact->addEmulationLayer( "default", QObject::tr("Default Terminal"), newVT102 ); | 109 | // fact->addEmulationLayer( "default", QObject::tr("Default Terminal"), newVT102 ); |
102 | } | 110 | } |
103 | Default::~Default() { | 111 | Default::~Default() { |
104 | 112 | ||
105 | } | 113 | } |