Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

default.cpp

Go to the documentation of this file.
00001 #include "io_irda.h"
00002 #include "io_bt.h"
00003 #include "io_modem.h"
00004 #include "filetransfer.h"
00005 #include "filereceive.h"
00006 #include "serialconfigwidget.h"
00007 #include "irdaconfigwidget.h"
00008 #include "btconfigwidget.h"
00009 #include "modemconfigwidget.h"
00010 #include "terminalwidget.h"
00011 #include "function_keyboard.h"
00012 #include "consoleconfigwidget.h"
00013 #include "MyPty.h"
00014 
00015 #include "default.h"
00016 
00017 extern "C" {
00018     // FILE Transfer Stuff
00019     FileTransferLayer* newSZTransfer(IOLayer* lay) {
00020         return new FileTransfer( FileTransfer::SZ, lay );
00021     }
00022     FileTransferLayer* newSYTransfer(IOLayer* lay) {
00023         return new FileTransfer( FileTransfer::SY, lay );
00024     }
00025     FileTransferLayer* newSXTransfer(IOLayer* lay) {
00026         return new FileTransfer(FileTransfer ::SX, lay );
00027     }
00028 
00029     // FILE Transfer Receive Stuff
00030     ReceiveLayer* newSZReceive(IOLayer* lay) {
00031         return new FileReceive( FileReceive::SZ, lay );
00032     }
00033     ReceiveLayer* newSYReceive(IOLayer* lay) {
00034         return new FileReceive( FileReceive::SY, lay );
00035     }
00036     ReceiveLayer* newSXReceive(IOLayer* lay) {
00037         return new FileReceive(FileReceive::SX, lay );
00038     }
00039 
00040     // Layer stuff
00041     IOLayer* newSerialLayer( const Profile& prof) {
00042         return new IOSerial( prof );
00043     }
00044     IOLayer* newBTLayer( const Profile& prof ) {
00045         return new IOBt( prof );
00046     }
00047     IOLayer* newIrDaLayer( const Profile& prof ) {
00048         return new IOIrda( prof );
00049     }
00050     IOLayer* newModemLayer( const Profile& prof ) {
00051         return new IOModem( prof );
00052     }
00053     IOLayer* newConsole( const Profile& prof ) {
00054         return new MyPty( prof );
00055     }
00056 
00057     // Connection Widgets
00058     ProfileDialogWidget* newSerialWidget( const QString& str, QWidget* wid ) {
00059         return new SerialConfigWidget( str, wid );
00060     }
00061     ProfileDialogWidget* newIrDaWidget( const QString& str, QWidget* wid ) {
00062         return new IrdaConfigWidget( str, wid );
00063     }
00064     ProfileDialogWidget* newModemWidget( const QString& str, QWidget* wid ) {
00065         return new ModemConfigWidget(str, wid );
00066     }
00067     ProfileDialogWidget* newBTWidget( const QString& str, QWidget* wid ) {
00068         return new BTConfigWidget(str, wid );
00069     }
00070     ProfileDialogWidget* newConsoleWid( const QString& str, QWidget* wid ) {
00071         return new ConsoleConfigWidget(str, wid );
00072     }
00073 
00074 
00075     // Terminal Widget(s)
00076     ProfileDialogWidget* newTerminalWidget(const QString& na, QWidget* wid) {
00077         return new TerminalWidget(na, wid,0 );
00078     }
00079 
00080     // Function Keyboard Widget
00081     ProfileDialogWidget* newKeyboardWidget(const QString& na, QWidget *wid) {
00082         return new FunctionKeyboardConfig(na, wid);
00083     }
00084 
00085 /*    // VT Emulations
00086     EmulationLayer* newVT102( WidgetLayer* wid ) {
00087         return new Vt102Emulation( wid );
00088     }
00089 */
00090 };
00091 
00092 Default::Default( MetaFactory* fact ) {
00093     fact->addFileTransferLayer( "SZ", QObject::tr("Z-Modem"), newSZTransfer );
00094     fact->addFileTransferLayer( "SY", QObject::tr("Y-Modem"), newSYTransfer );
00095     fact->addFileTransferLayer( "SX", QObject::tr("X-Modem"), newSXTransfer );
00096 
00097     fact->addReceiveLayer( "SZ", QObject::tr("Z-Modem"), newSZReceive );
00098     fact->addReceiveLayer( "SY", QObject::tr("Y-Modem"), newSYReceive );
00099     fact->addReceiveLayer( "SX", QObject::tr("X-Modem"), newSXReceive );
00100 
00101     fact->addIOLayerFactory( "serial", QObject::tr("Serial"), newSerialLayer );
00102 //    fact->addIOLayerFactory( "irda", QObject::tr("Infrared"), newIrDaLayer   );
00103 //    fact->addIOLayerFactory( "bt", QObject::tr("Bluetooth"),  newBTLayer     );
00104     fact->addIOLayerFactory( "modem", QObject::tr("Modem"),   newModemLayer  );
00105     fact->addIOLayerFactory( "console", QObject::tr("Local Console"), newConsole   );
00106 
00107     fact->addConnectionWidgetFactory( "serial", QObject::tr("Serial"), newSerialWidget );
00108 //    fact->addConnectionWidgetFactory( "irda", QObject::tr("Infrared"), newIrDaWidget );
00109     fact->addConnectionWidgetFactory( "modem", QObject::tr("Modem"), newModemWidget );
00110 //    fact->addConnectionWidgetFactory( "bt", QObject::tr("Bluetooth"), newBTWidget );
00111     fact->addConnectionWidgetFactory( "console", QObject::tr("Local Console"), newConsoleWid );
00112 
00113     fact->addTerminalWidgetFactory( "default", QObject::tr("Default Terminal"),  newTerminalWidget );
00114     fact->addKeyboardWidgetFactory( "defaultKeys", QObject::tr("Default Keyboard"),
00115  newKeyboardWidget );
00116 
00117 //    fact->addEmulationLayer( "default", QObject::tr("Default Terminal"), newVT102 );
00118 }
00119 Default::~Default() {
00120 
00121 }

Generated on Sat Nov 5 16:16:49 2005 for OPIE by  doxygen 1.4.2