-rw-r--r-- | noncore/apps/opie-console/io_serial.cpp | 4 | ||||
-rw-r--r-- | noncore/apps/opie-console/mainwindow.cpp | 10 | ||||
-rw-r--r-- | noncore/apps/opie-console/mainwindow.h | 5 | ||||
-rw-r--r-- | noncore/apps/opie-console/metafactory.h | 9 |
4 files changed, 16 insertions, 12 deletions
diff --git a/noncore/apps/opie-console/io_serial.cpp b/noncore/apps/opie-console/io_serial.cpp index 9a81de9..c9155d1 100644 --- a/noncore/apps/opie-console/io_serial.cpp +++ b/noncore/apps/opie-console/io_serial.cpp | |||
@@ -118,6 +118,10 @@ bool IOSerial::open() { | |||
118 | void IOSerial::reload(const Config &config) { | 118 | void IOSerial::reload(const Config &config) { |
119 | m_device = config.readEntry("Device", SERIAL_DEFAULT_DEVICE); | 119 | m_device = config.readEntry("Device", SERIAL_DEFAULT_DEVICE); |
120 | m_baud = config.readNumEntry("Baud", SERIAL_DEFAULT_BAUD); | 120 | m_baud = config.readNumEntry("Baud", SERIAL_DEFAULT_BAUD); |
121 | m_parity = config.readNumEntry("Parity", SERIAL_DEFAULT_PARITY); | ||
122 | m_dbits = config.readNumEntry("DataBits", SERIAL_DEFAULT_DBITS); | ||
123 | m_sbits = config.readNumEntry("StopBits", SERIAL_DEFAULT_SBITS); | ||
124 | m_flow = config.readNumEntry("Flow", SERIAL_DEFAULT_FLOW); | ||
121 | } | 125 | } |
122 | 126 | ||
123 | int IOSerial::getBaud(int baud) const { | 127 | int IOSerial::getBaud(int baud) const { |
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp index b6b2a2e..e9b5eda 100644 --- a/noncore/apps/opie-console/mainwindow.cpp +++ b/noncore/apps/opie-console/mainwindow.cpp | |||
@@ -8,15 +8,12 @@ | |||
8 | #include "metafactory.h" | 8 | #include "metafactory.h" |
9 | #include "mainwindow.h" | 9 | #include "mainwindow.h" |
10 | 10 | ||
11 | MainWindow::MainWindow() | 11 | MainWindow::MainWindow() { |
12 | { | ||
13 | qWarning("c'tor"); | ||
14 | m_factory = new MetaFactory(); | 12 | m_factory = new MetaFactory(); |
15 | m_sessions.setAutoDelete( TRUE ); | 13 | m_sessions.setAutoDelete( TRUE ); |
16 | m_curSession = 0l; | 14 | m_curSession = -1; |
17 | 15 | ||
18 | initUI(); | 16 | initUI(); |
19 | |||
20 | } | 17 | } |
21 | void MainWindow::initUI() { | 18 | void MainWindow::initUI() { |
22 | setToolBarsMovable( FALSE ); | 19 | setToolBarsMovable( FALSE ); |
@@ -51,12 +48,15 @@ void MainWindow::initUI() { | |||
51 | MainWindow::~MainWindow() { | 48 | MainWindow::~MainWindow() { |
52 | delete m_factory; | 49 | delete m_factory; |
53 | } | 50 | } |
51 | |||
54 | MetaFactory* MainWindow::factory() { | 52 | MetaFactory* MainWindow::factory() { |
55 | return m_factory; | 53 | return m_factory; |
56 | } | 54 | } |
55 | |||
57 | Session* MainWindow::currentSession() { | 56 | Session* MainWindow::currentSession() { |
58 | return m_curSession; | 57 | return m_curSession; |
59 | } | 58 | } |
59 | |||
60 | QList<Session> MainWindow::sessions() { | 60 | QList<Session> MainWindow::sessions() { |
61 | return m_sessions; | 61 | return m_sessions; |
62 | } | 62 | } |
diff --git a/noncore/apps/opie-console/mainwindow.h b/noncore/apps/opie-console/mainwindow.h index 3d1e1c8..db3a653 100644 --- a/noncore/apps/opie-console/mainwindow.h +++ b/noncore/apps/opie-console/mainwindow.h | |||
@@ -15,6 +15,7 @@ class QToolBar; | |||
15 | class QMenuBar; | 15 | class QMenuBar; |
16 | class QAction; | 16 | class QAction; |
17 | class MetaFactory; | 17 | class MetaFactory; |
18 | |||
18 | class MainWindow : public QMainWindow { | 19 | class MainWindow : public QMainWindow { |
19 | Q_OBJECT | 20 | Q_OBJECT |
20 | public: | 21 | public: |
@@ -37,7 +38,9 @@ public: | |||
37 | * the session list | 38 | * the session list |
38 | */ | 39 | */ |
39 | QList<Session> sessions(); | 40 | QList<Session> sessions(); |
40 | 41 | protected slots: | |
42 | void slotNew(); | ||
43 | void slotConnect(); | ||
41 | private: | 44 | private: |
42 | void initUI(); | 45 | void initUI(); |
43 | /** | 46 | /** |
diff --git a/noncore/apps/opie-console/metafactory.h b/noncore/apps/opie-console/metafactory.h index 9c0f0a1..aae9391 100644 --- a/noncore/apps/opie-console/metafactory.h +++ b/noncore/apps/opie-console/metafactory.h | |||
@@ -2,7 +2,8 @@ | |||
2 | #define OPIE_META_FACTORY_H | 2 | #define OPIE_META_FACTORY_H |
3 | 3 | ||
4 | /** | 4 | /** |
5 | * meta factory is our factory servie | 5 | * The MetaFactory is used to keep track of all IOLayers, FileTransferLayers and ConfigWidgets |
6 | * and to instantiate these implementations on demand | ||
6 | */ | 7 | */ |
7 | 8 | ||
8 | #include <qwidget.h> | 9 | #include <qwidget.h> |
@@ -19,6 +20,7 @@ public: | |||
19 | typedef QWidget* (*configWidget)(QWidget* parent); | 20 | typedef QWidget* (*configWidget)(QWidget* parent); |
20 | typedef IOLayer* (*iolayer)(const Config& ); | 21 | typedef IOLayer* (*iolayer)(const Config& ); |
21 | typedef FileTransferLayer* (*filelayer)(IOLayer*); | 22 | typedef FileTransferLayer* (*filelayer)(IOLayer*); |
23 | |||
22 | MetaFactory(); | 24 | MetaFactory(); |
23 | ~MetaFactory(); | 25 | ~MetaFactory(); |
24 | 26 | ||
@@ -31,15 +33,10 @@ public: | |||
31 | QStringList ioLayers()const; | 33 | QStringList ioLayers()const; |
32 | QStringList configWidgets()const; | 34 | QStringList configWidgets()const; |
33 | QStringList fileTransferLayers()const; | 35 | QStringList fileTransferLayers()const; |
34 | |||
35 | |||
36 | private: | 36 | private: |
37 | QMap<QString, configWidget> m_confFact; | 37 | QMap<QString, configWidget> m_confFact; |
38 | QMap<QString, iolayer> m_layerFact; | 38 | QMap<QString, iolayer> m_layerFact; |
39 | QMap<QString, filelayer> m_fileFact; | 39 | QMap<QString, filelayer> m_fileFact; |
40 | |||
41 | |||
42 | |||
43 | }; | 40 | }; |
44 | 41 | ||
45 | 42 | ||