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 @@ -32,78 +32,90 @@ class ProfileEditorPluginSerial : public ProfileEditorPlugin { } QWidget *widget() { if(!m_widget) { QFrame *device_frame = new QFrame(m_parent); device_frame->setFrameStyle(QFrame::Panel | QFrame::Sunken); QLabel *frame_device = new QLabel(QObject::tr("Device"), device_frame); - QLineEdit *frame_device_line = new QLineEdit("/dev/ttyS0", device_frame); + device_line = new QLineEdit("/dev/ttyS0", device_frame); QVBoxLayout *vbox_frame = new QVBoxLayout(device_frame, 2); vbox_frame->add(frame_device); - vbox_frame->add(frame_device_line); + vbox_frame->add(device_line); m_widget = device_frame; } return m_widget; } void save() { + // special settings + Profile p = m_profile; + p.writeEntry("Device", device_line->text()); } + + private: + QLineEdit *device_line; }; class ProfileEditorPluginIrda : public ProfileEditorPlugin { public: ProfileEditorPluginIrda(QWidget *parent, Profile p) : ProfileEditorPlugin(parent, p) { } ~ProfileEditorPluginIrda() { } QWidget *widget() { if(!m_widget) { QFrame *device_frame = new QFrame(m_parent); device_frame->setFrameStyle(QFrame::Panel | QFrame::Sunken); QLabel *frame_device = new QLabel(QObject::tr("Device"), device_frame); - QLineEdit *frame_device_line = new QLineEdit("/dev/ircomm0", device_frame); + device_line = new QLineEdit("/dev/ircomm0", device_frame); QVBoxLayout *vbox_frame = new QVBoxLayout(device_frame, 2); vbox_frame->add(frame_device); - vbox_frame->add(frame_device_line); + vbox_frame->add(device_line); m_widget = device_frame; } return m_widget; } void save() { + // special settings + Profile p = m_profile; + p.writeEntry("Device", device_line->text()); } + + private: + QLineEdit *device_line; }; class ProfileEditorPluginModem : public ProfileEditorPlugin { public: ProfileEditorPluginModem(QWidget *parent, Profile p) : ProfileEditorPlugin(parent, p) { } ~ProfileEditorPluginModem() |