Diffstat (limited to 'noncore/apps/odict/odict.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/odict/odict.cpp | 37 |
1 files changed, 6 insertions, 31 deletions
diff --git a/noncore/apps/odict/odict.cpp b/noncore/apps/odict/odict.cpp index 0745f53..c1de6ac 100644 --- a/noncore/apps/odict/odict.cpp +++ b/noncore/apps/odict/odict.cpp | |||
@@ -23,5 +23,4 @@ | |||
23 | #include <qmenubar.h> | 23 | #include <qmenubar.h> |
24 | #include <qmessagebox.h> | 24 | #include <qmessagebox.h> |
25 | #include <qpe/config.h> | ||
26 | #include <qhbox.h> | 25 | #include <qhbox.h> |
27 | #include <qvbox.h> | 26 | #include <qvbox.h> |
@@ -36,5 +35,5 @@ | |||
36 | 35 | ||
37 | #include <qpe/resource.h> | 36 | #include <qpe/resource.h> |
38 | 37 | #include <qpe/config.h> | |
39 | 38 | ||
40 | ODict::ODict() : QMainWindow() | 39 | ODict::ODict() : QMainWindow() |
@@ -64,5 +63,5 @@ ODict::ODict() : QMainWindow() | |||
64 | ding = new DingWidget(); | 63 | ding = new DingWidget(); |
65 | ding->loadValues(); | 64 | ding->loadValues(); |
66 | 65 | ||
67 | loadConfig(); | 66 | loadConfig(); |
68 | setCentralWidget( vbox ); | 67 | setCentralWidget( vbox ); |
@@ -80,5 +79,4 @@ void ODict::loadConfig() | |||
80 | casesens = cfg.readEntry( "casesens" ).toInt(); | 79 | casesens = cfg.readEntry( "casesens" ).toInt(); |
81 | regexp = cfg.readEntry( "regexp" ).toInt(); | 80 | regexp = cfg.readEntry( "regexp" ).toInt(); |
82 | completewords = cfg.readEntry( "completewords" ).toInt(); | ||
83 | 81 | ||
84 | QString lastDict = cfg.readEntry( "lastdict" ); | 82 | QString lastDict = cfg.readEntry( "lastdict" ); |
@@ -110,4 +108,5 @@ void ODict::loadConfig() | |||
110 | 108 | ||
111 | lookupLanguageNames( lastname ); | 109 | lookupLanguageNames( lastname ); |
110 | ding->loadDict( lastname ); | ||
112 | 111 | ||
113 | query_co->setCurrentItem( e ); | 112 | query_co->setCurrentItem( e ); |
@@ -130,5 +129,4 @@ void ODict::saveConfig() | |||
130 | cfg.writeEntry( "casesens" , casesens ); | 129 | cfg.writeEntry( "casesens" , casesens ); |
131 | cfg.writeEntry( "regexp" , regexp ); | 130 | cfg.writeEntry( "regexp" , regexp ); |
132 | cfg.writeEntry( "completewords" , completewords ); | ||
133 | cfg.writeEntry( "lastdict" , query_co->currentText() ); | 131 | cfg.writeEntry( "lastdict" , query_co->currentText() ); |
134 | } | 132 | } |
@@ -136,6 +134,4 @@ void ODict::saveConfig() | |||
136 | void ODict::slotStartQuery() | 134 | void ODict::slotStartQuery() |
137 | { | 135 | { |
138 | qDebug( "bin in slotStartQuery()" ); | ||
139 | |||
140 | QString querystring = query_le->text(); | 136 | QString querystring = query_le->text(); |
141 | if ( !querystring.isEmpty() ) | 137 | if ( !querystring.isEmpty() ) |
@@ -150,5 +146,5 @@ void ODict::slotStartQuery() | |||
150 | tr( "&Define one" ), | 146 | tr( "&Define one" ), |
151 | tr( "&Cancel" ), | 147 | tr( "&Cancel" ), |
152 | 0, // Define a dict choosen | 148 | 0, // Define a dict |
153 | 1 ) ) // Cancel choosen | 149 | 1 ) ) // Cancel choosen |
154 | { | 150 | { |
@@ -165,21 +161,7 @@ void ODict::slotStartQuery() | |||
165 | */ | 161 | */ |
166 | ding->setCaseSensitive( casesens ); | 162 | ding->setCaseSensitive( casesens ); |
167 | ding->setCompleteWord( completewords ); | ||
168 | |||
169 | qDebug( "activated_name ist:" ); | ||
170 | qDebug( activated_name ); | ||
171 | |||
172 | ding->setDict( activated_name ); | ||
173 | |||
174 | //X if ( activated_name != ding->loadedDict() ) | ||
175 | ding->loadDict(activated_name); | ||
176 | 163 | ||
177 | BroswerContent test = ding->setText( querystring ); | 164 | BroswerContent test = ding->setText( querystring ); |
178 | 165 | ||
179 | qDebug( querystring ); | ||
180 | if ( ding->isCaseSensitive ) | ||
181 | qDebug( "ist CS"); | ||
182 | else qDebug( "kein CS" ); | ||
183 | |||
184 | browser_top->setText( test.top ); | 166 | browser_top->setText( test.top ); |
185 | browser_bottom->setText( test.bottom ); | 167 | browser_bottom->setText( test.bottom ); |
@@ -206,11 +188,4 @@ void ODict::slotSetParameter( int count ) | |||
206 | if ( count == 1 ) | 188 | if ( count == 1 ) |
207 | { | 189 | { |
208 | if ( completewords ) | ||
209 | completewords = false; | ||
210 | else | ||
211 | completewords = true; | ||
212 | } | ||
213 | if ( count == 2 ) | ||
214 | { | ||
215 | if ( regexp ) | 190 | if ( regexp ) |
216 | regexp = false; | 191 | regexp = false; |
@@ -227,6 +202,7 @@ void ODict::slotMethodChanged( const QString& methodnumber ) | |||
227 | qDebug( "activated_name in slotMethodChanged() ist:" ); | 202 | qDebug( "activated_name in slotMethodChanged() ist:" ); |
228 | qDebug( activated_name ); | 203 | qDebug( activated_name ); |
204 | qDebug( ding->loadedDict() ); | ||
229 | 205 | ||
230 | //X if ( activated_name != ding->loadedDict() ) | 206 | if ( activated_name != ding->loadedDict() ) |
231 | { | 207 | { |
232 | ding->loadDict(activated_name); | 208 | ding->loadDict(activated_name); |
@@ -251,5 +227,4 @@ void ODict::setupMenus() | |||
251 | connect( parameter, SIGNAL( activated( int ) ), this, SLOT( slotSetParameter( int ) ) ); | 227 | connect( parameter, SIGNAL( activated( int ) ), this, SLOT( slotSetParameter( int ) ) ); |
252 | parameter->insertItem( tr( "C&ase sensitive" ), 0 ,0 ); | 228 | parameter->insertItem( tr( "C&ase sensitive" ), 0 ,0 ); |
253 | parameter->insertItem( tr( "Only &complete Words" ), 1 , 1) ; | ||
254 | parameter->insertItem( tr( "Allow ®. expressions" ), 2 ); | 229 | parameter->insertItem( tr( "Allow ®. expressions" ), 2 ); |
255 | parameter->insertSeparator(); | 230 | parameter->insertSeparator(); |