Diffstat (limited to 'noncore/apps/opie-console/profileeditordialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/profileeditordialog.cpp | 81 |
1 files changed, 8 insertions, 73 deletions
diff --git a/noncore/apps/opie-console/profileeditordialog.cpp b/noncore/apps/opie-console/profileeditordialog.cpp index aee4051..fbe0f23 100644 --- a/noncore/apps/opie-console/profileeditordialog.cpp +++ b/noncore/apps/opie-console/profileeditordialog.cpp | |||
@@ -13,68 +13,5 @@ | |||
13 | 13 | ||
14 | #include "profileeditorplugins.h" | ||
14 | #include "metafactory.h" | 15 | #include "metafactory.h" |
15 | 16 | ||
16 | static QWidget *factory_serial(QWidget *parent) | ||
17 | { | ||
18 | QFrame *device_frame = new QFrame(parent); | ||
19 | device_frame->setFrameStyle(QFrame::Panel | QFrame::Sunken); | ||
20 | |||
21 | QLabel *frame_device = new QLabel(QObject::tr("Device"), device_frame); | ||
22 | |||
23 | QLineEdit *frame_device_line = new QLineEdit("/dev/ttyS0", device_frame); | ||
24 | |||
25 | QVBoxLayout *vbox_frame = new QVBoxLayout(device_frame, 2); | ||
26 | vbox_frame->add(frame_device); | ||
27 | vbox_frame->add(frame_device_line); | ||
28 | |||
29 | return device_frame; | ||
30 | } | ||
31 | |||
32 | static QWidget *factory_irda(QWidget *parent) | ||
33 | { | ||
34 | QFrame *device_frame = new QFrame(parent); | ||
35 | device_frame->setFrameStyle(QFrame::Panel | QFrame::Sunken); | ||
36 | |||
37 | QLabel *frame_device = new QLabel(QObject::tr("Device"), device_frame); | ||
38 | |||
39 | QLineEdit *frame_device_line = new QLineEdit("/dev/ircomm0", device_frame); | ||
40 | |||
41 | QVBoxLayout *vbox_frame = new QVBoxLayout(device_frame, 2); | ||
42 | vbox_frame->add(frame_device); | ||
43 | vbox_frame->add(frame_device_line); | ||
44 | |||
45 | return device_frame; | ||
46 | } | ||
47 | |||
48 | static QWidget *factory_modem(QWidget *parent) | ||
49 | { | ||
50 | QFrame *device_frame = new QFrame(parent); | ||
51 | device_frame->setFrameStyle(QFrame::Panel | QFrame::Sunken); | ||
52 | |||
53 | QLabel *frame_device = new QLabel(QObject::tr("Device"), device_frame); | ||
54 | QLabel *frame_number = new QLabel(QObject::tr("Phone number"), device_frame); | ||
55 | |||
56 | QLineEdit *frame_device_line = new QLineEdit("/dev/ttyS0", device_frame); | ||
57 | QLineEdit *frame_number_line = new QLineEdit(device_frame); | ||
58 | |||
59 | QVBoxLayout *vbox_frame = new QVBoxLayout(device_frame, 2); | ||
60 | vbox_frame->add(frame_device); | ||
61 | vbox_frame->add(frame_device_line); | ||
62 | vbox_frame->add(frame_number); | ||
63 | vbox_frame->add(frame_number_line); | ||
64 | |||
65 | return device_frame; | ||
66 | } | ||
67 | |||
68 | // Something like that must be called upon plugin_plugin->save() | ||
69 | //void save_modem() | ||
70 | //{ | ||
71 | //// special settings | ||
72 | //p.writeEntry("Device", dlg.conn_device()); | ||
73 | //p.writeEntry("Baud", dlg.conn_baud()); | ||
74 | //p.writeEntry("Parity", dlg.conn_parity()); | ||
75 | //p.writeEntry("DataBits", dlg.conn_databits()); | ||
76 | //p.writeEntry("StopBits", dlg.conn_stopbits()); | ||
77 | //p.writeEntry("Flow", dlg.conn_flow()); | ||
78 | //} | ||
79 | |||
80 | ProfileEditorDialog::ProfileEditorDialog( MetaFactory* fact, | 17 | ProfileEditorDialog::ProfileEditorDialog( MetaFactory* fact, |
@@ -141,4 +78,4 @@ void ProfileEditorDialog::initUI() | |||
141 | 78 | ||
142 | plugin_plugin = m_fact->newConfigWidget("serial", plugin_base); | 79 | plugin_plugin = m_fact->newConfigPlugin("serial", plugin_base, m_prof); |
143 | plugin_layout->add(plugin_plugin); | 80 | plugin_layout->add(plugin_plugin->widget()); |
144 | 81 | ||
@@ -259,4 +196,2 @@ void ProfileEditorDialog::initUI() | |||
259 | 196 | ||
260 | //connect(this, SIGNAL(applyButtonPressed()), SLOT(slotOk())); | ||
261 | connect(this, SIGNAL(defaultButtonPressed()), SLOT(slotOk())); | ||
262 | connect(this, SIGNAL(cancelButtonPressed()), SLOT(slotCancel())); | 197 | connect(this, SIGNAL(cancelButtonPressed()), SLOT(slotCancel())); |
@@ -274,4 +209,4 @@ void ProfileEditorDialog::slotDevice(int id) | |||
274 | 209 | ||
275 | plugin_plugin = m_fact->newConfigWidget(prof_type(), plugin_base); | 210 | plugin_plugin = m_fact->newConfigPlugin(prof_type(), plugin_base, m_prof); |
276 | plugin_layout->add(plugin_plugin); | 211 | plugin_layout->add(plugin_plugin->widget()); |
277 | 212 | ||
@@ -281,4 +216,4 @@ void ProfileEditorDialog::slotDevice(int id) | |||
281 | 216 | ||
282 | plugin_plugin->show(); | 217 | //plugin_plugin->show(); |
283 | // This would be: plugin_plugin->widget()->show(); | 218 | plugin_plugin->widget()->show(); |
284 | } | 219 | } |
@@ -296,3 +231,3 @@ void ProfileEditorDialog::accept() | |||
296 | // Save profile and plugin profile | 231 | // Save profile and plugin profile |
297 | //if(plugin_plugin) plugin_plugin->save(); | 232 | if(plugin_plugin) plugin_plugin->save(); |
298 | 233 | ||