summaryrefslogtreecommitdiff
path: root/noncore/apps/odict/odict.cpp
Side-by-side diff
Diffstat (limited to 'noncore/apps/odict/odict.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/odict/odict.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/apps/odict/odict.cpp b/noncore/apps/odict/odict.cpp
index d5c6d75..4c99964 100644
--- a/noncore/apps/odict/odict.cpp
+++ b/noncore/apps/odict/odict.cpp
@@ -113,103 +113,103 @@ void ODict::lookupLanguageNames( QString dictname )
Config cfg ( "odict" );
cfg.setGroup( "Method_"+dictname );
top_name_content = cfg.readEntry( "Lang1" );
bottom_name_content = cfg.readEntry( "Lang2" );
}
void ODict::saveConfig()
{
Config cfg ( "odict" );
cfg.setGroup( "generalsettings" );
cfg.writeEntry( "casesens" , casesens );
cfg.writeEntry( "lastdict" , query_co->currentText() );
}
void ODict::slotStartQuery()
{
QString querystring = query_le->text();
if ( !querystring.isEmpty() )
{
/*
* if the user has not yet defined a dictionary
*/
if ( !query_co->currentText() )
{
switch ( QMessageBox::information( this, tr( "OPIE-Dictionary" ),
tr( "No dictionary defined" ),
tr( "&Define one" ),
tr( "&Cancel" ),
0, // Define a dict
1 ) ) // Cancel choosen
{
case 0:
slotSettings();
break;
case 1: // stop here
return;
}
}
/*
* ok, the user has defined a dict
*/
ding->setCaseSensitive( casesens );
BroswerContent test = ding->setText( querystring );
browser_top->setText( test.top );
browser_bottom->setText( test.bottom );
}
}
void ODict::slotSettings()
{
ConfigDlg dlg( this, "Config" , true);
if ( dlg.exec() == QDialog::Accepted )
saveConfig();
}
void ODict::slotSetParameter( int count )
{
if ( count == 0 )
{
if ( casesens )
casesens = false;
else
casesens = true;
}
saveConfig();
}
void ODict::slotMethodChanged( const QString& methodnumber )
{
activated_name = methodnumber;
if ( activated_name != ding->loadedDict() )
{
ding->loadDict(activated_name);
lookupLanguageNames( activated_name );
top_name->setText( top_name_content );
bottom_name->setText( bottom_name_content );
}
}
void ODict::setupMenus()
{
menu = new QMenuBar( this );
settings = new QPopupMenu( menu );
setting_a = new QAction(tr( "Configuration" ), Resource::loadPixmap( "new" ), QString::null, 0, this, 0 );
connect( setting_a, SIGNAL( activated() ), this, SLOT( slotSettings() ) );
setting_a->addTo( settings );
setting_b = new QAction(tr( "Searchmethods" ), Resource::loadPixmap( "edit" ), QString::null, 0, this, 0 );
parameter = new QPopupMenu( menu );
- connect( parameter, SIGNAL( activated( int ) ), this, SLOT( slotSetParameter( int ) ) );
+ connect( parameter, SIGNAL( activated(int) ), this, SLOT( slotSetParameter(int) ) );
parameter->insertItem( tr( "C&ase sensitive" ), 0 ,0 );
parameter->insertSeparator();
menu->insertItem( tr( "Settings" ) , settings );
menu->insertItem( tr( "Parameter" ) , parameter );
}