Diffstat (limited to 'noncore/apps/odict/odict.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/odict/odict.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/noncore/apps/odict/odict.cpp b/noncore/apps/odict/odict.cpp index 010545e..9718c5c 100644 --- a/noncore/apps/odict/odict.cpp +++ b/noncore/apps/odict/odict.cpp @@ -37,8 +37,8 @@ #include <qpe/config.h> -ODict::ODict() : QMainWindow() +ODict::ODict(QWidget* parent, const char* name, WFlags fl ) : QMainWindow(parent, name, fl ) { activated_name = QString::null; - + vbox = new QVBox( this ); setCaption( tr( "Opie-Dictionary" ) ); @@ -46,5 +46,5 @@ ODict::ODict() : QMainWindow() QHBox *hbox = new QHBox( vbox ); - QLabel* query_label = new QLabel( tr( "Query:" ) , hbox ); + QLabel* query_label = new QLabel( tr( "Query:" ) , hbox ); query_label->show(); query_le = new QLineEdit( hbox ); @@ -53,5 +53,5 @@ ODict::ODict() : QMainWindow() ok_button = new QPushButton( tr( "&Ok" ), hbox ); connect( ok_button, SIGNAL( released() ), this, SLOT( slotStartQuery() ) ); - + top_name = new QLabel( vbox ); top_name->setAlignment( AlignHCenter ); @@ -73,5 +73,5 @@ void ODict::loadConfig() */ QString lastname; - + Config cfg ( "odict" ); cfg.setGroup( "generalsettings" ); @@ -80,5 +80,5 @@ void ODict::loadConfig() QString lastDict = cfg.readEntry( "lastdict" ); int i = 0, e = 0; - + QStringList groupListCfg = cfg.groupList().grep( "Method_" ); query_co->clear(); @@ -118,6 +118,6 @@ void ODict::lookupLanguageNames( QString dictname ) Config cfg ( "odict" ); cfg.setGroup( "Method_"+dictname ); - top_name_content = cfg.readEntry( "Lang1" ); - bottom_name_content = cfg.readEntry( "Lang2" ); + top_name_content = cfg.readEntry( "Lang1" ); + bottom_name_content = cfg.readEntry( "Lang2" ); } @@ -142,9 +142,9 @@ void ODict::slotStartQuery() switch ( QMessageBox::information( this, tr( "OPIE-Dictionary" ), tr( "No dictionary defined" ), - tr( "&Define one" ), + tr( "&Define one" ), tr( "&Cancel" ), 0, // Define a dict 1 ) ) // Cancel choosen - { + { case 0: slotSettings(); @@ -153,10 +153,10 @@ void ODict::slotStartQuery() return; } - } + } /* * ok, the user has defined a dict */ - ding->setCaseSensitive( casesens ); + ding->setCaseSensitive( casesens ); BroswerContent test = ding->setText( querystring ); @@ -190,9 +190,9 @@ 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 ); @@ -204,5 +204,5 @@ 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 ); @@ -210,10 +210,10 @@ void ODict::setupMenus() 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 ) ) ); parameter->insertItem( tr( "C&ase sensitive" ), 0 ,0 ); parameter->insertSeparator(); - + menu->insertItem( tr( "Settings" ) , settings ); menu->insertItem( tr( "Parameter" ) , parameter ); |