Diffstat (limited to 'noncore/apps/opie-console/configdialog.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/configdialog.cpp | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/noncore/apps/opie-console/configdialog.cpp b/noncore/apps/opie-console/configdialog.cpp index d09cec3..23e94b1 100644 --- a/noncore/apps/opie-console/configdialog.cpp +++ b/noncore/apps/opie-console/configdialog.cpp @@ -65,5 +65,10 @@ void ConfigDialog::slotRemove() { void ConfigDialog::slotEdit() { - ProfileEditorDialog dlg(new MetaFactory()); + Profile p; + + // Load profile + // p = currentItem()->profile(); + + ProfileEditorDialog dlg(new MetaFactory(), p); dlg.setCaption("Edit Connection Profile"); @@ -81,6 +86,4 @@ void ConfigDialog::slotEdit() { void ConfigDialog::slotAdd() { - qWarning("ConfigDialog::slotAdd"); - ProfileEditorDialog dlg(new MetaFactory()); @@ -91,21 +94,11 @@ void ConfigDialog::slotAdd() { if(ret == QDialog::Accepted) { - // defaults - int profile = Profile::VT102; - + // TODO: Move into general profile save part // assignments - QString type = dlg.term_type(); - if(type == "VT102") profile = Profile::VT102; - - // new profile - Profile p(dlg.prof_name(), dlg.prof_type(), Profile::White, Profile::Black, profile); - - // special settings - p.writeEntry("Device", dlg.conn_device()); - p.writeEntry("Baud", dlg.conn_baud()); - p.writeEntry("Parity", dlg.conn_parity()); - p.writeEntry("DataBits", dlg.conn_databits()); - p.writeEntry("StopBits", dlg.conn_stopbits()); - p.writeEntry("Flow", dlg.conn_flow()); + //QString type = dlg.term_type(); + //if(type == "VT102") profile = Profile::VT102; + + // get profile from editor + Profile p = dlg.profile(); new ConfigListItem(lstView, p); |