-rw-r--r-- | noncore/apps/odict/odict.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/noncore/apps/odict/odict.cpp b/noncore/apps/odict/odict.cpp index 0412807..6c03ce3 100644 --- a/noncore/apps/odict/odict.cpp +++ b/noncore/apps/odict/odict.cpp | |||
@@ -13,43 +13,47 @@ | |||
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 | 20 | ||
20 | #include <opie/otabwidget.h> | 21 | #include <qlayout.h> |
21 | |||
22 | #include <qpopupmenu.h> | 22 | #include <qpopupmenu.h> |
23 | #include <qmenubar.h> | 23 | #include <qmenubar.h> |
24 | #include <qmessagebox.h> | 24 | #include <qmessagebox.h> |
25 | #include <qpe/config.h> | 25 | #include <qpe/config.h> |
26 | #include <qhbox.h> | 26 | #include <qhbox.h> |
27 | #include <qvbox.h> | ||
27 | #include <qlabel.h> | 28 | #include <qlabel.h> |
28 | #include <qpushbutton.h> | 29 | #include <qpushbutton.h> |
29 | #include <qlineedit.h> | 30 | #include <qlineedit.h> |
30 | #include <qmainwindow.h> | 31 | #include <qmainwindow.h> |
31 | #include <qstring.h> | 32 | #include <qstring.h> |
32 | #include <qaction.h> | 33 | #include <qaction.h> |
34 | #include <qtextbrowser.h> | ||
33 | 35 | ||
34 | #include <qpe/resource.h> | 36 | #include <qpe/resource.h> |
35 | 37 | ||
36 | 38 | ||
37 | ODict::ODict() : QMainWindow() | 39 | ODict::ODict() : QMainWindow() |
38 | { | 40 | { |
41 | vbox = new QVBox( this ); | ||
39 | setCaption( tr( "OPIE-Dictionary" ) ); | 42 | setCaption( tr( "OPIE-Dictionary" ) ); |
40 | setupMenus(); | 43 | setupMenus(); |
41 | 44 | ||
42 | QHBox *hbox = new QHBox( this ); | 45 | QHBox *hbox = new QHBox( vbox ); |
43 | QLabel* query_label = new QLabel( tr( "Query:" ) , hbox ); query_label->show(); | 46 | QLabel* query_label = new QLabel( tr( "Query:" ) , hbox ); query_label->show(); |
44 | query_le = new QLineEdit( hbox ); | 47 | query_le = new QLineEdit( hbox ); |
45 | ok_button = new QPushButton( tr( "&Ok" ), hbox ); | 48 | ok_button = new QPushButton( tr( "&Ok" ), hbox ); |
46 | connect( ok_button, SIGNAL( released() ), this, SLOT( slotStartQuery() ) ); | 49 | connect( ok_button, SIGNAL( released() ), this, SLOT( slotStartQuery() ) ); |
50 | browser = new QTextBrowser( vbox ); | ||
47 | 51 | ||
48 | setCentralWidget( hbox ); | ||
49 | loadConfig(); | 52 | loadConfig(); |
53 | setCentralWidget( vbox ); | ||
50 | } | 54 | } |
51 | 55 | ||
52 | void ODict::loadConfig() | 56 | void ODict::loadConfig() |
53 | { | 57 | { |
54 | Config cfg ( "odict" ); | 58 | Config cfg ( "odict" ); |
55 | cfg.setGroup( "generalsettings" ); | 59 | cfg.setGroup( "generalsettings" ); |
@@ -69,18 +73,19 @@ void ODict::saveConfig() | |||
69 | cfg.writeEntry( "regexp" , regexp ); | 73 | cfg.writeEntry( "regexp" , regexp ); |
70 | cfg.writeEntry( "completewords" , completewords ); | 74 | cfg.writeEntry( "completewords" , completewords ); |
71 | } | 75 | } |
72 | 76 | ||
73 | void ODict::slotDisplayAbout() | 77 | void ODict::slotDisplayAbout() |
74 | { | 78 | { |
75 | QMessageBox::about( this, tr( "About ODict" ), tr( "OPIE-Dictionary ODict \n (c) 2002, 2003 Carsten Niehaus \n cniehaus@handhelds.org \n Version 20021230" ) ); | 79 | QMessageBox::about( this, tr( "About ODict" ), tr( "OPIE-Dictionary ODict \n (c) 2002, 2003 Carsten Niehaus \n cniehaus@handhelds.org \n Version 20030103" ) ); |
76 | } | 80 | } |
77 | 81 | ||
78 | void ODict::slotStartQuery() | 82 | void ODict::slotStartQuery() |
79 | { | 83 | { |
80 | QString querystring = query_le->text(); | 84 | QString querystring = query_le->text(); |
85 | DingWidget *ding = new DingWidget( vbox , querystring , browser); | ||
81 | } | 86 | } |
82 | 87 | ||
83 | 88 | ||
84 | void ODict::slotSetErrorcount( int count ) | 89 | void ODict::slotSetErrorcount( int count ) |
85 | { | 90 | { |
86 | errorTol = count; | 91 | errorTol = count; |