Diffstat (limited to 'noncore/apps/opie-console/default.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/default.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/noncore/apps/opie-console/default.cpp b/noncore/apps/opie-console/default.cpp index 5d82c6a..b060139 100644 --- a/noncore/apps/opie-console/default.cpp +++ b/noncore/apps/opie-console/default.cpp | |||
@@ -1,121 +1,122 @@ | |||
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 "function_keyboard.h" | 12 | #include "function_keyboard.h" |
13 | #include "consoleconfigwidget.h" | ||
13 | #include "MyPty.h" | 14 | #include "MyPty.h" |
14 | 15 | ||
15 | #include "default.h" | 16 | #include "default.h" |
16 | 17 | ||
17 | extern "C" { | 18 | extern "C" { |
18 | // FILE Transfer Stuff | 19 | // FILE Transfer Stuff |
19 | FileTransferLayer* newSZTransfer(IOLayer* lay) { | 20 | FileTransferLayer* newSZTransfer(IOLayer* lay) { |
20 | return new FileTransfer( FileTransfer::SZ, lay ); | 21 | return new FileTransfer( FileTransfer::SZ, lay ); |
21 | } | 22 | } |
22 | FileTransferLayer* newSYTransfer(IOLayer* lay) { | 23 | FileTransferLayer* newSYTransfer(IOLayer* lay) { |
23 | return new FileTransfer( FileTransfer::SY, lay ); | 24 | return new FileTransfer( FileTransfer::SY, lay ); |
24 | } | 25 | } |
25 | FileTransferLayer* newSXTransfer(IOLayer* lay) { | 26 | FileTransferLayer* newSXTransfer(IOLayer* lay) { |
26 | return new FileTransfer(FileTransfer ::SX, lay ); | 27 | return new FileTransfer(FileTransfer ::SX, lay ); |
27 | } | 28 | } |
28 | 29 | ||
29 | // FILE Transfer Receive Stuff | 30 | // FILE Transfer Receive Stuff |
30 | ReceiveLayer* newSZReceive(IOLayer* lay) { | 31 | ReceiveLayer* newSZReceive(IOLayer* lay) { |
31 | return new FileReceive( FileReceive::SZ, lay ); | 32 | return new FileReceive( FileReceive::SZ, lay ); |
32 | } | 33 | } |
33 | ReceiveLayer* newSYReceive(IOLayer* lay) { | 34 | ReceiveLayer* newSYReceive(IOLayer* lay) { |
34 | return new FileReceive( FileReceive::SY, lay ); | 35 | return new FileReceive( FileReceive::SY, lay ); |
35 | } | 36 | } |
36 | ReceiveLayer* newSXReceive(IOLayer* lay) { | 37 | ReceiveLayer* newSXReceive(IOLayer* lay) { |
37 | return new FileReceive(FileReceive::SX, lay ); | 38 | return new FileReceive(FileReceive::SX, lay ); |
38 | } | 39 | } |
39 | 40 | ||
40 | // Layer stuff | 41 | // Layer stuff |
41 | IOLayer* newSerialLayer( const Profile& prof) { | 42 | IOLayer* newSerialLayer( const Profile& prof) { |
42 | return new IOSerial( prof ); | 43 | return new IOSerial( prof ); |
43 | } | 44 | } |
44 | IOLayer* newBTLayer( const Profile& prof ) { | 45 | IOLayer* newBTLayer( const Profile& prof ) { |
45 | return new IOBt( prof ); | 46 | return new IOBt( prof ); |
46 | } | 47 | } |
47 | IOLayer* newIrDaLayer( const Profile& prof ) { | 48 | IOLayer* newIrDaLayer( const Profile& prof ) { |
48 | return new IOIrda( prof ); | 49 | return new IOIrda( prof ); |
49 | } | 50 | } |
50 | IOLayer* newModemLayer( const Profile& prof ) { | 51 | IOLayer* newModemLayer( const Profile& prof ) { |
51 | return new IOModem( prof ); | 52 | return new IOModem( prof ); |
52 | } | 53 | } |
53 | IOLayer* newConsole( const Profile& prof ) { | 54 | IOLayer* newConsole( const Profile& prof ) { |
54 | return new MyPty( prof ); | 55 | return new MyPty( prof ); |
55 | } | 56 | } |
56 | 57 | ||
57 | // Connection Widgets | 58 | // Connection Widgets |
58 | ProfileDialogWidget* newSerialWidget( const QString& str, QWidget* wid ) { | 59 | ProfileDialogWidget* newSerialWidget( const QString& str, QWidget* wid ) { |
59 | return new SerialConfigWidget( str, wid ); | 60 | return new SerialConfigWidget( str, wid ); |
60 | } | 61 | } |
61 | ProfileDialogWidget* newIrDaWidget( const QString& str, QWidget* wid ) { | 62 | ProfileDialogWidget* newIrDaWidget( const QString& str, QWidget* wid ) { |
62 | return new IrdaConfigWidget( str, wid ); | 63 | return new IrdaConfigWidget( str, wid ); |
63 | } | 64 | } |
64 | ProfileDialogWidget* newModemWidget( const QString& str, QWidget* wid ) { | 65 | ProfileDialogWidget* newModemWidget( const QString& str, QWidget* wid ) { |
65 | return new ModemConfigWidget(str, wid ); | 66 | return new ModemConfigWidget(str, wid ); |
66 | } | 67 | } |
67 | ProfileDialogWidget* newBTWidget( const QString& str, QWidget* wid ) { | 68 | ProfileDialogWidget* newBTWidget( const QString& str, QWidget* wid ) { |
68 | return new BTConfigWidget(str, wid ); | 69 | return new BTConfigWidget(str, wid ); |
69 | } | 70 | } |
70 | ProfileDialogWidget* newConsoleWid( const QString& , QWidget* ) { | 71 | ProfileDialogWidget* newConsoleWid( const QString& str, QWidget* wid ) { |
71 | return 0l; | 72 | return new ConsoleConfigWidget(str, wid ); |
72 | } | 73 | } |
73 | 74 | ||
74 | 75 | ||
75 | // Terminal Widget(s) | 76 | // Terminal Widget(s) |
76 | ProfileDialogWidget* newTerminalWidget(const QString& na, QWidget* wid) { | 77 | ProfileDialogWidget* newTerminalWidget(const QString& na, QWidget* wid) { |
77 | return new TerminalWidget(na, wid,0 ); | 78 | return new TerminalWidget(na, wid,0 ); |
78 | } | 79 | } |
79 | 80 | ||
80 | // Function Keyboard Widget | 81 | // Function Keyboard Widget |
81 | ProfileDialogWidget* newKeyboardWidget(const QString& na, QWidget *wid) { | 82 | ProfileDialogWidget* newKeyboardWidget(const QString& na, QWidget *wid) { |
82 | return new FunctionKeyboardConfig(na, wid); | 83 | return new FunctionKeyboardConfig(na, wid); |
83 | } | 84 | } |
84 | 85 | ||
85 | /* // VT Emulations | 86 | /* // VT Emulations |
86 | EmulationLayer* newVT102( WidgetLayer* wid ) { | 87 | EmulationLayer* newVT102( WidgetLayer* wid ) { |
87 | return new Vt102Emulation( wid ); | 88 | return new Vt102Emulation( wid ); |
88 | } | 89 | } |
89 | */ | 90 | */ |
90 | }; | 91 | }; |
91 | 92 | ||
92 | Default::Default( MetaFactory* fact ) { | 93 | Default::Default( MetaFactory* fact ) { |
93 | fact->addFileTransferLayer( "SZ", QObject::tr("Z-Modem"), newSZTransfer ); | 94 | fact->addFileTransferLayer( "SZ", QObject::tr("Z-Modem"), newSZTransfer ); |
94 | fact->addFileTransferLayer( "SY", QObject::tr("Y-Modem"), newSYTransfer ); | 95 | fact->addFileTransferLayer( "SY", QObject::tr("Y-Modem"), newSYTransfer ); |
95 | fact->addFileTransferLayer( "SX", QObject::tr("X-Modem"), newSXTransfer ); | 96 | fact->addFileTransferLayer( "SX", QObject::tr("X-Modem"), newSXTransfer ); |
96 | 97 | ||
97 | fact->addReceiveLayer( "SZ", QObject::tr("Z-Modem"), newSZReceive ); | 98 | fact->addReceiveLayer( "SZ", QObject::tr("Z-Modem"), newSZReceive ); |
98 | fact->addReceiveLayer( "SY", QObject::tr("Y-Modem"), newSYReceive ); | 99 | fact->addReceiveLayer( "SY", QObject::tr("Y-Modem"), newSYReceive ); |
99 | fact->addReceiveLayer( "SX", QObject::tr("X-Modem"), newSXReceive ); | 100 | fact->addReceiveLayer( "SX", QObject::tr("X-Modem"), newSXReceive ); |
100 | 101 | ||
101 | fact->addIOLayerFactory( "serial", QObject::tr("Serial"), newSerialLayer ); | 102 | fact->addIOLayerFactory( "serial", QObject::tr("Serial"), newSerialLayer ); |
102 | // fact->addIOLayerFactory( "irda", QObject::tr("Infrared"), newIrDaLayer ); | 103 | // fact->addIOLayerFactory( "irda", QObject::tr("Infrared"), newIrDaLayer ); |
103 | // fact->addIOLayerFactory( "bt", QObject::tr("Bluetooth"), newBTLayer ); | 104 | // fact->addIOLayerFactory( "bt", QObject::tr("Bluetooth"), newBTLayer ); |
104 | fact->addIOLayerFactory( "modem", QObject::tr("Modem"), newModemLayer ); | 105 | fact->addIOLayerFactory( "modem", QObject::tr("Modem"), newModemLayer ); |
105 | fact->addIOLayerFactory( "console", QObject::tr("local Console"), newConsole ); | 106 | fact->addIOLayerFactory( "console", QObject::tr("Local Console"), newConsole ); |
106 | 107 | ||
107 | fact->addConnectionWidgetFactory( "serial", QObject::tr("Serial"), newSerialWidget ); | 108 | fact->addConnectionWidgetFactory( "serial", QObject::tr("Serial"), newSerialWidget ); |
108 | // fact->addConnectionWidgetFactory( "irda", QObject::tr("Infrared"), newIrDaWidget ); | 109 | // fact->addConnectionWidgetFactory( "irda", QObject::tr("Infrared"), newIrDaWidget ); |
109 | fact->addConnectionWidgetFactory( "modem", QObject::tr("Modem"), newModemWidget ); | 110 | fact->addConnectionWidgetFactory( "modem", QObject::tr("Modem"), newModemWidget ); |
110 | // fact->addConnectionWidgetFactory( "bt", QObject::tr("Bluetooth"), newBTWidget ); | 111 | // fact->addConnectionWidgetFactory( "bt", QObject::tr("Bluetooth"), newBTWidget ); |
111 | fact->addConnectionWidgetFactory( "console", QObject::tr("local Console"), newConsoleWid ); | 112 | fact->addConnectionWidgetFactory( "console", QObject::tr("Local Console"), newConsoleWid ); |
112 | 113 | ||
113 | fact->addTerminalWidgetFactory( "default", QObject::tr("Default Terminal"), newTerminalWidget ); | 114 | fact->addTerminalWidgetFactory( "default", QObject::tr("Default Terminal"), newTerminalWidget ); |
114 | fact->addKeyboardWidgetFactory( "defaultKeys", QObject::tr("Default Keyboard"), | 115 | fact->addKeyboardWidgetFactory( "defaultKeys", QObject::tr("Default Keyboard"), |
115 | newKeyboardWidget ); | 116 | newKeyboardWidget ); |
116 | 117 | ||
117 | // fact->addEmulationLayer( "default", QObject::tr("Default Terminal"), newVT102 ); | 118 | // fact->addEmulationLayer( "default", QObject::tr("Default Terminal"), newVT102 ); |
118 | } | 119 | } |
119 | Default::~Default() { | 120 | Default::~Default() { |
120 | 121 | ||
121 | } | 122 | } |