-rw-r--r-- | noncore/apps/odict/odict.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/noncore/apps/odict/odict.cpp b/noncore/apps/odict/odict.cpp index 497de36..96ba3ae 100644 --- a/noncore/apps/odict/odict.cpp +++ b/noncore/apps/odict/odict.cpp | |||
@@ -9,37 +9,38 @@ | |||
9 | /*************************************************************************** | 9 | /*************************************************************************** |
10 | * * | 10 | * * |
11 | * This program is free software; you can redistribute it and/or modify * | 11 | * This program is free software; you can redistribute it and/or modify * |
12 | * it under the terms of the GNU General Public License as published by * | 12 | * it under the terms of the GNU General Public License as published by * |
13 | * the Free Software Foundation; either version 2 of the License, or * | 13 | * the Free Software Foundation; either version 2 of the License, or * |
14 | * ( at your option ) any later version. * | 14 | * ( at your option ) any later version. * |
15 | * * | 15 | * * |
16 | **************************************************************************/ | 16 | **************************************************************************/ |
17 | #include "odict.h" | 17 | #include "odict.h" |
18 | #include "configdlg.h" | 18 | #include "configdlg.h" |
19 | #include "dingwidget.h" | 19 | #include "dingwidget.h" |
20 | 20 | ||
21 | #include <opie2/oresource.h> | ||
22 | |||
23 | #include <qpe/config.h> | ||
24 | |||
21 | #include <qmenubar.h> | 25 | #include <qmenubar.h> |
22 | #include <qmessagebox.h> | 26 | #include <qmessagebox.h> |
23 | #include <qvbox.h> | 27 | #include <qvbox.h> |
24 | #include <qlabel.h> | 28 | #include <qlabel.h> |
25 | #include <qpushbutton.h> | 29 | #include <qpushbutton.h> |
26 | #include <qlineedit.h> | 30 | #include <qlineedit.h> |
27 | #include <qaction.h> | 31 | #include <qaction.h> |
28 | #include <qtextbrowser.h> | 32 | #include <qtextbrowser.h> |
29 | #include <qcombobox.h> | 33 | #include <qcombobox.h> |
30 | 34 | ||
31 | #include <qpe/resource.h> | ||
32 | #include <qpe/config.h> | ||
33 | |||
34 | ODict::ODict(QWidget* parent, const char* name, WFlags fl ) : QMainWindow(parent, name, fl ) | 35 | ODict::ODict(QWidget* parent, const char* name, WFlags fl ) : QMainWindow(parent, name, fl ) |
35 | { | 36 | { |
36 | activated_name = QString::null; | 37 | activated_name = QString::null; |
37 | 38 | ||
38 | vbox = new QVBox( this ); | 39 | vbox = new QVBox( this ); |
39 | setCaption( tr( "Opie-Dictionary" ) ); | 40 | setCaption( tr( "Opie-Dictionary" ) ); |
40 | setupMenus(); | 41 | setupMenus(); |
41 | 42 | ||
42 | QHBox *hbox = new QHBox( vbox ); | 43 | QHBox *hbox = new QHBox( vbox ); |
43 | QLabel* query_label = new QLabel( tr( "Query:" ) , hbox ); | 44 | QLabel* query_label = new QLabel( tr( "Query:" ) , hbox ); |
44 | query_label->show(); | 45 | query_label->show(); |
45 | query_le = new QLineEdit( hbox ); | 46 | query_le = new QLineEdit( hbox ); |
@@ -193,25 +194,28 @@ void ODict::slotMethodChanged( const QString& methodnumber ) | |||
193 | 194 | ||
194 | lookupLanguageNames( activated_name ); | 195 | lookupLanguageNames( activated_name ); |
195 | top_name->setText( top_name_content ); | 196 | top_name->setText( top_name_content ); |
196 | bottom_name->setText( bottom_name_content ); | 197 | bottom_name->setText( bottom_name_content ); |
197 | } | 198 | } |
198 | } | 199 | } |
199 | 200 | ||
200 | void ODict::setupMenus() | 201 | void ODict::setupMenus() |
201 | { | 202 | { |
202 | menu = new QMenuBar( this ); | 203 | menu = new QMenuBar( this ); |
203 | 204 | ||
204 | settings = new QPopupMenu( menu ); | 205 | settings = new QPopupMenu( menu ); |
205 | setting_a = new QAction(tr( "Configuration" ), Resource::loadPixmap( "new" ), QString::null, 0, this, 0 ); | 206 | setting_a = new QAction( tr( "Configuration" ), |
207 | Opie::Core::OResource::loadPixmap( "SettingsIcon", Opie::Core::OResource::SmallIcon ), | ||
208 | QString::null, 0, this, 0 ); | ||
206 | connect( setting_a, SIGNAL( activated() ), this, SLOT( slotSettings() ) ); | 209 | connect( setting_a, SIGNAL( activated() ), this, SLOT( slotSettings() ) ); |
207 | setting_a->addTo( settings ); | 210 | setting_a->addTo( settings ); |
208 | setting_b = new QAction(tr( "Searchmethods" ), Resource::loadPixmap( "edit" ), QString::null, 0, this, 0 ); | 211 | setting_b = new QAction( tr( "Search methods" ), |
212 | Opie::Core::OResource::loadPixmap( "edit", Opie::Core::OResource::SmallIcon ), | ||
213 | QString::null, 0, this, 0 ); | ||
209 | 214 | ||
210 | parameter = new QPopupMenu( menu ); | 215 | parameter = new QPopupMenu( menu ); |
211 | connect( parameter, SIGNAL( activated(int) ), this, SLOT( slotSetParameter(int) ) ); | 216 | connect( parameter, SIGNAL( activated(int) ), this, SLOT( slotSetParameter(int) ) ); |
212 | parameter->insertItem( tr( "C&ase sensitive" ), 0 ,0 ); | 217 | parameter->insertItem( tr( "Case sensitive" ), 0 ,0 ); |
213 | parameter->insertSeparator(); | ||
214 | 218 | ||
215 | menu->insertItem( tr( "Settings" ) , settings ); | 219 | menu->insertItem( tr( "Settings" ) , settings ); |
216 | menu->insertItem( tr( "Parameter" ) , parameter ); | 220 | menu->insertItem( tr( "Parameter" ) , parameter ); |
217 | } | 221 | } |