summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/odict/configdlg.cpp4
-rw-r--r--noncore/apps/odict/dingwidget.cpp3
-rw-r--r--noncore/apps/odict/odict.cpp5
-rw-r--r--noncore/apps/odict/searchmethoddlg.cpp3
4 files changed, 0 insertions, 15 deletions
diff --git a/noncore/apps/odict/configdlg.cpp b/noncore/apps/odict/configdlg.cpp
index b12a395..7fa6008 100644
--- a/noncore/apps/odict/configdlg.cpp
+++ b/noncore/apps/odict/configdlg.cpp
@@ -1,55 +1,51 @@
1/*************************************************************************** 1/***************************************************************************
2 application: : ODict 2 application: : ODict
3 3
4 begin : December 2002 4 begin : December 2002
5 copyright : ( C ) 2002, 2003 by Carsten Niehaus 5 copyright : ( C ) 2002, 2003 by Carsten Niehaus
6 email : cniehaus@handhelds.org 6 email : cniehaus@handhelds.org
7 **************************************************************************/ 7 **************************************************************************/
8 8
9/*************************************************************************** 9/***************************************************************************
10 * * 10 * *
11 * This program is free software; you can redistribute it and/or modify * 11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by * 12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or * 13 * the Free Software Foundation; either version 2 of the License, or *
14 * ( at your option ) any later version. * 14 * ( at your option ) any later version. *
15 * * 15 * *
16 **************************************************************************/ 16 **************************************************************************/
17#include "configdlg.h" 17#include "configdlg.h"
18#include "searchmethoddlg.h" 18#include "searchmethoddlg.h"
19 19
20#include <qpe/qpeapplication.h> 20#include <qpe/qpeapplication.h>
21#include <qpe/config.h> 21#include <qpe/config.h>
22 22
23#include <qdialog.h>
24#include <qlayout.h> 23#include <qlayout.h>
25#include <qhbox.h>
26#include <qvbox.h> 24#include <qvbox.h>
27#include <qlabel.h>
28#include <qlistview.h> 25#include <qlistview.h>
29#include <qpushbutton.h> 26#include <qpushbutton.h>
30#include <qlineedit.h> 27#include <qlineedit.h>
31#include <qstringlist.h>
32 28
33ConfigDlg::ConfigDlg(QWidget *parent, const char *name, bool modal) : QDialog(parent, name, modal) 29ConfigDlg::ConfigDlg(QWidget *parent, const char *name, bool modal) : QDialog(parent, name, modal)
34{ 30{
35 setCaption( tr( "Options" ) ); 31 setCaption( tr( "Options" ) );
36 QVBoxLayout *vbox_layout = new QVBoxLayout( this ); 32 QVBoxLayout *vbox_layout = new QVBoxLayout( this );
37 search_tab = new QWidget( this , "search_tab" ); 33 search_tab = new QWidget( this , "search_tab" );
38 QVBoxLayout *vbox_layout_searchtab = new QVBoxLayout( search_tab, 4 , 4 ,"blah" ); 34 QVBoxLayout *vbox_layout_searchtab = new QVBoxLayout( search_tab, 4 , 4 ,"blah" );
39 35
40 QHBox *hbox = new QHBox( search_tab ); 36 QHBox *hbox = new QHBox( search_tab );
41 list = new QListView( hbox ); 37 list = new QListView( hbox );
42 list->addColumn( tr( "Searchmethod" ) ); 38 list->addColumn( tr( "Searchmethod" ) );
43 loadSearchMethodNames(); 39 loadSearchMethodNames();
44 40
45 QVBox *vbox = new QVBox( hbox ); 41 QVBox *vbox = new QVBox( hbox );
46 new_button = new QPushButton( tr( "New" ) , vbox ); 42 new_button = new QPushButton( tr( "New" ) , vbox );
47 change_button = new QPushButton( tr( "Change" ) , vbox ); 43 change_button = new QPushButton( tr( "Change" ) , vbox );
48 delete_button = new QPushButton( tr( "Delete" ) , vbox ); 44 delete_button = new QPushButton( tr( "Delete" ) , vbox );
49 connect( new_button, SIGNAL( clicked() ), this, SLOT( slotNewMethod() ) ); 45 connect( new_button, SIGNAL( clicked() ), this, SLOT( slotNewMethod() ) );
50 connect( change_button, SIGNAL( clicked() ), this, SLOT( slotChangeMethod() )); 46 connect( change_button, SIGNAL( clicked() ), this, SLOT( slotChangeMethod() ));
51 connect( delete_button, SIGNAL( clicked() ), this, SLOT( slotDeleteMethod() )); 47 connect( delete_button, SIGNAL( clicked() ), this, SLOT( slotDeleteMethod() ));
52 48
53 vbox_layout_searchtab->addWidget( hbox ); 49 vbox_layout_searchtab->addWidget( hbox );
54 50
55 vbox_layout->addWidget( search_tab ); 51 vbox_layout->addWidget( search_tab );
diff --git a/noncore/apps/odict/dingwidget.cpp b/noncore/apps/odict/dingwidget.cpp
index c804385..ef36ee5 100644
--- a/noncore/apps/odict/dingwidget.cpp
+++ b/noncore/apps/odict/dingwidget.cpp
@@ -1,48 +1,45 @@
1/*************************************************************************** 1/***************************************************************************
2 application: : ODict 2 application: : ODict
3 3
4 begin : December 2002 4 begin : December 2002
5 copyright : ( C ) 2002, 2003 by Carsten Niehaus 5 copyright : ( C ) 2002, 2003 by Carsten Niehaus
6 email : cniehaus@handhelds.org 6 email : cniehaus@handhelds.org
7 **************************************************************************/ 7 **************************************************************************/
8 8
9/*************************************************************************** 9/***************************************************************************
10 * * 10 * *
11 * This program is free software; you can redistribute it and/or modify * 11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by * 12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or * 13 * the Free Software Foundation; either version 2 of the License, or *
14 * ( at your option ) any later version. * 14 * ( at your option ) any later version. *
15 * * 15 * *
16 **************************************************************************/ 16 **************************************************************************/
17#include "dingwidget.h" 17#include "dingwidget.h"
18 18
19#include <qfile.h> 19#include <qfile.h>
20#include <qpe/config.h> 20#include <qpe/config.h>
21#include <qstring.h>
22#include <qtextstream.h> 21#include <qtextstream.h>
23#include <qstringlist.h>
24#include <qregexp.h>
25 22
26DingWidget::DingWidget( ) 23DingWidget::DingWidget( )
27{ 24{
28 methodname = QString::null; 25 methodname = QString::null;
29 trenner = QString::null; 26 trenner = QString::null;
30 lines = 0L; 27 lines = 0L;
31} 28}
32 29
33void DingWidget::loadDict( QString name ) 30void DingWidget::loadDict( QString name )
34{ 31{
35 lines.clear(); //as we will load a new list we have to 32 lines.clear(); //as we will load a new list we have to
36 //remove the old one 33 //remove the old one
37 34
38 Config cfg( "odict" ); 35 Config cfg( "odict" );
39 cfg.setGroup( "Method_" + name ); 36 cfg.setGroup( "Method_" + name );
40 QFile file( cfg.readEntry( "file" ) ); 37 QFile file( cfg.readEntry( "file" ) );
41 38
42 if( file.open( IO_ReadOnly ) ) 39 if( file.open( IO_ReadOnly ) )
43 { 40 {
44 QTextStream stream( &file ); 41 QTextStream stream( &file );
45 while ( !stream.eof() ) 42 while ( !stream.eof() )
46 { 43 {
47 lines.append( stream.readLine() ); 44 lines.append( stream.readLine() );
48 } 45 }
diff --git a/noncore/apps/odict/odict.cpp b/noncore/apps/odict/odict.cpp
index 9718c5c..d5c6d75 100644
--- a/noncore/apps/odict/odict.cpp
+++ b/noncore/apps/odict/odict.cpp
@@ -1,55 +1,50 @@
1/*************************************************************************** 1/***************************************************************************
2 application: : ODict 2 application: : ODict
3 3
4 begin : December 2002 4 begin : December 2002
5 copyright : ( C ) 2002, 2003 by Carsten Niehaus 5 copyright : ( C ) 2002, 2003 by Carsten Niehaus
6 email : cniehaus@handhelds.org 6 email : cniehaus@handhelds.org
7 **************************************************************************/ 7 **************************************************************************/
8 8
9/*************************************************************************** 9/***************************************************************************
10 * * 10 * *
11 * This program is free software; you can redistribute it and/or modify * 11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by * 12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or * 13 * the Free Software Foundation; either version 2 of the License, or *
14 * ( at your option ) any later version. * 14 * ( at your option ) any later version. *
15 * * 15 * *
16 **************************************************************************/ 16 **************************************************************************/
17#include "odict.h" 17#include "odict.h"
18#include "configdlg.h" 18#include "configdlg.h"
19#include "dingwidget.h" 19#include "dingwidget.h"
20 20
21#include <qlayout.h>
22#include <qpopupmenu.h>
23#include <qmenubar.h> 21#include <qmenubar.h>
24#include <qmessagebox.h> 22#include <qmessagebox.h>
25#include <qhbox.h>
26#include <qvbox.h> 23#include <qvbox.h>
27#include <qlabel.h> 24#include <qlabel.h>
28#include <qpushbutton.h> 25#include <qpushbutton.h>
29#include <qlineedit.h> 26#include <qlineedit.h>
30#include <qmainwindow.h>
31#include <qstring.h>
32#include <qaction.h> 27#include <qaction.h>
33#include <qtextbrowser.h> 28#include <qtextbrowser.h>
34#include <qcombobox.h> 29#include <qcombobox.h>
35 30
36#include <qpe/resource.h> 31#include <qpe/resource.h>
37#include <qpe/config.h> 32#include <qpe/config.h>
38 33
39ODict::ODict(QWidget* parent, const char* name, WFlags fl ) : QMainWindow(parent, name, fl ) 34ODict::ODict(QWidget* parent, const char* name, WFlags fl ) : QMainWindow(parent, name, fl )
40{ 35{
41 activated_name = QString::null; 36 activated_name = QString::null;
42 37
43 vbox = new QVBox( this ); 38 vbox = new QVBox( this );
44 setCaption( tr( "Opie-Dictionary" ) ); 39 setCaption( tr( "Opie-Dictionary" ) );
45 setupMenus(); 40 setupMenus();
46 41
47 QHBox *hbox = new QHBox( vbox ); 42 QHBox *hbox = new QHBox( vbox );
48 QLabel* query_label = new QLabel( tr( "Query:" ) , hbox ); 43 QLabel* query_label = new QLabel( tr( "Query:" ) , hbox );
49 query_label->show(); 44 query_label->show();
50 query_le = new QLineEdit( hbox ); 45 query_le = new QLineEdit( hbox );
51 query_co = new QComboBox( hbox ); 46 query_co = new QComboBox( hbox );
52 connect( query_co , SIGNAL( activated(const QString&) ), this, SLOT( slotMethodChanged(const QString&) ) ); 47 connect( query_co , SIGNAL( activated(const QString&) ), this, SLOT( slotMethodChanged(const QString&) ) );
53 ok_button = new QPushButton( tr( "&Ok" ), hbox ); 48 ok_button = new QPushButton( tr( "&Ok" ), hbox );
54 connect( ok_button, SIGNAL( released() ), this, SLOT( slotStartQuery() ) ); 49 connect( ok_button, SIGNAL( released() ), this, SLOT( slotStartQuery() ) );
55 50
diff --git a/noncore/apps/odict/searchmethoddlg.cpp b/noncore/apps/odict/searchmethoddlg.cpp
index abe2966..f71cfd8 100644
--- a/noncore/apps/odict/searchmethoddlg.cpp
+++ b/noncore/apps/odict/searchmethoddlg.cpp
@@ -1,55 +1,52 @@
1/*************************************************************************** 1/***************************************************************************
2 application: : ODict 2 application: : ODict
3 3
4 begin : December 2002 4 begin : December 2002
5 copyright : ( C ) 2002, 2003 by Carsten Niehaus 5 copyright : ( C ) 2002, 2003 by Carsten Niehaus
6 email : cniehaus@handhelds.org 6 email : cniehaus@handhelds.org
7 **************************************************************************/ 7 **************************************************************************/
8 8
9/*************************************************************************** 9/***************************************************************************
10 * * 10 * *
11 * This program is free software; you can redistribute it and/or modify * 11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by * 12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or * 13 * the Free Software Foundation; either version 2 of the License, or *
14 * ( at your option ) any later version. * 14 * ( at your option ) any later version. *
15 * * 15 * *
16 **************************************************************************/ 16 **************************************************************************/
17#include "searchmethoddlg.h" 17#include "searchmethoddlg.h"
18 18
19#include <opie2/ofileselector.h> 19#include <opie2/ofileselector.h>
20#include <opie2/ofiledialog.h> 20#include <opie2/ofiledialog.h>
21 21
22#include <qpe/config.h> 22#include <qpe/config.h>
23#include <qpe/qpeapplication.h> 23#include <qpe/qpeapplication.h>
24 24
25#include <qdialog.h>
26#include <qlayout.h> 25#include <qlayout.h>
27#include <qhbox.h>
28#include <qvbox.h> 26#include <qvbox.h>
29#include <qlabel.h> 27#include <qlabel.h>
30#include <qpushbutton.h> 28#include <qpushbutton.h>
31#include <qstring.h>
32#include <qlineedit.h> 29#include <qlineedit.h>
33#include <qdir.h> 30#include <qdir.h>
34 31
35using Opie::OFileDialog; 32using Opie::OFileDialog;
36using Opie::OFileSelector; 33using Opie::OFileSelector;
37 34
38SearchMethodDlg::SearchMethodDlg(QWidget *parent, const char *name, bool modal, QString itemname) : QDialog(parent, name, modal) 35SearchMethodDlg::SearchMethodDlg(QWidget *parent, const char *name, bool modal, QString itemname) : QDialog(parent, name, modal)
39{ 36{
40 37
41 QVBoxLayout *vbox_layout = new QVBoxLayout( this, 4,4,"vbox_layout" ); 38 QVBoxLayout *vbox_layout = new QVBoxLayout( this, 4,4,"vbox_layout" );
42 QVBox *vbox = new QVBox( this ); 39 QVBox *vbox = new QVBox( this );
43 40
44 QHBox *hbox1 = new QHBox( vbox ); 41 QHBox *hbox1 = new QHBox( vbox );
45 QLabel *nameLabel = new QLabel( tr( "Name:" ) , hbox1 ); 42 QLabel *nameLabel = new QLabel( tr( "Name:" ) , hbox1 );
46 nameLE = new QLineEdit( hbox1 ); 43 nameLE = new QLineEdit( hbox1 );
47 44
48 QLabel *dictLabel = new QLabel( tr( "Dictionary file" ), vbox ); 45 QLabel *dictLabel = new QLabel( tr( "Dictionary file" ), vbox );
49 QHBox *hbox2 = new QHBox( vbox ); 46 QHBox *hbox2 = new QHBox( vbox );
50 dictFileLE = new QLineEdit( hbox2 ); 47 dictFileLE = new QLineEdit( hbox2 );
51 QPushButton *browseButton = new QPushButton( tr( "Browse" ) , hbox2 ); 48 QPushButton *browseButton = new QPushButton( tr( "Browse" ) , hbox2 );
52 connect( browseButton, SIGNAL( clicked() ), this, SLOT( slotBrowse() ) ); 49 connect( browseButton, SIGNAL( clicked() ), this, SLOT( slotBrowse() ) );
53 50
54 QWidget *dummywidget = new QWidget( vbox ); 51 QWidget *dummywidget = new QWidget( vbox );
55 QLabel *lag1 = new QLabel( tr( "Language 1" ),dummywidget); 52 QLabel *lag1 = new QLabel( tr( "Language 1" ),dummywidget);