author | zecke <zecke> | 2002-10-08 23:13:17 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-10-08 23:13:17 (UTC) |
commit | 8c353ec8b86ee8f82cc25172fb69dd5fee65e848 (patch) (unidiff) | |
tree | a4549bcba962689edb9c40efcb23114cae5fcda2 | |
parent | ca0c224318a50c6618691fb30f39aa1d9b0b8a4f (diff) | |
download | opie-8c353ec8b86ee8f82cc25172fb69dd5fee65e848.zip opie-8c353ec8b86ee8f82cc25172fb69dd5fee65e848.tar.gz opie-8c353ec8b86ee8f82cc25172fb69dd5fee65e848.tar.bz2 |
default I dunno
IOLayerBase the return values for speed()/parity()/flow() added
MainWindow debug code :(
opie-console.pro addition of serialconfigwidget.*
ProfileManager fix removing of Profiles quite rude way of doing it
Configure stuff is done and roughly tested
The migration is done!
TO WAZLAF: you might want to adjust Parity stuff for your needs!
-rw-r--r-- | noncore/apps/opie-console/default.cpp | 5 | ||||
-rw-r--r-- | noncore/apps/opie-console/iolayerbase.cpp | 34 | ||||
-rw-r--r-- | noncore/apps/opie-console/iolayerbase.h | 4 | ||||
-rw-r--r-- | noncore/apps/opie-console/mainwindow.cpp | 1 | ||||
-rw-r--r-- | noncore/apps/opie-console/opie-console.pro | 6 | ||||
-rw-r--r-- | noncore/apps/opie-console/profileeditordialog.cpp | 4 | ||||
-rw-r--r-- | noncore/apps/opie-console/profilemanager.cpp | 9 | ||||
-rw-r--r-- | noncore/apps/opie-console/serialconfigwidget.cpp | 135 | ||||
-rw-r--r-- | noncore/apps/opie-console/serialconfigwidget.h | 27 |
9 files changed, 212 insertions, 13 deletions
diff --git a/noncore/apps/opie-console/default.cpp b/noncore/apps/opie-console/default.cpp index 4ab4695..d9a0557 100644 --- a/noncore/apps/opie-console/default.cpp +++ b/noncore/apps/opie-console/default.cpp | |||
@@ -1,8 +1,9 @@ | |||
1 | #include "io_serial.h" | 1 | #include "io_serial.h" |
2 | #include "sz_transfer.h" | 2 | #include "sz_transfer.h" |
3 | #include "serialconfigwidget.h" | ||
3 | #include "terminalwidget.h" | 4 | #include "terminalwidget.h" |
4 | 5 | ||
5 | #include "default.h" | 6 | #include "default.h" |
6 | 7 | ||
7 | extern "C" { | 8 | extern "C" { |
8 | // FILE Transfer Stuff | 9 | // FILE Transfer Stuff |
@@ -25,14 +26,14 @@ extern "C" { | |||
25 | } | 26 | } |
26 | IOLayer* newIrDaLayer( const Profile& ) { | 27 | IOLayer* newIrDaLayer( const Profile& ) { |
27 | return 0l; | 28 | return 0l; |
28 | } | 29 | } |
29 | 30 | ||
30 | // Connection Widgets | 31 | // Connection Widgets |
31 | ProfileDialogWidget* newSerialWidget(const QString& str, QWidget* ) { | 32 | ProfileDialogWidget* newSerialWidget(const QString& str, QWidget* wid) { |
32 | return 0l; | 33 | return new SerialConfigWidget(str, wid ); |
33 | } | 34 | } |
34 | ProfileDialogWidget* newIrDaWidget( const QString& str, QWidget* wid) { | 35 | ProfileDialogWidget* newIrDaWidget( const QString& str, QWidget* wid) { |
35 | return newSerialWidget(str, wid); | 36 | return newSerialWidget(str, wid); |
36 | } | 37 | } |
37 | ProfileDialogWidget* newBTWidget( const QString& str, QWidget* wid) { | 38 | ProfileDialogWidget* newBTWidget( const QString& str, QWidget* wid) { |
38 | return newSerialWidget(str, wid ); | 39 | return newSerialWidget(str, wid ); |
diff --git a/noncore/apps/opie-console/iolayerbase.cpp b/noncore/apps/opie-console/iolayerbase.cpp index 1e164fe..99b6cc1 100644 --- a/noncore/apps/opie-console/iolayerbase.cpp +++ b/noncore/apps/opie-console/iolayerbase.cpp | |||
@@ -32,13 +32,13 @@ namespace { | |||
32 | IOLayerBase::IOLayerBase( QWidget* par, const char* name ) | 32 | IOLayerBase::IOLayerBase( QWidget* par, const char* name ) |
33 | : QWidget( par, name ) | 33 | : QWidget( par, name ) |
34 | { | 34 | { |
35 | m_speedLabel = new QLabel(tr("Speed"), this ); | 35 | m_speedLabel = new QLabel(tr("Speed"), this ); |
36 | m_speedBox = new QComboBox(this ); | 36 | m_speedBox = new QComboBox(this ); |
37 | 37 | ||
38 | m_groupFlow = new QButtonGroup(tr("Flow control") ); | 38 | m_groupFlow = new QButtonGroup(tr("Flow control"),this ); |
39 | m_flowHw = new QRadioButton(tr("Hardware"), m_groupFlow ); | 39 | m_flowHw = new QRadioButton(tr("Hardware"), m_groupFlow ); |
40 | m_flowSw = new QRadioButton(tr("Software"), m_groupFlow ); | 40 | m_flowSw = new QRadioButton(tr("Software"), m_groupFlow ); |
41 | 41 | ||
42 | m_groupParity = new QButtonGroup(tr("Parity"), this ); | 42 | m_groupParity = new QButtonGroup(tr("Parity"), this ); |
43 | m_parityOdd = new QRadioButton(tr("Odd"), m_groupParity ); | 43 | m_parityOdd = new QRadioButton(tr("Odd"), m_groupParity ); |
44 | m_parityEven = new QRadioButton(tr("Even"), m_groupParity ); | 44 | m_parityEven = new QRadioButton(tr("Even"), m_groupParity ); |
@@ -110,14 +110,40 @@ void IOLayerBase::setSpeed( Speed sp ) { | |||
110 | index = id_baud_9600; | 110 | index = id_baud_9600; |
111 | break; | 111 | break; |
112 | } | 112 | } |
113 | m_speedBox->setCurrentItem(index ); | 113 | m_speedBox->setCurrentItem(index ); |
114 | } | 114 | } |
115 | IOLayerBase::Flow IOLayerBase::flow()const { | 115 | IOLayerBase::Flow IOLayerBase::flow()const { |
116 | return Hardware; | 116 | if (m_flowHw->isChecked() ) { |
117 | qWarning("Hardware flow"); | ||
118 | return Hardware; | ||
119 | }else { | ||
120 | qWarning("Software"); | ||
121 | return Software; | ||
122 | } | ||
117 | } | 123 | } |
118 | IOLayerBase::Parity IOLayerBase::parity()const { | 124 | IOLayerBase::Parity IOLayerBase::parity()const { |
119 | return Odd; | 125 | if (m_parityOdd->isChecked() ) |
126 | return Odd; | ||
127 | else | ||
128 | return Even; | ||
129 | |||
120 | } | 130 | } |
121 | IOLayerBase::Speed IOLayerBase::speed()const{ | 131 | IOLayerBase::Speed IOLayerBase::speed()const{ |
122 | return Baud_9600; | 132 | switch( m_speedBox->currentItem() ) { |
133 | case id_baud_115200: | ||
134 | return Baud_115200; | ||
135 | break; | ||
136 | case id_baud_57600: | ||
137 | return Baud_57600; | ||
138 | break; | ||
139 | case id_baud_38400: | ||
140 | return Baud_38400; | ||
141 | break; | ||
142 | case id_baud_19200: | ||
143 | return Baud_19200; | ||
144 | break; | ||
145 | case id_baud_9600: | ||
146 | return Baud_9600; | ||
147 | break; | ||
148 | } | ||
123 | } | 149 | } |
diff --git a/noncore/apps/opie-console/iolayerbase.h b/noncore/apps/opie-console/iolayerbase.h index 7ef3f4d..151a04b 100644 --- a/noncore/apps/opie-console/iolayerbase.h +++ b/noncore/apps/opie-console/iolayerbase.h | |||
@@ -10,14 +10,14 @@ class QVBoxLayout; | |||
10 | class QButtonGroup; | 10 | class QButtonGroup; |
11 | class QRadioButton; | 11 | class QRadioButton; |
12 | class QHBoxLayout; | 12 | class QHBoxLayout; |
13 | class IOLayerBase : public QWidget { | 13 | class IOLayerBase : public QWidget { |
14 | Q_OBJECT | 14 | Q_OBJECT |
15 | public: | 15 | public: |
16 | enum Flow { Software, Hardware }; | 16 | enum Flow { Hardware, Software }; |
17 | enum Parity{ Odd, Even }; | 17 | enum Parity{ Odd =2 , Even =1 }; |
18 | enum Speed{ Baud_115200, | 18 | enum Speed{ Baud_115200, |
19 | Baud_57600, | 19 | Baud_57600, |
20 | Baud_38400, | 20 | Baud_38400, |
21 | Baud_19200, | 21 | Baud_19200, |
22 | Baud_9600 }; | 22 | Baud_9600 }; |
23 | IOLayerBase( QWidget* base, const char* name = 0l); | 23 | IOLayerBase( QWidget* base, const char* name = 0l); |
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp index a414bdb..3531478 100644 --- a/noncore/apps/opie-console/mainwindow.cpp +++ b/noncore/apps/opie-console/mainwindow.cpp | |||
@@ -162,12 +162,13 @@ void MainWindow::slotConfigure() { | |||
162 | ConfigDialog conf( manager()->all(), factory() ); | 162 | ConfigDialog conf( manager()->all(), factory() ); |
163 | conf.showMaximized(); | 163 | conf.showMaximized(); |
164 | 164 | ||
165 | int ret = conf.exec(); | 165 | int ret = conf.exec(); |
166 | 166 | ||
167 | if ( QDialog::Accepted == ret ) { | 167 | if ( QDialog::Accepted == ret ) { |
168 | qWarning("conf %d", conf.list().count() ); | ||
168 | manager()->setProfiles( conf.list() ); | 169 | manager()->setProfiles( conf.list() ); |
169 | populateProfiles(); | 170 | populateProfiles(); |
170 | } | 171 | } |
171 | } | 172 | } |
172 | 173 | ||
173 | void MainWindow::slotClose() { | 174 | void MainWindow::slotClose() { |
diff --git a/noncore/apps/opie-console/opie-console.pro b/noncore/apps/opie-console/opie-console.pro index 9e25e8f..ea6d759 100644 --- a/noncore/apps/opie-console/opie-console.pro +++ b/noncore/apps/opie-console/opie-console.pro | |||
@@ -23,13 +23,14 @@ HEADERS = io_layer.h io_serial.h \ | |||
23 | widget_layer.h \ | 23 | widget_layer.h \ |
24 | transferdialog.h \ | 24 | transferdialog.h \ |
25 | profiledialogwidget.h \ | 25 | profiledialogwidget.h \ |
26 | profileeditordialog.h \ | 26 | profileeditordialog.h \ |
27 | default.h \ | 27 | default.h \ |
28 | terminalwidget.h \ | 28 | terminalwidget.h \ |
29 | iolayerbase.h | 29 | iolayerbase.h \ |
30 | serialconfigwidget.h | ||
30 | 31 | ||
31 | SOURCES = io_layer.cpp io_serial.cpp \ | 32 | SOURCES = io_layer.cpp io_serial.cpp \ |
32 | file_layer.cpp sz_transfer.cpp \ | 33 | file_layer.cpp sz_transfer.cpp \ |
33 | main.cpp \ | 34 | main.cpp \ |
34 | metafactory.cpp \ | 35 | metafactory.cpp \ |
35 | session.cpp \ | 36 | session.cpp \ |
@@ -48,13 +49,14 @@ SOURCES = io_layer.cpp io_serial.cpp \ | |||
48 | widget_layer.cpp \ | 49 | widget_layer.cpp \ |
49 | transferdialog.cpp \ | 50 | transferdialog.cpp \ |
50 | profiledialogwidget.cpp \ | 51 | profiledialogwidget.cpp \ |
51 | profileeditordialog.cpp \ | 52 | profileeditordialog.cpp \ |
52 | default.cpp \ | 53 | default.cpp \ |
53 | terminalwidget.cpp \ | 54 | terminalwidget.cpp \ |
54 | iolayerbase.cpp | 55 | iolayerbase.cpp \ |
56 | serialconfigwidget.cpp | ||
55 | 57 | ||
56 | INTERFACES = configurebase.ui editbase.ui | 58 | INTERFACES = configurebase.ui editbase.ui |
57 | INCLUDEPATH += $(OPIEDIR)/include | 59 | INCLUDEPATH += $(OPIEDIR)/include |
58 | DEPENDPATH += $(OPIEDIR)/include | 60 | DEPENDPATH += $(OPIEDIR)/include |
59 | LIBS += -lqpe -lopie | 61 | LIBS += -lqpe -lopie |
60 | TARGET = opie-console | 62 | TARGET = opie-console |
diff --git a/noncore/apps/opie-console/profileeditordialog.cpp b/noncore/apps/opie-console/profileeditordialog.cpp index c5c6248..faf9c39 100644 --- a/noncore/apps/opie-console/profileeditordialog.cpp +++ b/noncore/apps/opie-console/profileeditordialog.cpp | |||
@@ -175,14 +175,16 @@ QCString ProfileEditorDialog::profType()const | |||
175 | * we need to switch the widget | 175 | * we need to switch the widget |
176 | */ | 176 | */ |
177 | void ProfileEditorDialog::slotConActivated( const QString& str ) { | 177 | void ProfileEditorDialog::slotConActivated( const QString& str ) { |
178 | delete m_con; | 178 | delete m_con; |
179 | m_con = m_fact->newConnectionPlugin( str, m_tabCon ); | 179 | m_con = m_fact->newConnectionPlugin( str, m_tabCon ); |
180 | 180 | ||
181 | if (m_con ) | 181 | if (m_con ) { |
182 | m_con->load(m_prof ); | ||
182 | m_layCon->addWidget( m_con ); | 183 | m_layCon->addWidget( m_con ); |
184 | } | ||
183 | } | 185 | } |
184 | /* | 186 | /* |
185 | * we need to switch the widget | 187 | * we need to switch the widget |
186 | */ | 188 | */ |
187 | void ProfileEditorDialog::slotTermActivated( const QString& str ) { | 189 | void ProfileEditorDialog::slotTermActivated( const QString& str ) { |
188 | delete m_term; | 190 | delete m_term; |
diff --git a/noncore/apps/opie-console/profilemanager.cpp b/noncore/apps/opie-console/profilemanager.cpp index 6ad08b5..e66ebcc 100644 --- a/noncore/apps/opie-console/profilemanager.cpp +++ b/noncore/apps/opie-console/profilemanager.cpp | |||
@@ -1,6 +1,10 @@ | |||
1 | #include <stdio.h> | ||
2 | #include <stdlib.h> | ||
3 | |||
4 | #include <qfile.h> | ||
1 | 5 | ||
2 | #include <qpe/config.h> | 6 | #include <qpe/config.h> |
3 | 7 | ||
4 | #include "metafactory.h" | 8 | #include "metafactory.h" |
5 | #include "profileconfig.h" | 9 | #include "profileconfig.h" |
6 | #include "profilemanager.h" | 10 | #include "profilemanager.h" |
@@ -27,12 +31,13 @@ void ProfileManager::load() { | |||
27 | qWarning("group " + (*it) ); | 31 | qWarning("group " + (*it) ); |
28 | conf.setGroup( (*it) ); | 32 | conf.setGroup( (*it) ); |
29 | Profile prof; | 33 | Profile prof; |
30 | prof.setName( conf.readEntry("name") ); | 34 | prof.setName( conf.readEntry("name") ); |
31 | prof.setIOLayer( conf.readEntry("iolayer").utf8() ); | 35 | prof.setIOLayer( conf.readEntry("iolayer").utf8() ); |
32 | prof.setTerminalName( conf.readEntry("term").utf8() ); | 36 | prof.setTerminalName( conf.readEntry("term").utf8() ); |
37 | qWarning(" %s %s", conf.readEntry("iolayer").latin1(), prof.ioLayerName().data() ); | ||
33 | prof.setBackground( conf.readNumEntry("back") ); | 38 | prof.setBackground( conf.readNumEntry("back") ); |
34 | prof.setForeground( conf.readNumEntry("fore") ); | 39 | prof.setForeground( conf.readNumEntry("fore") ); |
35 | prof.setTerminal( conf.readNumEntry("terminal") ); | 40 | prof.setTerminal( conf.readNumEntry("terminal") ); |
36 | prof.setConf( conf.items( (*it) ) ); | 41 | prof.setConf( conf.items( (*it) ) ); |
37 | 42 | ||
38 | /* now add it */ | 43 | /* now add it */ |
@@ -57,19 +62,19 @@ Session* ProfileManager::fromProfile( const Profile& prof) { | |||
57 | * load widget? | 62 | * load widget? |
58 | * set colors + fonts | 63 | * set colors + fonts |
59 | */ | 64 | */ |
60 | return session; | 65 | return session; |
61 | } | 66 | } |
62 | void ProfileManager::save( ) { | 67 | void ProfileManager::save( ) { |
68 | QFile::remove( (QString(getenv("HOME") )+ "/Settings/opie-console-profiles.conf" ) ); | ||
63 | ProfileConfig conf("opie-console-profiles"); | 69 | ProfileConfig conf("opie-console-profiles"); |
64 | conf.clearAll(); | ||
65 | Profile::ValueList::Iterator it; | 70 | Profile::ValueList::Iterator it; |
66 | for (it = m_list.begin(); it != m_list.end(); ++it ) { | 71 | for (it = m_list.begin(); it != m_list.end(); ++it ) { |
67 | conf.setGroup( (*it).name() ); | 72 | conf.setGroup( (*it).name() ); |
68 | conf.writeEntry( "name", (*it).name() ); | 73 | conf.writeEntry( "name", (*it).name() ); |
69 | conf.writeEntry( "ioplayer", QString::fromUtf8( (*it).ioLayerName() ) ); | 74 | conf.writeEntry( "iolayer", QString::fromUtf8( (*it).ioLayerName() ) ); |
70 | conf.writeEntry( "term", QString::fromUtf8( (*it).terminalName() ) ); | 75 | conf.writeEntry( "term", QString::fromUtf8( (*it).terminalName() ) ); |
71 | conf.writeEntry( "back", (*it).background() ); | 76 | conf.writeEntry( "back", (*it).background() ); |
72 | conf.writeEntry( "fore", (*it).foreground() ); | 77 | conf.writeEntry( "fore", (*it).foreground() ); |
73 | conf.writeEntry( "terminal", (*it).terminal() ); | 78 | conf.writeEntry( "terminal", (*it).terminal() ); |
74 | /* now the config stuff */ | 79 | /* now the config stuff */ |
75 | QMap<QString, QString> map = (*it).conf(); | 80 | QMap<QString, QString> map = (*it).conf(); |
diff --git a/noncore/apps/opie-console/serialconfigwidget.cpp b/noncore/apps/opie-console/serialconfigwidget.cpp new file mode 100644 index 0000000..a427302 --- a/dev/null +++ b/noncore/apps/opie-console/serialconfigwidget.cpp | |||
@@ -0,0 +1,135 @@ | |||
1 | #include <qlabel.h> | ||
2 | #include <qlayout.h> | ||
3 | #include <qcombobox.h> | ||
4 | |||
5 | #include "iolayerbase.h" | ||
6 | #include "serialconfigwidget.h" | ||
7 | |||
8 | namespace { | ||
9 | void setCurrent( const QString& str, QComboBox* bo ) { | ||
10 | uint b = bo->count(); | ||
11 | for (uint i = 0; i < bo->count(); i++ ) { | ||
12 | if ( bo->text(i) == str ) { | ||
13 | bo->setCurrentItem( i ); | ||
14 | return; | ||
15 | } | ||
16 | } | ||
17 | bo->insertItem( str ); | ||
18 | bo->setCurrentItem( b ); | ||
19 | } | ||
20 | |||
21 | |||
22 | } | ||
23 | |||
24 | SerialConfigWidget::SerialConfigWidget( const QString& name, | ||
25 | QWidget* parent, | ||
26 | const char* na ) | ||
27 | : ProfileDialogConnectionWidget( name, parent, na ) { | ||
28 | |||
29 | m_lay = new QVBoxLayout(this ); | ||
30 | m_device = new QLabel(tr("Device"), this ); | ||
31 | m_deviceCmb = new QComboBox(this ); | ||
32 | m_deviceCmb->setEditable( TRUE ); | ||
33 | |||
34 | m_base = new IOLayerBase(this, "base"); | ||
35 | |||
36 | m_lay->addWidget( m_device ); | ||
37 | m_lay->addWidget( m_deviceCmb ); | ||
38 | m_lay->addWidget( m_base ); | ||
39 | |||
40 | m_deviceCmb->insertItem( "/dev/ttyS0" ); | ||
41 | m_deviceCmb->insertItem( "/dev/ttyS1" ); | ||
42 | m_deviceCmb->insertItem( "/dev/ttySA0"); | ||
43 | m_deviceCmb->insertItem( "/dev/ttySA1"); | ||
44 | |||
45 | } | ||
46 | SerialConfigWidget::~SerialConfigWidget() { | ||
47 | |||
48 | } | ||
49 | void SerialConfigWidget::load( const Profile& prof ) { | ||
50 | int rad_flow = prof.readNumEntry("Flow"); | ||
51 | int rad_parity = prof.readNumEntry("Parity"); | ||
52 | int speed = prof.readNumEntry("Speed"); | ||
53 | |||
54 | if (rad_flow == 0) | ||
55 | m_base->setFlow( IOLayerBase::Hardware ); | ||
56 | else | ||
57 | m_base->setFlow( IOLayerBase::Software ); | ||
58 | |||
59 | if (rad_parity == 1) | ||
60 | m_base->setParity( IOLayerBase::Even ); | ||
61 | else | ||
62 | m_base->setParity( IOLayerBase::Odd ); | ||
63 | |||
64 | switch( speed ) { | ||
65 | case 115200: | ||
66 | m_base->setSpeed(IOLayerBase::Baud_115200 ); | ||
67 | break; | ||
68 | case 57600: | ||
69 | m_base->setSpeed( IOLayerBase::Baud_57600 ); | ||
70 | break; | ||
71 | case 38400: | ||
72 | m_base->setSpeed(IOLayerBase::Baud_38400 ); | ||
73 | break; | ||
74 | case 19200: | ||
75 | m_base->setSpeed( IOLayerBase::Baud_19200 ); | ||
76 | break; | ||
77 | case 9600: | ||
78 | default: | ||
79 | m_base->setSpeed(IOLayerBase::Baud_9600 ); | ||
80 | break; | ||
81 | } | ||
82 | |||
83 | if ( prof.readEntry("Device").isEmpty() ) return; | ||
84 | setCurrent( prof.readEntry("Device"), m_deviceCmb ); | ||
85 | |||
86 | } | ||
87 | /* | ||
88 | * save speed, | ||
89 | * flow, | ||
90 | * parity | ||
91 | */ | ||
92 | void SerialConfigWidget::save( Profile& prof ) { | ||
93 | int flow, parity, speed; | ||
94 | prof.writeEntry("Device", m_deviceCmb->currentText() ); | ||
95 | |||
96 | switch( m_base->flow() ) { | ||
97 | case IOLayerBase::Software: | ||
98 | flow = 1; | ||
99 | break; | ||
100 | case IOLayerBase::Hardware: | ||
101 | flow = 0; | ||
102 | break; | ||
103 | } | ||
104 | |||
105 | switch( m_base->parity() ) { | ||
106 | case IOLayerBase::Odd: | ||
107 | parity = 2; | ||
108 | break; | ||
109 | case IOLayerBase::Even: | ||
110 | parity = 1; | ||
111 | break; | ||
112 | } | ||
113 | |||
114 | switch( m_base->speed() ) { | ||
115 | case IOLayerBase::Baud_115200: | ||
116 | speed = 115200; | ||
117 | break; | ||
118 | case IOLayerBase::Baud_57600: | ||
119 | speed = 57600; | ||
120 | break; | ||
121 | case IOLayerBase::Baud_38400: | ||
122 | speed = 38400; | ||
123 | break; | ||
124 | case IOLayerBase::Baud_19200: | ||
125 | speed = 19200; | ||
126 | break; | ||
127 | case IOLayerBase::Baud_9600: | ||
128 | speed = 9600; | ||
129 | break; | ||
130 | } | ||
131 | |||
132 | prof.writeEntry("Flow", flow); | ||
133 | prof.writeEntry("Parity", parity); | ||
134 | prof.writeEntry("Speed", speed); | ||
135 | } | ||
diff --git a/noncore/apps/opie-console/serialconfigwidget.h b/noncore/apps/opie-console/serialconfigwidget.h new file mode 100644 index 0000000..8b5c8aa --- a/dev/null +++ b/noncore/apps/opie-console/serialconfigwidget.h | |||
@@ -0,0 +1,27 @@ | |||
1 | #ifndef OPIE_SERIAL_CONFIG_WIDGET_H | ||
2 | #define OPIE_SERIAL_CONFIG_WIDGET_H | ||
3 | |||
4 | #include "profiledialogwidget.h" | ||
5 | |||
6 | class QVBoxLayout; | ||
7 | class QLabel; | ||
8 | class QComboBox; | ||
9 | class IOLayerBase; | ||
10 | class SerialConfigWidget : public ProfileDialogConnectionWidget { | ||
11 | Q_OBJECT | ||
12 | public: | ||
13 | SerialConfigWidget( const QString& name, QWidget* parent, const char* name = 0l ); | ||
14 | ~SerialConfigWidget(); | ||
15 | |||
16 | void load( const Profile& ); | ||
17 | void save( Profile& ); | ||
18 | private: | ||
19 | QVBoxLayout* m_lay; | ||
20 | QLabel* m_device; | ||
21 | QComboBox* m_deviceCmb; | ||
22 | IOLayerBase* m_base; | ||
23 | |||
24 | }; | ||
25 | |||
26 | |||
27 | #endif | ||