Diffstat (limited to 'noncore/apps/odict/odict.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/odict/odict.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/noncore/apps/odict/odict.cpp b/noncore/apps/odict/odict.cpp index 6c03ce3..166f6b9 100644 --- a/noncore/apps/odict/odict.cpp +++ b/noncore/apps/odict/odict.cpp | |||
@@ -38,25 +38,26 @@ | |||
38 | 38 | ||
39 | ODict::ODict() : QMainWindow() | 39 | ODict::ODict() : QMainWindow() |
40 | { | 40 | { |
41 | vbox = new QVBox( this ); | 41 | vbox = new QVBox( this ); |
42 | setCaption( tr( "OPIE-Dictionary" ) ); | 42 | setCaption( tr( "OPIE-Dictionary" ) ); |
43 | setupMenus(); | 43 | setupMenus(); |
44 | 44 | ||
45 | QHBox *hbox = new QHBox( vbox ); | 45 | QHBox *hbox = new QHBox( vbox ); |
46 | QLabel* query_label = new QLabel( tr( "Query:" ) , hbox ); query_label->show(); | 46 | QLabel* query_label = new QLabel( tr( "Query:" ) , hbox ); query_label->show(); |
47 | query_le = new QLineEdit( hbox ); | 47 | query_le = new QLineEdit( hbox ); |
48 | ok_button = new QPushButton( tr( "&Ok" ), hbox ); | 48 | ok_button = new QPushButton( tr( "&Ok" ), hbox ); |
49 | connect( ok_button, SIGNAL( released() ), this, SLOT( slotStartQuery() ) ); | 49 | connect( ok_button, SIGNAL( released() ), this, SLOT( slotStartQuery() ) ); |
50 | browser = new QTextBrowser( vbox ); | 50 | browser_top = new QTextBrowser( vbox ); |
51 | browser_bottom = new QTextBrowser( vbox ); | ||
51 | 52 | ||
52 | loadConfig(); | 53 | loadConfig(); |
53 | setCentralWidget( vbox ); | 54 | setCentralWidget( vbox ); |
54 | } | 55 | } |
55 | 56 | ||
56 | void ODict::loadConfig() | 57 | void ODict::loadConfig() |
57 | { | 58 | { |
58 | Config cfg ( "odict" ); | 59 | Config cfg ( "odict" ); |
59 | cfg.setGroup( "generalsettings" ); | 60 | cfg.setGroup( "generalsettings" ); |
60 | errorTol = cfg.readEntry( "errtol" ).toInt(); | 61 | errorTol = cfg.readEntry( "errtol" ).toInt(); |
61 | casesens = cfg.readEntry( "casesens" ).toInt(); | 62 | casesens = cfg.readEntry( "casesens" ).toInt(); |
62 | regexp = cfg.readEntry( "regexp" ).toInt(); | 63 | regexp = cfg.readEntry( "regexp" ).toInt(); |
@@ -73,25 +74,25 @@ void ODict::saveConfig() | |||
73 | cfg.writeEntry( "regexp" , regexp ); | 74 | cfg.writeEntry( "regexp" , regexp ); |
74 | cfg.writeEntry( "completewords" , completewords ); | 75 | cfg.writeEntry( "completewords" , completewords ); |
75 | } | 76 | } |
76 | 77 | ||
77 | void ODict::slotDisplayAbout() | 78 | void ODict::slotDisplayAbout() |
78 | { | 79 | { |
79 | QMessageBox::about( this, tr( "About ODict" ), tr( "OPIE-Dictionary ODict \n (c) 2002, 2003 Carsten Niehaus \n cniehaus@handhelds.org \n Version 20030103" ) ); | 80 | QMessageBox::about( this, tr( "About ODict" ), tr( "OPIE-Dictionary ODict \n (c) 2002, 2003 Carsten Niehaus \n cniehaus@handhelds.org \n Version 20030103" ) ); |
80 | } | 81 | } |
81 | 82 | ||
82 | void ODict::slotStartQuery() | 83 | void ODict::slotStartQuery() |
83 | { | 84 | { |
84 | QString querystring = query_le->text(); | 85 | QString querystring = query_le->text(); |
85 | DingWidget *ding = new DingWidget( vbox , querystring , browser); | 86 | DingWidget *ding = new DingWidget( vbox , querystring , browser_top, browser_bottom); |
86 | } | 87 | } |
87 | 88 | ||
88 | 89 | ||
89 | void ODict::slotSetErrorcount( int count ) | 90 | void ODict::slotSetErrorcount( int count ) |
90 | { | 91 | { |
91 | errorTol = count; | 92 | errorTol = count; |
92 | } | 93 | } |
93 | 94 | ||
94 | void ODict::slotSettings() | 95 | void ODict::slotSettings() |
95 | { | 96 | { |
96 | ConfigDlg dlg( this, "Config" , true); | 97 | ConfigDlg dlg( this, "Config" , true); |
97 | if ( dlg.exec() == QDialog::Accepted ) | 98 | if ( dlg.exec() == QDialog::Accepted ) |