author | cniehaus <cniehaus> | 2003-01-03 18:27:56 (UTC) |
---|---|---|
committer | cniehaus <cniehaus> | 2003-01-03 18:27:56 (UTC) |
commit | de71690306857498edcf1036123452c7321d1588 (patch) (side-by-side diff) | |
tree | 86aa1bf0c375fbba7eca1173c904c726e31182e6 /noncore/apps/odict/odict.cpp | |
parent | 7a97cd36cbc4c1a82043cdd44c82f931e2cdbb7f (diff) | |
download | opie-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.cpp | 17 |
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 @@ -13,43 +13,47 @@ * the Free Software Foundation; either version 2 of the License, or * * ( at your option ) any later version. * * * **************************************************************************/ #include "odict.h" #include "configdlg.h" +#include "dingwidget.h" -#include <opie/otabwidget.h> - +#include <qlayout.h> #include <qpopupmenu.h> #include <qmenubar.h> #include <qmessagebox.h> #include <qpe/config.h> #include <qhbox.h> +#include <qvbox.h> #include <qlabel.h> #include <qpushbutton.h> #include <qlineedit.h> #include <qmainwindow.h> #include <qstring.h> #include <qaction.h> +#include <qtextbrowser.h> #include <qpe/resource.h> ODict::ODict() : QMainWindow() { + vbox = new QVBox( this ); setCaption( tr( "OPIE-Dictionary" ) ); setupMenus(); - QHBox *hbox = new QHBox( this ); + QHBox *hbox = new QHBox( vbox ); QLabel* query_label = new QLabel( tr( "Query:" ) , hbox ); query_label->show(); query_le = new QLineEdit( hbox ); ok_button = new QPushButton( tr( "&Ok" ), hbox ); connect( ok_button, SIGNAL( released() ), this, SLOT( slotStartQuery() ) ); - - setCentralWidget( hbox ); + browser = new QTextBrowser( vbox ); + loadConfig(); + setCentralWidget( vbox ); } void ODict::loadConfig() { Config cfg ( "odict" ); cfg.setGroup( "generalsettings" ); @@ -69,18 +73,19 @@ void ODict::saveConfig() cfg.writeEntry( "regexp" , regexp ); cfg.writeEntry( "completewords" , completewords ); } void ODict::slotDisplayAbout() { - QMessageBox::about( this, tr( "About ODict" ), tr( "OPIE-Dictionary ODict \n (c) 2002, 2003 Carsten Niehaus \n cniehaus@handhelds.org \n Version 20021230" ) ); + QMessageBox::about( this, tr( "About ODict" ), tr( "OPIE-Dictionary ODict \n (c) 2002, 2003 Carsten Niehaus \n cniehaus@handhelds.org \n Version 20030103" ) ); } void ODict::slotStartQuery() { QString querystring = query_le->text(); + DingWidget *ding = new DingWidget( vbox , querystring , browser); } void ODict::slotSetErrorcount( int count ) { errorTol = count; |