diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | bd9e6617827818fd043452c08c606f07b78014a0 (patch) | |
tree | 425bb4c3168f9c02f10150f235d2cb998dcc6108 /kbabel/kbabeldict/modules/dbsearchengine/preferenceswidget.cpp | |
download | tdesdk-bd9e6617827818fd043452c08c606f07b78014a0.tar.gz tdesdk-bd9e6617827818fd043452c08c606f07b78014a0.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kbabel/kbabeldict/modules/dbsearchengine/preferenceswidget.cpp')
-rw-r--r-- | kbabel/kbabeldict/modules/dbsearchengine/preferenceswidget.cpp | 111 |
1 files changed, 111 insertions, 0 deletions
diff --git a/kbabel/kbabeldict/modules/dbsearchengine/preferenceswidget.cpp b/kbabel/kbabeldict/modules/dbsearchengine/preferenceswidget.cpp new file mode 100644 index 00000000..3bb65934 --- /dev/null +++ b/kbabel/kbabeldict/modules/dbsearchengine/preferenceswidget.cpp @@ -0,0 +1,111 @@ +#include <qradiobutton.h> +#include <qslider.h> +#include <qspinbox.h> +#include <qcheckbox.h> +#include <qlabel.h> +#include <qlayout.h> +#include <klocale.h> +#include <kfiledialog.h> +#include <kurlrequester.h> +#include <qtoolbutton.h> +#include <klineedit.h> +#include <kstandarddirs.h> + +#include "dbseprefwidget.h" +#include "preferenceswidget.h" + +PreferencesWidget::PreferencesWidget(QWidget *parent, const char* name) + : PrefWidget(parent,name) +{ + QVBoxLayout *layout = new QVBoxLayout(this); +// QLabel *label = new QLabel(i18n("Settings for KDE database search engine"),this); +// layout->addWidget(label); + + dbpw = new DBSearchEnginePref(this); + dbpw->dirInput->setMode(KFile::Directory | KFile::LocalOnly); + + layout->addWidget(dbpw); + resize(QSize(200,200).expandedTo(minimumSizeHint())); + +// connect(dbpw->browseTB_3,SIGNAL(clicked()),SLOT(browse1())); + + emit restoreNow(); //Fill with actual params. + +} + +PreferencesWidget::~PreferencesWidget() +{ +} + +void PreferencesWidget::apply() +{ +emit applyNow(); +} + +void PreferencesWidget::cancel() +{ +emit restoreNow(); +} + +void PreferencesWidget::standard() +{ + + +dbpw->caseSensitiveCB->setChecked(false); +dbpw->normalizeCB->setChecked(true); +dbpw->removeContextCB->setChecked(true); + +dbpw->oneWordSubCB->setChecked(true); +dbpw->twoWordSubCB->setChecked(false); + + +dbpw->RegExpRB->setChecked(false); +dbpw->normalTextRB->setChecked(true); +dbpw->equalCB->setChecked( true ); +dbpw->containsCB->setChecked( true); +dbpw->containedCB->setChecked( true ); + + +dbpw->oneWordSubSB->setValue(20); +dbpw->twoWordSubSB->setValue(8); + +dbpw->maxSB->setValue(500); +dbpw->thresholdSL->setValue(50); +dbpw->thresholdOrigSL->setValue(50); + +dbpw->allRB->setChecked( false); +dbpw->slistRB->setChecked( true); +dbpw->rlistRB->setChecked( false ); + +dbpw->nothingCB->setChecked(true); +dbpw->freqSB->setValue(300); + +dbpw->ignoreLE->setText("&.:"); + +dbpw->autoAddCB_2->setChecked(true); + +QString defaultDir; + KStandardDirs * dirs = KGlobal::dirs(); + if(dirs) + { + defaultDir = dirs->saveLocation("data"); + if(defaultDir.right(1)!="/") + defaultDir+="/"; + defaultDir += "kbabeldict/dbsearchengine"; + } + + dbpw->dirInput->setURL(defaultDir); +} + +void PreferencesWidget::setName(QString n) +{ +dbpw->filenameLB->setText(i18n("Scanning file: %1").arg(n)); +} + +void PreferencesWidget::setEntries(int i) +{ +dbpw->entriesLB->setText(i18n("Entries added: %1").arg(i)); + +} + +#include "preferenceswidget.moc" |