Diffstat (limited to 'noncore/apps/odict/odict.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/odict/odict.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/noncore/apps/odict/odict.cpp b/noncore/apps/odict/odict.cpp index 166f6b9..7de9169 100644 --- a/noncore/apps/odict/odict.cpp +++ b/noncore/apps/odict/odict.cpp | |||
@@ -29,12 +29,13 @@ | |||
29 | #include <qpushbutton.h> | 29 | #include <qpushbutton.h> |
30 | #include <qlineedit.h> | 30 | #include <qlineedit.h> |
31 | #include <qmainwindow.h> | 31 | #include <qmainwindow.h> |
32 | #include <qstring.h> | 32 | #include <qstring.h> |
33 | #include <qaction.h> | 33 | #include <qaction.h> |
34 | #include <qtextbrowser.h> | 34 | #include <qtextbrowser.h> |
35 | #include <qcombobox.h> | ||
35 | 36 | ||
36 | #include <qpe/resource.h> | 37 | #include <qpe/resource.h> |
37 | 38 | ||
38 | 39 | ||
39 | ODict::ODict() : QMainWindow() | 40 | ODict::ODict() : QMainWindow() |
40 | { | 41 | { |
@@ -42,12 +43,13 @@ ODict::ODict() : QMainWindow() | |||
42 | setCaption( tr( "OPIE-Dictionary" ) ); | 43 | setCaption( tr( "OPIE-Dictionary" ) ); |
43 | setupMenus(); | 44 | setupMenus(); |
44 | 45 | ||
45 | QHBox *hbox = new QHBox( vbox ); | 46 | QHBox *hbox = new QHBox( vbox ); |
46 | QLabel* query_label = new QLabel( tr( "Query:" ) , hbox ); query_label->show(); | 47 | QLabel* query_label = new QLabel( tr( "Query:" ) , hbox ); query_label->show(); |
47 | query_le = new QLineEdit( hbox ); | 48 | query_le = new QLineEdit( hbox ); |
49 | query_co = new QComboBox( hbox ); | ||
48 | ok_button = new QPushButton( tr( "&Ok" ), hbox ); | 50 | ok_button = new QPushButton( tr( "&Ok" ), hbox ); |
49 | connect( ok_button, SIGNAL( released() ), this, SLOT( slotStartQuery() ) ); | 51 | connect( ok_button, SIGNAL( released() ), this, SLOT( slotStartQuery() ) ); |
50 | browser_top = new QTextBrowser( vbox ); | 52 | browser_top = new QTextBrowser( vbox ); |
51 | browser_bottom = new QTextBrowser( vbox ); | 53 | browser_bottom = new QTextBrowser( vbox ); |
52 | 54 | ||
53 | loadConfig(); | 55 | loadConfig(); |
@@ -59,12 +61,19 @@ void ODict::loadConfig() | |||
59 | Config cfg ( "odict" ); | 61 | Config cfg ( "odict" ); |
60 | cfg.setGroup( "generalsettings" ); | 62 | cfg.setGroup( "generalsettings" ); |
61 | errorTol = cfg.readEntry( "errtol" ).toInt(); | 63 | errorTol = cfg.readEntry( "errtol" ).toInt(); |
62 | casesens = cfg.readEntry( "casesens" ).toInt(); | 64 | casesens = cfg.readEntry( "casesens" ).toInt(); |
63 | regexp = cfg.readEntry( "regexp" ).toInt(); | 65 | regexp = cfg.readEntry( "regexp" ).toInt(); |
64 | completewords = cfg.readEntry( "completewords" ).toInt(); | 66 | completewords = cfg.readEntry( "completewords" ).toInt(); |
67 | |||
68 | QStringList groupListCfg = cfg.groupList().grep( "Method_" ); | ||
69 | for ( QStringList::Iterator it = groupListCfg.begin() ; it != groupListCfg.end() ; ++it ) | ||
70 | { | ||
71 | cfg.setGroup( *it ); | ||
72 | query_co->insertItem( cfg.readEntry( "Name" ) ); | ||
73 | } | ||
65 | } | 74 | } |
66 | 75 | ||
67 | 76 | ||
68 | void ODict::saveConfig() | 77 | void ODict::saveConfig() |
69 | { | 78 | { |
70 | Config cfg ( "odict" ); | 79 | Config cfg ( "odict" ); |