blob: 8bfd2d476f7a810f6df1b717b838d6728aaaa75f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
#include <tqradiobutton.h>
#include <tqslider.h>
#include <tqspinbox.h>
#include <tqcheckbox.h>
#include <tqlabel.h>
#include <tqlayout.h>
#include <klocale.h>
#include <kfiledialog.h>
#include <kurlrequester.h>
#include <tqtoolbutton.h>
#include <klineedit.h>
#include <kstandarddirs.h>
#include <knuminput.h>
#include "dbse2.h"
#include "preferenceswidget.h"
KDB2PreferencesWidget::KDB2PreferencesWidget(TQWidget *parent, const char* name)
: PrefWidget(parent,name)
{
TQVBoxLayout *layout = new TQVBoxLayout(this);
// TQLabel *label = new TQLabel(i18n("Settings for TDE Database Search Engine"),this);
// layout->addWidget(label);
dbpw = new DBSearchEnginePrefWidget(this);
dbpw->dbDirectory->setMode(KFile::Directory | KFile::LocalOnly);
dbpw->show();
layout->addWidget(dbpw);
setMinimumSize(300,300);
standard();
// connect(dbpw->browseTB_3,TQT_SIGNAL(clicked()),TQT_SLOT(browse1()));
emit restoreNow(); //Fill with actual params.
}
KDB2PreferencesWidget::~KDB2PreferencesWidget()
{
}
void KDB2PreferencesWidget::apply()
{
emit applyNow();
}
void KDB2PreferencesWidget::cancel()
{
emit restoreNow();
}
void KDB2PreferencesWidget::standard()
{
TQString defaultDir;
KStandardDirs * dirs = KGlobal::dirs();
if(dirs)
{
defaultDir = dirs->saveLocation("data");
if(defaultDir.right(1)!="/")
defaultDir+="/";
defaultDir += "kbabeldict/dbsearchengine2";
}
dbpw->dbDirectory->setURL(defaultDir);
dbpw->autoUpdate->setChecked(true);
dbpw->useSentence->setChecked(true);
dbpw->useGlossary->setChecked(true);
dbpw->useExact->setChecked(true);
dbpw->useDivide->setChecked(true);
dbpw->useAlpha->setChecked(true);
dbpw->useWordByWord->setChecked(true);
dbpw->useDynamic->setChecked(true);
dbpw->scoreDivide->setValue(90);
dbpw->scoreExact->setValue(100);
dbpw->scoreSentence->setValue(90);
dbpw->scoreWordByWord->setValue(70);
dbpw->scoreGlossary->setValue(98);
dbpw->scoreAlpha->setValue(98);
dbpw->scoreDynamic->setValue(80);
dbpw->numberOfResult->setValue(5);
dbpw->minScore->setValue(60);
dbpw->firstCapital->setChecked(true);
dbpw->allCapital->setChecked(false);
dbpw->accelerator->setChecked(true);
dbpw->sameLetter->setChecked(true);
dbpw->checkLang->setChecked(true);
dbpw->useFilters->setChecked(false);
dbpw->dateToday->setChecked(false);
/*
*/
//dbpw->dirInput->setURL(defaultDir);
}
#include "preferenceswidget.moc"
|