Diffstat (limited to 'noncore/apps/odict/dingwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/odict/dingwidget.cpp | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/noncore/apps/odict/dingwidget.cpp b/noncore/apps/odict/dingwidget.cpp index 6154d68..2913836 100644 --- a/noncore/apps/odict/dingwidget.cpp +++ b/noncore/apps/odict/dingwidget.cpp | |||
@@ -37,2 +37,3 @@ DingWidget::DingWidget(QString word, QTextBrowser *browser_top, QTextBrowser *br | |||
37 | trenner = QString::null; | 37 | trenner = QString::null; |
38 | lines = 0L; | ||
38 | loadValues(); | 39 | loadValues(); |
@@ -40,3 +41,2 @@ DingWidget::DingWidget(QString word, QTextBrowser *browser_top, QTextBrowser *br | |||
40 | QFile file( opie_dir+"/noncore/apps/odict/eng_ita.dic" ); | 41 | QFile file( opie_dir+"/noncore/apps/odict/eng_ita.dic" ); |
41 | QStringList lines; | ||
42 | 42 | ||
@@ -54,6 +54,14 @@ DingWidget::DingWidget(QString word, QTextBrowser *browser_top, QTextBrowser *br | |||
54 | 54 | ||
55 | topbrowser = browser_top; | ||
56 | bottombrowser = browser_bottom; | ||
57 | } | ||
58 | |||
59 | void DingWidget::setText() | ||
60 | { | ||
55 | QString top, bottom; | 61 | QString top, bottom; |
56 | parseInfo( lines, top , bottom ); | 62 | QStringList test = lines; |
57 | browser_top->setText( top ); | 63 | parseInfo( test, top , bottom ); |
58 | browser_bottom->setText( bottom ); | 64 | |
65 | topbrowser->setText( top ); | ||
66 | bottombrowser->setText( bottom ); | ||
59 | } | 67 | } |
@@ -78,6 +86,4 @@ void DingWidget::parseInfo( QStringList &lines, QString &top, QString &bottom ) | |||
78 | QString html_table_right = "</td></tr>"; | 86 | QString html_table_right = "</td></tr>"; |
79 | QRegExp reg_div( "\\" ); | 87 | QRegExp reg_div( trenner ); |
80 | //QRegExp reg_div( trenner ); | ||
81 | QRegExp reg_word( queryword ); | 88 | QRegExp reg_word( queryword ); |
82 | //QString substitute = "<font color=red>"+queryword+"</font>"; | ||
83 | QString substitute = "<a href=''>"+queryword+"</a>"; | 89 | QString substitute = "<a href=''>"+queryword+"</a>"; |