author | tille <tille> | 2003-01-04 12:27:56 (UTC) |
---|---|---|
committer | tille <tille> | 2003-01-04 12:27:56 (UTC) |
commit | 969924a9d896b70141758b734d898b4423dac357 (patch) (unidiff) | |
tree | 8af7ca893a9c83454520fa93a819fcb562b569ce | |
parent | adbf1d5e2eb8b78e9a8f117fc085aa89f984d4bc (diff) | |
download | opie-969924a9d896b70141758b734d898b4423dac357.zip opie-969924a9d896b70141758b734d898b4423dac357.tar.gz opie-969924a9d896b70141758b734d898b4423dac357.tar.bz2 |
check for querystring and dictionary
and display msgbox
-rw-r--r-- | noncore/apps/odict/odict.cpp | 10 | ||||
-rw-r--r-- | noncore/apps/odict/odict.pro | 3 |
2 files changed, 11 insertions, 2 deletions
diff --git a/noncore/apps/odict/odict.cpp b/noncore/apps/odict/odict.cpp index 2857c65..e2d1d7b 100644 --- a/noncore/apps/odict/odict.cpp +++ b/noncore/apps/odict/odict.cpp | |||
@@ -86,25 +86,33 @@ void ODict::saveConfig() | |||
86 | cfg.writeEntry( "regexp" , regexp ); | 86 | cfg.writeEntry( "regexp" , regexp ); |
87 | cfg.writeEntry( "completewords" , completewords ); | 87 | cfg.writeEntry( "completewords" , completewords ); |
88 | } | 88 | } |
89 | 89 | ||
90 | void ODict::slotDisplayAbout() | 90 | void ODict::slotDisplayAbout() |
91 | { | 91 | { |
92 | QMessageBox::about( this, tr( "About ODict" ), tr( "OPIE-Dictionary ODict \n (c) 2002, 2003 Carsten Niehaus \n cniehaus@handhelds.org \n Version 20030103" ) ); | 92 | QMessageBox::about( this, tr( "About ODict" ), tr( "OPIE-Dictionary ODict \n (c) 2002, 2003 Carsten Niehaus \n cniehaus@handhelds.org \n Version 20030103" ) ); |
93 | } | 93 | } |
94 | 94 | ||
95 | void ODict::slotStartQuery() | 95 | void ODict::slotStartQuery() |
96 | { | 96 | { |
97 | QString querystring = query_le->text(); | 97 | QString querystring = query_le->text(); |
98 | DingWidget *ding = new DingWidget( vbox , querystring , browser_top, browser_bottom, activated_name); | 98 | qDebug("opening dict >%s< for >%s<", activated_name.latin1(),querystring.latin1()); |
99 | if (querystring.isEmpty()){ | ||
100 | qWarning("emphty querysting"); | ||
101 | return; | ||
102 | } | ||
103 | if (!activated_name || activated_name.isEmpty()) | ||
104 | QMessageBox::warning(this,tr("No Dictionary"),tr("Please choose a dictonary") ); | ||
105 | else | ||
106 | DingWidget *ding = new DingWidget( vbox , querystring , browser_top, browser_bottom, activated_name); | ||
99 | } | 107 | } |
100 | 108 | ||
101 | 109 | ||
102 | void ODict::slotSetErrorcount( int count ) | 110 | void ODict::slotSetErrorcount( int count ) |
103 | { | 111 | { |
104 | errorTol = count; | 112 | errorTol = count; |
105 | } | 113 | } |
106 | 114 | ||
107 | void ODict::slotSettings() | 115 | void ODict::slotSettings() |
108 | { | 116 | { |
109 | ConfigDlg dlg( this, "Config" , true); | 117 | ConfigDlg dlg( this, "Config" , true); |
110 | if ( dlg.exec() == QDialog::Accepted ) | 118 | if ( dlg.exec() == QDialog::Accepted ) |
diff --git a/noncore/apps/odict/odict.pro b/noncore/apps/odict/odict.pro index e39fa95..23ef0e0 100644 --- a/noncore/apps/odict/odict.pro +++ b/noncore/apps/odict/odict.pro | |||
@@ -1,14 +1,15 @@ | |||
1 | TEMPLATE= app | 1 | TEMPLATE= app |
2 | CONFIG = qt warn_on release | 2 | CONFIG = qt warn_on debug |
3 | #CONFIG = qt warn_on release | ||
3 | HEADERS = odict.h \ | 4 | HEADERS = odict.h \ |
4 | searchmethoddlg.h \ | 5 | searchmethoddlg.h \ |
5 | configdlg.h \ | 6 | configdlg.h \ |
6 | dingwidget.h \ | 7 | dingwidget.h \ |
7 | dictwidget.h | 8 | dictwidget.h |
8 | 9 | ||
9 | SOURCES = main.cpp \ | 10 | SOURCES = main.cpp \ |
10 | odict.cpp \ | 11 | odict.cpp \ |
11 | searchmethoddlg.cpp \ | 12 | searchmethoddlg.cpp \ |
12 | configdlg.cpp \ | 13 | configdlg.cpp \ |
13 | dictwidget.cpp \ | 14 | dictwidget.cpp \ |
14 | dingwidget.cpp | 15 | dingwidget.cpp |