summaryrefslogtreecommitdiff
path: root/noncore/apps/odict/odict.cpp
authorcniehaus <cniehaus>2003-01-03 18:27:56 (UTC)
committer cniehaus <cniehaus>2003-01-03 18:27:56 (UTC)
commitde71690306857498edcf1036123452c7321d1588 (patch) (unidiff)
tree86aa1bf0c375fbba7eca1173c904c726e31182e6 /noncore/apps/odict/odict.cpp
parent7a97cd36cbc4c1a82043cdd44c82f931e2cdbb7f (diff)
downloadopie-de71690306857498edcf1036123452c7321d1588.zip
opie-de71690306857498edcf1036123452c7321d1588.tar.gz
opie-de71690306857498edcf1036123452c7321d1588.tar.bz2
I won't get a nobelprize for this code but at least it works
Diffstat (limited to 'noncore/apps/odict/odict.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/odict/odict.cpp17
1 files changed, 11 insertions, 6 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
@@ -16,37 +16,41 @@
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
37ODict::ODict() : QMainWindow() 39ODict::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() ) );
47 50 browser = new QTextBrowser( vbox );
48 setCentralWidget( hbox ); 51
49 loadConfig(); 52 loadConfig();
53 setCentralWidget( vbox );
50} 54}
51 55
52void ODict::loadConfig() 56void ODict::loadConfig()
@@ -72,12 +76,13 @@ void ODict::saveConfig()
72 76
73void ODict::slotDisplayAbout() 77void 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
78void ODict::slotStartQuery() 82void 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