summaryrefslogtreecommitdiff
path: root/noncore/apps/odict
authorcniehaus <cniehaus>2003-01-03 22:31:19 (UTC)
committer cniehaus <cniehaus>2003-01-03 22:31:19 (UTC)
commitda1889933ccd03ef948fef7debda0b7e13f12add (patch) (side-by-side diff)
tree98df5c800d091800f1264dcbd601b951b0522a96 /noncore/apps/odict
parent5c6c68a2297762fe69ac6d1bd62fd0e09afeccb3 (diff)
downloadopie-da1889933ccd03ef948fef7debda0b7e13f12add.zip
opie-da1889933ccd03ef948fef7debda0b7e13f12add.tar.gz
opie-da1889933ccd03ef948fef7debda0b7e13f12add.tar.bz2
minifixes to avoid clashes with tille
Diffstat (limited to 'noncore/apps/odict') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/odict/dingwidget.cpp8
-rw-r--r--noncore/apps/odict/odict.cpp9
-rw-r--r--noncore/apps/odict/odict.h2
3 files changed, 16 insertions, 3 deletions
diff --git a/noncore/apps/odict/dingwidget.cpp b/noncore/apps/odict/dingwidget.cpp
index 6e3179f..61ddbbf 100644
--- a/noncore/apps/odict/dingwidget.cpp
+++ b/noncore/apps/odict/dingwidget.cpp
@@ -72,14 +72,16 @@ void DingWidget::parseInfo( QStringList &lines, QString &top, QString &bottom )
current = *it;
left = current.left( current.find(reg_div) );
right = current.right( current.length() - current.find(reg_div) - 1 );
- if ( left.contains( reg_word ) ){
+ if ( left.contains( reg_word ) )
+ {
left.replace( queryword, substitute );
toplist.append( left + " -> " + right);
- }else{
+ }
+ else
+ {
right.replace( reg_word, substitute );
bottomlist.append( right + " -> " + left );
}
- // .replace( reg_word, substitute );
}
//thats it, the lists are rendered. Lets put them in one string
diff --git a/noncore/apps/odict/odict.cpp b/noncore/apps/odict/odict.cpp
index 166f6b9..7de9169 100644
--- a/noncore/apps/odict/odict.cpp
+++ b/noncore/apps/odict/odict.cpp
@@ -32,6 +32,7 @@
#include <qstring.h>
#include <qaction.h>
#include <qtextbrowser.h>
+#include <qcombobox.h>
#include <qpe/resource.h>
@@ -45,6 +46,7 @@ ODict::ODict() : QMainWindow()
QHBox *hbox = new QHBox( vbox );
QLabel* query_label = new QLabel( tr( "Query:" ) , hbox ); query_label->show();
query_le = new QLineEdit( hbox );
+ query_co = new QComboBox( hbox );
ok_button = new QPushButton( tr( "&Ok" ), hbox );
connect( ok_button, SIGNAL( released() ), this, SLOT( slotStartQuery() ) );
browser_top = new QTextBrowser( vbox );
@@ -62,6 +64,13 @@ void ODict::loadConfig()
casesens = cfg.readEntry( "casesens" ).toInt();
regexp = cfg.readEntry( "regexp" ).toInt();
completewords = cfg.readEntry( "completewords" ).toInt();
+
+ QStringList groupListCfg = cfg.groupList().grep( "Method_" );
+ for ( QStringList::Iterator it = groupListCfg.begin() ; it != groupListCfg.end() ; ++it )
+ {
+ cfg.setGroup( *it );
+ query_co->insertItem( cfg.readEntry( "Name" ) );
+ }
}
diff --git a/noncore/apps/odict/odict.h b/noncore/apps/odict/odict.h
index ef0822d..7c1f32f 100644
--- a/noncore/apps/odict/odict.h
+++ b/noncore/apps/odict/odict.h
@@ -20,6 +20,7 @@ class QVBoxLayout;
class QActionGroup;
class DingWidget;
class QTextBrowser;
+class QComboBox;
class ODict : public QMainWindow
{
@@ -36,6 +37,7 @@ class ODict : public QMainWindow
QMenuBar *menu;
QHBox *hbox;
QLineEdit *query_le;
+ QComboBox *query_co;
QPushButton *ok_button;
QVBoxLayout *vbox_layout;