From 4fad0b73ae2940099bbb6f20bb94ed1f29e6d05b Mon Sep 17 00:00:00 2001 From: josef Date: Mon, 07 Oct 2002 11:19:00 +0000 Subject: - when editing, replace edited profile instead of inserting new one - now save nearly all settings (not loaded yet) --- (limited to 'noncore/apps/opie-console/profileeditorplugins.cpp') 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 @@ -41,11 +41,11 @@ class ProfileEditorPluginSerial : public ProfileEditorPlugin 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; } @@ -55,7 +55,13 @@ class ProfileEditorPluginSerial : public ProfileEditorPlugin void save() { + // special settings + Profile p = m_profile; + p.writeEntry("Device", device_line->text()); } + + private: + QLineEdit *device_line; }; class ProfileEditorPluginIrda : public ProfileEditorPlugin @@ -80,11 +86,11 @@ class ProfileEditorPluginIrda : public ProfileEditorPlugin 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; } @@ -94,7 +100,13 @@ class ProfileEditorPluginIrda : public ProfileEditorPlugin void save() { + // special settings + Profile p = m_profile; + p.writeEntry("Device", device_line->text()); } + + private: + QLineEdit *device_line; }; class ProfileEditorPluginModem : public ProfileEditorPlugin -- cgit v0.9.0.2