Diffstat (limited to 'noncore/apps/opie-console/profileeditorplugins.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/profileeditorplugins.cpp | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/noncore/apps/opie-console/profileeditorplugins.cpp b/noncore/apps/opie-console/profileeditorplugins.cpp index 54eee3f..a11d6b0 100644 --- a/noncore/apps/opie-console/profileeditorplugins.cpp +++ b/noncore/apps/opie-console/profileeditorplugins.cpp | |||
@@ -38,27 +38,33 @@ class ProfileEditorPluginSerial : public ProfileEditorPlugin | |||
38 | { | 38 | { |
39 | QFrame *device_frame = new QFrame(m_parent); | 39 | QFrame *device_frame = new QFrame(m_parent); |
40 | device_frame->setFrameStyle(QFrame::Panel | QFrame::Sunken); | 40 | device_frame->setFrameStyle(QFrame::Panel | QFrame::Sunken); |
41 | 41 | ||
42 | QLabel *frame_device = new QLabel(QObject::tr("Device"), device_frame); | 42 | QLabel *frame_device = new QLabel(QObject::tr("Device"), device_frame); |
43 | 43 | ||
44 | QLineEdit *frame_device_line = new QLineEdit("/dev/ttyS0", device_frame); | 44 | device_line = new QLineEdit("/dev/ttyS0", device_frame); |
45 | 45 | ||
46 | QVBoxLayout *vbox_frame = new QVBoxLayout(device_frame, 2); | 46 | QVBoxLayout *vbox_frame = new QVBoxLayout(device_frame, 2); |
47 | vbox_frame->add(frame_device); | 47 | vbox_frame->add(frame_device); |
48 | vbox_frame->add(frame_device_line); | 48 | vbox_frame->add(device_line); |
49 | 49 | ||
50 | m_widget = device_frame; | 50 | m_widget = device_frame; |
51 | } | 51 | } |
52 | 52 | ||
53 | return m_widget; | 53 | return m_widget; |
54 | } | 54 | } |
55 | 55 | ||
56 | void save() | 56 | void save() |
57 | { | 57 | { |
58 | // special settings | ||
59 | Profile p = m_profile; | ||
60 | p.writeEntry("Device", device_line->text()); | ||
58 | } | 61 | } |
62 | |||
63 | private: | ||
64 | QLineEdit *device_line; | ||
59 | }; | 65 | }; |
60 | 66 | ||
61 | class ProfileEditorPluginIrda : public ProfileEditorPlugin | 67 | class ProfileEditorPluginIrda : public ProfileEditorPlugin |
62 | { | 68 | { |
63 | public: | 69 | public: |
64 | 70 | ||
@@ -77,27 +83,33 @@ class ProfileEditorPluginIrda : public ProfileEditorPlugin | |||
77 | { | 83 | { |
78 | QFrame *device_frame = new QFrame(m_parent); | 84 | QFrame *device_frame = new QFrame(m_parent); |
79 | device_frame->setFrameStyle(QFrame::Panel | QFrame::Sunken); | 85 | device_frame->setFrameStyle(QFrame::Panel | QFrame::Sunken); |
80 | 86 | ||
81 | QLabel *frame_device = new QLabel(QObject::tr("Device"), device_frame); | 87 | QLabel *frame_device = new QLabel(QObject::tr("Device"), device_frame); |
82 | 88 | ||
83 | QLineEdit *frame_device_line = new QLineEdit("/dev/ircomm0", device_frame); | 89 | device_line = new QLineEdit("/dev/ircomm0", device_frame); |
84 | 90 | ||
85 | QVBoxLayout *vbox_frame = new QVBoxLayout(device_frame, 2); | 91 | QVBoxLayout *vbox_frame = new QVBoxLayout(device_frame, 2); |
86 | vbox_frame->add(frame_device); | 92 | vbox_frame->add(frame_device); |
87 | vbox_frame->add(frame_device_line); | 93 | vbox_frame->add(device_line); |
88 | 94 | ||
89 | m_widget = device_frame; | 95 | m_widget = device_frame; |
90 | } | 96 | } |
91 | 97 | ||
92 | return m_widget; | 98 | return m_widget; |
93 | } | 99 | } |
94 | 100 | ||
95 | void save() | 101 | void save() |
96 | { | 102 | { |
103 | // special settings | ||
104 | Profile p = m_profile; | ||
105 | p.writeEntry("Device", device_line->text()); | ||
97 | } | 106 | } |
107 | |||
108 | private: | ||
109 | QLineEdit *device_line; | ||
98 | }; | 110 | }; |
99 | 111 | ||
100 | class ProfileEditorPluginModem : public ProfileEditorPlugin | 112 | class ProfileEditorPluginModem : public ProfileEditorPlugin |
101 | { | 113 | { |
102 | public: | 114 | public: |
103 | 115 | ||