summaryrefslogtreecommitdiff
authorwazlaf <wazlaf>2002-09-28 15:21:53 (UTC)
committer wazlaf <wazlaf>2002-09-28 15:21:53 (UTC)
commit18d575d0ee47a0700091de81bc3e8c54be4eae18 (patch) (side-by-side diff)
treea4a890a3d9e823ed75ba0b5a51a67b6e47a57ab9
parentea1975bdf411de3e08e7b84d2480a522596fe143 (diff)
downloadopie-18d575d0ee47a0700091de81bc3e8c54be4eae18.zip
opie-18d575d0ee47a0700091de81bc3e8c54be4eae18.tar.gz
opie-18d575d0ee47a0700091de81bc3e8c54be4eae18.tar.bz2
indenting, comments
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/io_serial.cpp4
-rw-r--r--noncore/apps/opie-console/mainwindow.cpp10
-rw-r--r--noncore/apps/opie-console/mainwindow.h5
-rw-r--r--noncore/apps/opie-console/metafactory.h9
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
@@ -117,8 +117,12 @@ bool IOSerial::open() {
void IOSerial::reload(const Config &config) {
m_device = config.readEntry("Device", SERIAL_DEFAULT_DEVICE);
m_baud = config.readNumEntry("Baud", SERIAL_DEFAULT_BAUD);
+ m_parity = config.readNumEntry("Parity", SERIAL_DEFAULT_PARITY);
+ m_dbits = config.readNumEntry("DataBits", SERIAL_DEFAULT_DBITS);
+ m_sbits = config.readNumEntry("StopBits", SERIAL_DEFAULT_SBITS);
+ m_flow = config.readNumEntry("Flow", SERIAL_DEFAULT_FLOW);
}
int IOSerial::getBaud(int baud) const {
switch (baud) {
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
@@ -7,17 +7,14 @@
#include "metafactory.h"
#include "mainwindow.h"
-MainWindow::MainWindow()
-{
- qWarning("c'tor");
+MainWindow::MainWindow() {
m_factory = new MetaFactory();
m_sessions.setAutoDelete( TRUE );
- m_curSession = 0l;
+ m_curSession = -1;
initUI();
-
}
void MainWindow::initUI() {
setToolBarsMovable( FALSE );
@@ -50,13 +47,16 @@ void MainWindow::initUI() {
}
MainWindow::~MainWindow() {
delete m_factory;
}
+
MetaFactory* MainWindow::factory() {
return m_factory;
}
+
Session* MainWindow::currentSession() {
return m_curSession;
}
+
QList<Session> MainWindow::sessions() {
return m_sessions;
}
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
@@ -14,8 +14,9 @@
class QToolBar;
class QMenuBar;
class QAction;
class MetaFactory;
+
class MainWindow : public QMainWindow {
Q_OBJECT
public:
MainWindow( );
@@ -36,9 +37,11 @@ public:
/**
* the session list
*/
QList<Session> sessions();
-
+protected slots:
+ void slotNew();
+ void slotConnect();
private:
void initUI();
/**
* the current session
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
@@ -1,9 +1,10 @@
#ifndef OPIE_META_FACTORY_H
#define OPIE_META_FACTORY_H
/**
- * meta factory is our factory servie
+ * The MetaFactory is used to keep track of all IOLayers, FileTransferLayers and ConfigWidgets
+ * and to instantiate these implementations on demand
*/
#include <qwidget.h>
#include <qmap.h>
@@ -18,8 +19,9 @@ class MetaFactory {
public:
typedef QWidget* (*configWidget)(QWidget* parent);
typedef IOLayer* (*iolayer)(const Config& );
typedef FileTransferLayer* (*filelayer)(IOLayer*);
+
MetaFactory();
~MetaFactory();
void addConfigWidgetFactory( const QString&,
@@ -30,17 +32,12 @@ public:
filelayer );
QStringList ioLayers()const;
QStringList configWidgets()const;
QStringList fileTransferLayers()const;
-
-
private:
QMap<QString, configWidget> m_confFact;
QMap<QString, iolayer> m_layerFact;
QMap<QString, filelayer> m_fileFact;
-
-
-
};
#endif