summaryrefslogtreecommitdiff
path: root/noncore/apps/odict/odict.cpp
Unidiff
Diffstat (limited to 'noncore/apps/odict/odict.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/odict/odict.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/noncore/apps/odict/odict.cpp b/noncore/apps/odict/odict.cpp
index 7de9169..2857c65 100644
--- a/noncore/apps/odict/odict.cpp
+++ b/noncore/apps/odict/odict.cpp
@@ -39,6 +39,8 @@
39 39
40ODict::ODict() : QMainWindow() 40ODict::ODict() : QMainWindow()
41{ 41{
42
43 activated_name = QString::null;
42 vbox = new QVBox( this ); 44 vbox = new QVBox( this );
43 setCaption( tr( "OPIE-Dictionary" ) ); 45 setCaption( tr( "OPIE-Dictionary" ) );
44 setupMenus(); 46 setupMenus();
@@ -47,6 +49,7 @@ ODict::ODict() : QMainWindow()
47 QLabel* query_label = new QLabel( tr( "Query:" ) , hbox ); query_label->show(); 49 QLabel* query_label = new QLabel( tr( "Query:" ) , hbox ); query_label->show();
48 query_le = new QLineEdit( hbox ); 50 query_le = new QLineEdit( hbox );
49 query_co = new QComboBox( hbox ); 51 query_co = new QComboBox( hbox );
52 connect( query_co , SIGNAL( activated(int) ), this, SLOT( slotMethodChanged(int) ) );
50 ok_button = new QPushButton( tr( "&Ok" ), hbox ); 53 ok_button = new QPushButton( tr( "&Ok" ), hbox );
51 connect( ok_button, SIGNAL( released() ), this, SLOT( slotStartQuery() ) ); 54 connect( ok_button, SIGNAL( released() ), this, SLOT( slotStartQuery() ) );
52 browser_top = new QTextBrowser( vbox ); 55 browser_top = new QTextBrowser( vbox );
@@ -92,7 +95,7 @@ void ODict::slotDisplayAbout()
92void ODict::slotStartQuery() 95void ODict::slotStartQuery()
93{ 96{
94 QString querystring = query_le->text(); 97 QString querystring = query_le->text();
95 DingWidget *ding = new DingWidget( vbox , querystring , browser_top, browser_bottom); 98 DingWidget *ding = new DingWidget( vbox , querystring , browser_top, browser_bottom, activated_name);
96} 99}
97 100
98 101
@@ -136,6 +139,11 @@ void ODict::slotSetParameter( int count )
136 else qWarning( "ERROR" ); 139 else qWarning( "ERROR" );
137} 140}
138 141
142void ODict::slotMethodChanged( int methodnumber )
143{
144 activated_name = query_co->currentText();
145}
146
139void ODict::setupMenus() 147void ODict::setupMenus()
140{ 148{
141 menu = new QMenuBar( this ); 149 menu = new QMenuBar( this );