Diffstat (limited to 'noncore/apps/odict/odict.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/odict/odict.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/apps/odict/odict.cpp b/noncore/apps/odict/odict.cpp index d5c6d75..4c99964 100644 --- a/noncore/apps/odict/odict.cpp +++ b/noncore/apps/odict/odict.cpp | |||
@@ -113,103 +113,103 @@ void ODict::lookupLanguageNames( QString dictname ) | |||
113 | Config cfg ( "odict" ); | 113 | Config cfg ( "odict" ); |
114 | cfg.setGroup( "Method_"+dictname ); | 114 | cfg.setGroup( "Method_"+dictname ); |
115 | top_name_content = cfg.readEntry( "Lang1" ); | 115 | top_name_content = cfg.readEntry( "Lang1" ); |
116 | bottom_name_content = cfg.readEntry( "Lang2" ); | 116 | bottom_name_content = cfg.readEntry( "Lang2" ); |
117 | } | 117 | } |
118 | 118 | ||
119 | void ODict::saveConfig() | 119 | void ODict::saveConfig() |
120 | { | 120 | { |
121 | Config cfg ( "odict" ); | 121 | Config cfg ( "odict" ); |
122 | cfg.setGroup( "generalsettings" ); | 122 | cfg.setGroup( "generalsettings" ); |
123 | cfg.writeEntry( "casesens" , casesens ); | 123 | cfg.writeEntry( "casesens" , casesens ); |
124 | cfg.writeEntry( "lastdict" , query_co->currentText() ); | 124 | cfg.writeEntry( "lastdict" , query_co->currentText() ); |
125 | } | 125 | } |
126 | 126 | ||
127 | void ODict::slotStartQuery() | 127 | void ODict::slotStartQuery() |
128 | { | 128 | { |
129 | QString querystring = query_le->text(); | 129 | QString querystring = query_le->text(); |
130 | if ( !querystring.isEmpty() ) | 130 | if ( !querystring.isEmpty() ) |
131 | { | 131 | { |
132 | /* | 132 | /* |
133 | * if the user has not yet defined a dictionary | 133 | * if the user has not yet defined a dictionary |
134 | */ | 134 | */ |
135 | if ( !query_co->currentText() ) | 135 | if ( !query_co->currentText() ) |
136 | { | 136 | { |
137 | switch ( QMessageBox::information( this, tr( "OPIE-Dictionary" ), | 137 | switch ( QMessageBox::information( this, tr( "OPIE-Dictionary" ), |
138 | tr( "No dictionary defined" ), | 138 | tr( "No dictionary defined" ), |
139 | tr( "&Define one" ), | 139 | tr( "&Define one" ), |
140 | tr( "&Cancel" ), | 140 | tr( "&Cancel" ), |
141 | 0, // Define a dict | 141 | 0, // Define a dict |
142 | 1 ) ) // Cancel choosen | 142 | 1 ) ) // Cancel choosen |
143 | { | 143 | { |
144 | case 0: | 144 | case 0: |
145 | slotSettings(); | 145 | slotSettings(); |
146 | break; | 146 | break; |
147 | case 1: // stop here | 147 | case 1: // stop here |
148 | return; | 148 | return; |
149 | } | 149 | } |
150 | } | 150 | } |
151 | 151 | ||
152 | /* | 152 | /* |
153 | * ok, the user has defined a dict | 153 | * ok, the user has defined a dict |
154 | */ | 154 | */ |
155 | ding->setCaseSensitive( casesens ); | 155 | ding->setCaseSensitive( casesens ); |
156 | 156 | ||
157 | BroswerContent test = ding->setText( querystring ); | 157 | BroswerContent test = ding->setText( querystring ); |
158 | 158 | ||
159 | browser_top->setText( test.top ); | 159 | browser_top->setText( test.top ); |
160 | browser_bottom->setText( test.bottom ); | 160 | browser_bottom->setText( test.bottom ); |
161 | } | 161 | } |
162 | } | 162 | } |
163 | 163 | ||
164 | void ODict::slotSettings() | 164 | void ODict::slotSettings() |
165 | { | 165 | { |
166 | ConfigDlg dlg( this, "Config" , true); | 166 | ConfigDlg dlg( this, "Config" , true); |
167 | if ( dlg.exec() == QDialog::Accepted ) | 167 | if ( dlg.exec() == QDialog::Accepted ) |
168 | saveConfig(); | 168 | saveConfig(); |
169 | } | 169 | } |
170 | 170 | ||
171 | void ODict::slotSetParameter( int count ) | 171 | void ODict::slotSetParameter( int count ) |
172 | { | 172 | { |
173 | if ( count == 0 ) | 173 | if ( count == 0 ) |
174 | { | 174 | { |
175 | if ( casesens ) | 175 | if ( casesens ) |
176 | casesens = false; | 176 | casesens = false; |
177 | else | 177 | else |
178 | casesens = true; | 178 | casesens = true; |
179 | } | 179 | } |
180 | 180 | ||
181 | saveConfig(); | 181 | saveConfig(); |
182 | } | 182 | } |
183 | 183 | ||
184 | void ODict::slotMethodChanged( const QString& methodnumber ) | 184 | void ODict::slotMethodChanged( const QString& methodnumber ) |
185 | { | 185 | { |
186 | activated_name = methodnumber; | 186 | activated_name = methodnumber; |
187 | 187 | ||
188 | if ( activated_name != ding->loadedDict() ) | 188 | if ( activated_name != ding->loadedDict() ) |
189 | { | 189 | { |
190 | ding->loadDict(activated_name); | 190 | ding->loadDict(activated_name); |
191 | 191 | ||
192 | lookupLanguageNames( activated_name ); | 192 | lookupLanguageNames( activated_name ); |
193 | top_name->setText( top_name_content ); | 193 | top_name->setText( top_name_content ); |
194 | bottom_name->setText( bottom_name_content ); | 194 | bottom_name->setText( bottom_name_content ); |
195 | } | 195 | } |
196 | } | 196 | } |
197 | 197 | ||
198 | void ODict::setupMenus() | 198 | void ODict::setupMenus() |
199 | { | 199 | { |
200 | menu = new QMenuBar( this ); | 200 | menu = new QMenuBar( this ); |
201 | 201 | ||
202 | settings = new QPopupMenu( menu ); | 202 | settings = new QPopupMenu( menu ); |
203 | setting_a = new QAction(tr( "Configuration" ), Resource::loadPixmap( "new" ), QString::null, 0, this, 0 ); | 203 | setting_a = new QAction(tr( "Configuration" ), Resource::loadPixmap( "new" ), QString::null, 0, this, 0 ); |
204 | connect( setting_a, SIGNAL( activated() ), this, SLOT( slotSettings() ) ); | 204 | connect( setting_a, SIGNAL( activated() ), this, SLOT( slotSettings() ) ); |
205 | setting_a->addTo( settings ); | 205 | setting_a->addTo( settings ); |
206 | setting_b = new QAction(tr( "Searchmethods" ), Resource::loadPixmap( "edit" ), QString::null, 0, this, 0 ); | 206 | setting_b = new QAction(tr( "Searchmethods" ), Resource::loadPixmap( "edit" ), QString::null, 0, this, 0 ); |
207 | 207 | ||
208 | parameter = new QPopupMenu( menu ); | 208 | parameter = new QPopupMenu( menu ); |
209 | connect( parameter, SIGNAL( activated( int ) ), this, SLOT( slotSetParameter( int ) ) ); | 209 | connect( parameter, SIGNAL( activated(int) ), this, SLOT( slotSetParameter(int) ) ); |
210 | parameter->insertItem( tr( "C&ase sensitive" ), 0 ,0 ); | 210 | parameter->insertItem( tr( "C&ase sensitive" ), 0 ,0 ); |
211 | parameter->insertSeparator(); | 211 | parameter->insertSeparator(); |
212 | 212 | ||
213 | menu->insertItem( tr( "Settings" ) , settings ); | 213 | menu->insertItem( tr( "Settings" ) , settings ); |
214 | menu->insertItem( tr( "Parameter" ) , parameter ); | 214 | menu->insertItem( tr( "Parameter" ) , parameter ); |
215 | } | 215 | } |