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.cpp18
1 files changed, 2 insertions, 16 deletions
diff --git a/noncore/apps/odict/odict.cpp b/noncore/apps/odict/odict.cpp
index a404e89..cc3148a 100644
--- a/noncore/apps/odict/odict.cpp
+++ b/noncore/apps/odict/odict.cpp
@@ -42,13 +42,12 @@ ODict::ODict() : QMainWindow()
42 activated_name = QString::null; 42 activated_name = QString::null;
43 43
44 vbox = new QVBox( this ); 44 vbox = new QVBox( this );
45 setCaption( tr( "OPIE-Dictionary" ) ); 45 setCaption( tr( "OPIE-Dictionary" ) );
46 setupMenus(); 46 setupMenus();
47 47
48
49 QHBox *hbox = new QHBox( vbox ); 48 QHBox *hbox = new QHBox( vbox );
50 QLabel* query_label = new QLabel( tr( "Query:" ) , hbox ); query_label->show(); 49 QLabel* query_label = new QLabel( tr( "Query:" ) , hbox ); query_label->show();
51 query_le = new QLineEdit( hbox ); 50 query_le = new QLineEdit( hbox );
52 query_co = new QComboBox( hbox ); 51 query_co = new QComboBox( hbox );
53 connect( query_co , SIGNAL( activated(int) ), this, SLOT( slotMethodChanged(int) ) ); 52 connect( query_co , SIGNAL( activated(int) ), this, SLOT( slotMethodChanged(int) ) );
54 ok_button = new QPushButton( tr( "&Ok" ), hbox ); 53 ok_button = new QPushButton( tr( "&Ok" ), hbox );
@@ -93,36 +92,23 @@ void ODict::saveConfig()
93 cfg.writeEntry( "completewords" , completewords ); 92 cfg.writeEntry( "completewords" , completewords );
94} 93}
95 94
96void ODict::slotStartQuery() 95void ODict::slotStartQuery()
97{ 96{
98 QString querystring = query_le->text(); 97 QString querystring = query_le->text();
99 //X qDebug("opening dict >%s< for >%s<", activated_name.latin1(),querystring.latin1());
100 //X if (querystring.isEmpty()){
101 //X qWarning("empty querystring");
102 //X return;
103 //X }
104 //X if (!activated_name || activated_name.isEmpty())
105 //X QMessageBox::warning(this,tr("No Dictionary"),tr("Please choose a dictonary") );
106 //X else
107 //X {
108
109 ding->setCaseSensitive( casesens ); 98 ding->setCaseSensitive( casesens );
110 ding->setCompleteWord( completewords ); 99 ding->setCompleteWord( completewords );
111 ding->setDict( activated_name ); 100 ding->setDict( activated_name );
112 101
113 if ( activated_name != ding->loadedDict() ) 102 if ( activated_name != ding->loadedDict() )
114 ding->loadDict(activated_name); 103 ding->loadDict(activated_name);
115 104
116 BroswerContent test = ding->setText( querystring ); 105 BroswerContent test = ding->setText( querystring );
117 106
118 browser_top->setText( test.top ); 107 browser_top->setText( test.top );
119 browser_bottom->setText( test.bottom ); 108 browser_bottom->setText( test.bottom );
120
121 qDebug( "Text sollte gesetzt sein..." );
122 //X }
123} 109}
124 110
125 111
126void ODict::slotSetErrorcount( int count ) 112void ODict::slotSetErrorcount( int count )
127{ 113{
128 errorTol = count; 114 errorTol = count;
@@ -173,16 +159,16 @@ void ODict::slotMethodChanged( int /*methodnumber*/ )
173 159
174void ODict::setupMenus() 160void ODict::setupMenus()
175{ 161{
176 menu = new QMenuBar( this ); 162 menu = new QMenuBar( this );
177 163
178 settings = new QPopupMenu( menu ); 164 settings = new QPopupMenu( menu );
179 setting_a = new QAction(tr( "Config" ), Resource::loadPixmap( "today/config" ), QString::null, 0, this, 0 ); 165 setting_a = new QAction(tr( "Configuration" ), Resource::loadPixmap( "new" ), QString::null, 0, this, 0 );
180 connect( setting_a, SIGNAL( activated() ), this, SLOT( slotSettings() ) ); 166 connect( setting_a, SIGNAL( activated() ), this, SLOT( slotSettings() ) );
181 setting_a->addTo( settings ); 167 setting_a->addTo( settings );
182 setting_b = new QAction(tr( "Searchmethods" ), Resource::loadPixmap( "today/config" ), QString::null, 0, this, 0 ); 168 setting_b = new QAction(tr( "Searchmethods" ), Resource::loadPixmap( "edit" ), QString::null, 0, this, 0 );
183 169
184 parameter = new QPopupMenu( menu ); 170 parameter = new QPopupMenu( menu );
185 connect( parameter, SIGNAL( activated( int ) ), this, SLOT( slotSetParameter( int ) ) ); 171 connect( parameter, SIGNAL( activated( int ) ), this, SLOT( slotSetParameter( int ) ) );
186 parameter->insertItem( tr( "C&ase sensitive" ), 0 ,0 ); 172 parameter->insertItem( tr( "C&ase sensitive" ), 0 ,0 );
187 parameter->insertItem( tr( "Only &complete Words" ), 1 , 1) ; 173 parameter->insertItem( tr( "Only &complete Words" ), 1 , 1) ;
188 parameter->insertItem( tr( "Allow &reg. expressions" ), 2 ); 174 parameter->insertItem( tr( "Allow &reg. expressions" ), 2 );