Diffstat (limited to 'noncore/apps/odict/odict.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/odict/odict.cpp | 55 |
1 files changed, 42 insertions, 13 deletions
diff --git a/noncore/apps/odict/odict.cpp b/noncore/apps/odict/odict.cpp index 6f176f9..549c40a 100644 --- a/noncore/apps/odict/odict.cpp +++ b/noncore/apps/odict/odict.cpp @@ -41,4 +41,4 @@ ODict::ODict() : QMainWindow() { - activated_name = QString::null; + vbox = new QVBox( this ); @@ -46,2 +46,3 @@ ODict::ODict() : QMainWindow() setupMenus(); + @@ -57,2 +58,4 @@ ODict::ODict() : QMainWindow() + ding = new DingWidget(); + loadConfig(); @@ -77,2 +80,3 @@ void ODict::loadConfig() } + slotMethodChanged(1 ); //FIXME: this line should not contain a integer } @@ -92,3 +96,3 @@ 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 20030104" ) ); + QMessageBox::about( this, tr( "About ODict" ), tr( "OPIE-Dictionary ODict \n (c) 2002, 2003 Carsten Niehaus \n cniehaus@handhelds.org \n Version 20030108" ) ); } @@ -98,12 +102,37 @@ void ODict::slotStartQuery() QString querystring = query_le->text(); - qDebug("opening dict >%s< for >%s<", activated_name.latin1(),querystring.latin1()); - if (querystring.isEmpty()){ - qWarning("empty querystring"); - return; - } - if (!activated_name || activated_name.isEmpty()) - QMessageBox::warning(this,tr("No Dictionary"),tr("Please choose a dictonary") ); - else - DingWidget *ding = new DingWidget( querystring , browser_top, browser_bottom, activated_name ); - ding->setText(); +//X qDebug("opening dict >%s< for >%s<", activated_name.latin1(),querystring.latin1()); +//X if (querystring.isEmpty()){ +//X qWarning("empty querystring"); +//X return; +//X } +//X if (!activated_name || activated_name.isEmpty()) +//X QMessageBox::warning(this,tr("No Dictionary"),tr("Please choose a dictonary") ); +//X else +//X { + + ding->setCaseSensitive( casesens ); + ding->setCompleteWord( completewords ); + ding->setDict( activated_name ); + + qDebug( " activated_name ist :" ); + qDebug( activated_name ); + + qDebug( " loadedDict() ist :" ); + qDebug( ding->loadedDict() ); + if ( activated_name != ding->loadedDict() ) + { + qDebug( "ComboBox geändert" ); + ding->loadDict(activated_name); + } + else qDebug( "ComboBox war GLEICH" ); + + BroswerContent test = ding->setText( querystring ); + + browser_top->setText( test.top ); + browser_bottom->setText( test.bottom ); + + qDebug( "Text sollte gesetzt sein..." ); + +//X } + } @@ -154,3 +183,3 @@ void ODict::slotSetParameter( int count ) -void ODict::slotMethodChanged( int methodnumber ) +void ODict::slotMethodChanged( int /*methodnumber*/ ) { |