summaryrefslogtreecommitdiff
path: root/noncore/apps/odict/configdlg.cpp
Unidiff
Diffstat (limited to 'noncore/apps/odict/configdlg.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/odict/configdlg.cpp13
1 files changed, 9 insertions, 4 deletions
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 @@
27#include <qlistview.h> 27#include <qlistview.h>
28#include <qpushbutton.h> 28#include <qpushbutton.h>
29#include <qlineedit.h> 29#include <qlineedit.h>
30#include <qstringlist.h>
30 31
31#include <opie/otabwidget.h> 32#include <opie/otabwidget.h>
32 33
@@ -42,12 +43,12 @@ ConfigDlg::ConfigDlg(QWidget *parent, const char *name, bool modal) : QDialog(pa
42 43
43 /*searchmethods*/ 44 /*searchmethods*/
44 search_tab = new QWidget( tab , "search_tab" ); 45 search_tab = new QWidget( tab , "search_tab" );
45 loadSearchMethodNames();
46 QVBoxLayout *vbox_layout_searchtab = new QVBoxLayout( search_tab, 4 , 4 ,"blah" ); 46 QVBoxLayout *vbox_layout_searchtab = new QVBoxLayout( search_tab, 4 , 4 ,"blah" );
47 47
48 QHBox *hbox = new QHBox( search_tab ); 48 QHBox *hbox = new QHBox( search_tab );
49 list = new QListView( hbox ); 49 list = new QListView( hbox );
50 list->addColumn( tr( "Searchmethod" ) ); 50 list->addColumn( tr( "Searchmethod" ) );
51 loadSearchMethodNames();
51 52
52 QVBox *vbox = new QVBox( hbox ); 53 QVBox *vbox = new QVBox( hbox );
53 new_button = new QPushButton( "New" , vbox ); 54 new_button = new QPushButton( "New" , vbox );
@@ -107,8 +108,12 @@ void ConfigDlg::slotDeleteMethod()
107 108
108void ConfigDlg::loadSearchMethodNames() 109void ConfigDlg::loadSearchMethodNames()
109{ 110{
110 QListViewItem *item = new QListViewItem( list);
111 Config cfg( "odict" ); 111 Config cfg( "odict" );
112 //X cfg.setGroup( itemName ); 112 QStringList groupListCfg = cfg.groupList().grep( "Method_" );
113 //X QString temp = cfg.readEntry( "Seperator" ); 113 for ( QStringList::Iterator it = groupListCfg.begin() ; it != groupListCfg.end() ; ++it )
114 {
115 QListViewItem *item = new QListViewItem( list );
116 cfg.setGroup( *it );
117 item->setText( 0 , cfg.readEntry( "Name" ) );
118 }
114} 119}