summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/odict/dingwidget.cpp28
-rw-r--r--noncore/apps/odict/dingwidget.h2
-rw-r--r--noncore/apps/odict/odict.cpp6
3 files changed, 13 insertions, 23 deletions
diff --git a/noncore/apps/odict/dingwidget.cpp b/noncore/apps/odict/dingwidget.cpp
index 5b5d731..cfef84d 100644
--- a/noncore/apps/odict/dingwidget.cpp
+++ b/noncore/apps/odict/dingwidget.cpp
@@ -35,15 +35,6 @@ DingWidget::DingWidget( )
35{ 35{
36 methodname = QString::null; 36 methodname = QString::null;
37 trenner = "::";//QString::null; 37 trenner = QString::null;
38 lines = 0L; 38 lines = 0L;
39 loadValues();
40
41 //X qDebug( topbrowser );
42 //X qDebug( top );
43//X
44 //X topbrowser = "blahbalh";
45 //X
46 //X qDebug( topbrowser );
47 //X qDebug( top );
48} 39}
49 40
@@ -69,4 +60,5 @@ void DingWidget::loadDict( QString name )
69 } 60 }
70 qDebug( "loadedDict(...) ist beended" ); 61 qDebug( "loadedDict(...) ist beended" );
62 loadValues();
71} 63}
72 64
@@ -109,10 +101,11 @@ void DingWidget::loadValues()
109{ 101{
110 Config cfg( "odict" ); 102 Config cfg( "odict" );
111 cfg.setGroup( "Method_"+methodname ); 103 cfg.setGroup( "Method_" + methodname );
112 //trenner = cfg.readEntry( "Seperator" ); 104 trenner = cfg.readEntry( "Seperator" );
113} 105}
114 106
115BroswerContent DingWidget::parseInfo() 107BroswerContent DingWidget::parseInfo()
116{ 108{
109 if ( isCompleteWord ) queryword = " " + queryword + " ";
117 QStringList search = lines.grep( queryword , isCaseSensitive ); 110 QStringList search = lines.grep( queryword , isCaseSensitive );
118 111
@@ -120,9 +113,4 @@ BroswerContent DingWidget::parseInfo()
120 QString left; 113 QString left;
121 QString right; 114 QString right;
122 QString html_header = "<html><table>";
123 QString html_footer = "</table></html>";
124 QString html_table_left = "<tr><td width='50'>";
125 QString html_table_sep = "</td><td>";
126 QString html_table_right = "</td></tr>";
127 QRegExp reg_div( trenner ); 115 QRegExp reg_div( trenner );
128 QRegExp reg_word( queryword ); 116 QRegExp reg_word( queryword );
@@ -135,4 +123,10 @@ BroswerContent DingWidget::parseInfo()
135 * zum andern funktioniert der Code nicht so wie er sollte. 123 * zum andern funktioniert der Code nicht so wie er sollte.
136 QString substitute = "<a href=''>"+queryword+"</a>"; 124 QString substitute = "<a href=''>"+queryword+"</a>";
125
126 QString html_header = "<html><table>";
127 QString html_footer = "</table></html>";
128 QString html_table_left = "<tr><td width='50'>";
129 QString html_table_sep = "</td><td>";
130 QString html_table_right = "</td></tr>";
137 131
138 for( QStringList::Iterator it = search.begin() ; it != search.end() ; ++it ) 132 for( QStringList::Iterator it = search.begin() ; it != search.end() ; ++it )
diff --git a/noncore/apps/odict/dingwidget.h b/noncore/apps/odict/dingwidget.h
index ba37009..74f40c9 100644
--- a/noncore/apps/odict/dingwidget.h
+++ b/noncore/apps/odict/dingwidget.h
@@ -30,4 +30,5 @@ class DingWidget
30 void setQueryWord( QString ); 30 void setQueryWord( QString );
31 void setDict( QString ); 31 void setDict( QString );
32 void loadValues();
32 33
33 private: 34 private:
@@ -41,5 +42,4 @@ class DingWidget
41 42
42 QString search_word; 43 QString search_word;
43 void loadValues();
44 QString queryword; 44 QString queryword;
45 QString methodname; 45 QString methodname;
diff --git a/noncore/apps/odict/odict.cpp b/noncore/apps/odict/odict.cpp
index 42604ee..78c3f90 100644
--- a/noncore/apps/odict/odict.cpp
+++ b/noncore/apps/odict/odict.cpp
@@ -58,4 +58,5 @@ ODict::ODict() : QMainWindow()
58 58
59 ding = new DingWidget(); 59 ding = new DingWidget();
60 ding->loadValues();
60 61
61 loadConfig(); 62 loadConfig();
@@ -111,7 +112,4 @@ void ODict::slotStartQuery()
111 //X { 112 //X {
112 113
113 if ( casesens ) qDebug( "casesens = TRUE" );
114 else qDebug( "casesens = FALSE" );
115
116 ding->setCaseSensitive( casesens ); 114 ding->setCaseSensitive( casesens );
117 ding->setCompleteWord( completewords ); 115 ding->setCompleteWord( completewords );
@@ -120,8 +118,6 @@ void ODict::slotStartQuery()
120 if ( activated_name != ding->loadedDict() ) 118 if ( activated_name != ding->loadedDict() )
121 { 119 {
122 qDebug( "ComboBox geändert" );
123 ding->loadDict(activated_name); 120 ding->loadDict(activated_name);
124 } 121 }
125 else qDebug( "ComboBox war GLEICH" );
126 122
127 BroswerContent test = ding->setText( querystring ); 123 BroswerContent test = ding->setText( querystring );