summaryrefslogtreecommitdiff
path: root/noncore/apps/odict/configdlg.cpp
Side-by-side diff
Diffstat (limited to 'noncore/apps/odict/configdlg.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/odict/configdlg.cpp23
1 files changed, 18 insertions, 5 deletions
diff --git a/noncore/apps/odict/configdlg.cpp b/noncore/apps/odict/configdlg.cpp
index 75dc735..2056457 100644
--- a/noncore/apps/odict/configdlg.cpp
+++ b/noncore/apps/odict/configdlg.cpp
@@ -27,4 +27,5 @@
#include <qlistview.h>
#include <qpushbutton.h>
+#include <qlineedit.h>
#include <opie/otabwidget.h>
@@ -47,6 +48,4 @@ ConfigDlg::ConfigDlg(QWidget *parent, const char *name, bool modal) : QDialog(pa
list = new QListView( hbox );
list->addColumn( tr( "Searchmethod" ) );
- QListViewItem *item = new QListViewItem( list );
- item->setText( 0, "foofooofoofoof" );
QVBox *vbox = new QVBox( hbox );
@@ -76,12 +75,26 @@ void ConfigDlg::slotNewMethod()
if ( dlg.exec() == QDialog::Accepted )
{
- //dlg.saveItem();
+ dlg.saveItem();
QListViewItem *item = new QListViewItem( list );
- item->setText( 0 , dlg.itemName );
+ item->setText( 0 , dlg.nameLE->text() );
}
else qDebug( "SearchMethodDlg abgebrochen" );
}
-void ConfigDlg::slotChangeMethod(){}
+void ConfigDlg::slotChangeMethod()
+{
+ if ( list->selectedItem() )
+ {
+ SearchMethodDlg dlg( this, "SearchMethodDlg", true, list->selectedItem()->text( 0 ) );
+ if ( dlg.exec() == QDialog::Accepted )
+ {
+ dlg.saveItem();
+ QListViewItem *item = new QListViewItem( list );
+ item->setText( 0 , dlg.nameLE->text() );
+ }
+ else qDebug( "SearchMethodDlg abgebrochen" );
+ }
+ else qDebug( "kein item angewählt" );
+}
void ConfigDlg::slotDeleteMethod()