summaryrefslogtreecommitdiff
path: root/noncore/apps/odict/odict.cpp
Unidiff
Diffstat (limited to 'noncore/apps/odict/odict.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/odict/odict.cpp55
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()
41{ 41{
42
43 activated_name = QString::null; 42 activated_name = QString::null;
43
44 vbox = new QVBox( this ); 44 vbox = new QVBox( this );
@@ -46,2 +46,3 @@ ODict::ODict() : QMainWindow()
46 setupMenus(); 46 setupMenus();
47
47 48
@@ -57,2 +58,4 @@ ODict::ODict() : QMainWindow()
57 58
59 ding = new DingWidget();
60
58 loadConfig(); 61 loadConfig();
@@ -77,2 +80,3 @@ void ODict::loadConfig()
77 } 80 }
81 slotMethodChanged(1 ); //FIXME: this line should not contain a integer
78} 82}
@@ -92,3 +96,3 @@ void ODict::slotDisplayAbout()
92{ 96{
93 QMessageBox::about( this, tr( "About ODict" ), tr( "OPIE-Dictionary ODict \n (c) 2002, 2003 Carsten Niehaus \n cniehaus@handhelds.org \n Version 20030104" ) ); 97 QMessageBox::about( this, tr( "About ODict" ), tr( "OPIE-Dictionary ODict \n (c) 2002, 2003 Carsten Niehaus \n cniehaus@handhelds.org \n Version 20030108" ) );
94} 98}
@@ -98,12 +102,37 @@ void ODict::slotStartQuery()
98 QString querystring = query_le->text(); 102 QString querystring = query_le->text();
99 qDebug("opening dict >%s< for >%s<", activated_name.latin1(),querystring.latin1()); 103 //X qDebug("opening dict >%s< for >%s<", activated_name.latin1(),querystring.latin1());
100 if (querystring.isEmpty()){ 104 //X if (querystring.isEmpty()){
101 qWarning("empty querystring"); 105 //X qWarning("empty querystring");
102 return; 106 //X return;
103 } 107 //X }
104 if (!activated_name || activated_name.isEmpty()) 108 //X if (!activated_name || activated_name.isEmpty())
105 QMessageBox::warning(this,tr("No Dictionary"),tr("Please choose a dictonary") ); 109 //X QMessageBox::warning(this,tr("No Dictionary"),tr("Please choose a dictonary") );
106 else 110 //X else
107 DingWidget *ding = new DingWidget( querystring , browser_top, browser_bottom, activated_name ); 111 //X {
108 ding->setText(); 112
113 ding->setCaseSensitive( casesens );
114 ding->setCompleteWord( completewords );
115 ding->setDict( activated_name );
116
117 qDebug( " activated_name ist :" );
118 qDebug( activated_name );
119
120 qDebug( " loadedDict() ist :" );
121 qDebug( ding->loadedDict() );
122 if ( activated_name != ding->loadedDict() )
123 {
124 qDebug( "ComboBox geändert" );
125 ding->loadDict(activated_name);
126 }
127 else qDebug( "ComboBox war GLEICH" );
128
129 BroswerContent test = ding->setText( querystring );
130
131 browser_top->setText( test.top );
132 browser_bottom->setText( test.bottom );
133
134 qDebug( "Text sollte gesetzt sein..." );
135
136 //X }
137
109} 138}
@@ -154,3 +183,3 @@ void ODict::slotSetParameter( int count )
154 183
155void ODict::slotMethodChanged( int methodnumber ) 184void ODict::slotMethodChanged( int /*methodnumber*/ )
156{ 185{