From 2736ce30d565270495050cec2831d3f31b5c90a0 Mon Sep 17 00:00:00 2001 From: cniehaus Date: Wed, 01 Jan 2003 19:11:32 +0000 Subject: load the methods --- diff --git a/noncore/apps/odict/configdlg.cpp b/noncore/apps/odict/configdlg.cpp index 0f33ee8..33296e3 100644 --- a/noncore/apps/odict/configdlg.cpp +++ b/noncore/apps/odict/configdlg.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include @@ -42,12 +43,12 @@ ConfigDlg::ConfigDlg(QWidget *parent, const char *name, bool modal) : QDialog(pa /*searchmethods*/ search_tab = new QWidget( tab , "search_tab" ); - loadSearchMethodNames(); QVBoxLayout *vbox_layout_searchtab = new QVBoxLayout( search_tab, 4 , 4 ,"blah" ); QHBox *hbox = new QHBox( search_tab ); list = new QListView( hbox ); list->addColumn( tr( "Searchmethod" ) ); + loadSearchMethodNames(); QVBox *vbox = new QVBox( hbox ); new_button = new QPushButton( "New" , vbox ); @@ -107,8 +108,12 @@ void ConfigDlg::slotDeleteMethod() void ConfigDlg::loadSearchMethodNames() { - QListViewItem *item = new QListViewItem( list); Config cfg( "odict" ); -//X cfg.setGroup( itemName ); -//X QString temp = cfg.readEntry( "Seperator" ); + QStringList groupListCfg = cfg.groupList().grep( "Method_" ); + for ( QStringList::Iterator it = groupListCfg.begin() ; it != groupListCfg.end() ; ++it ) + { + QListViewItem *item = new QListViewItem( list ); + cfg.setGroup( *it ); + item->setText( 0 , cfg.readEntry( "Name" ) ); + } } -- cgit v0.9.0.2