Diffstat (limited to 'noncore/apps/odict/configdlg.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/odict/configdlg.cpp | 23 |
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 @@ -28,2 +28,3 @@ #include <qpushbutton.h> +#include <qlineedit.h> @@ -48,4 +49,2 @@ ConfigDlg::ConfigDlg(QWidget *parent, const char *name, bool modal) : QDialog(pa list->addColumn( tr( "Searchmethod" ) ); - QListViewItem *item = new QListViewItem( list ); - item->setText( 0, "foofooofoofoof" ); @@ -77,5 +76,5 @@ void ConfigDlg::slotNewMethod() { - //dlg.saveItem(); + dlg.saveItem(); QListViewItem *item = new QListViewItem( list ); - item->setText( 0 , dlg.itemName ); + item->setText( 0 , dlg.nameLE->text() ); } @@ -84,3 +83,17 @@ void ConfigDlg::slotNewMethod() -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" ); +} |