Port and remove not necessary files
[kdeaccessibility.git] / kmouth / wordcompletion / dictionarycreationwizard.h
blob22aea34c91bc2af0cf4b379e6a99b33f708460b3
1 /***************************************************************************
2 dictionarycreationwizard.h - description
3 -------------------
4 begin : Tue Apr 29 2003
5 copyright : (C) 2002 by Gunnar Schmi Dt
6 email : kmouth@schmi-dt.de
7 ***************************************************************************/
9 /***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
18 // $Id$
20 #ifndef DICTIONARYCREATIONWIZARD_H
21 #define DICTIONARYCREATIONWIZARD_H
23 #include <QtCore/QList>
24 #include <QtCore/QMap>
25 #include <Qt3Support/Q3Dict>
27 #include <k3wizard.h>
28 #include <knuminput.h>
30 #include "ui_creationsourceui.h"
31 #include "ui_creationsourcedetailsui.h"
32 #include "ui_kdedocsourceui.h"
34 class CompletionWizardWidget;
35 class QTextCodec;
36 class QComboBox;
37 class MergeWidget;
39 class CreationSourceDetailsWidget : public QWidget, public Ui::CreationSourceDetailsUI {
40 Q_OBJECT
41 public:
42 CreationSourceDetailsWidget(QWidget *parent, const char *name)
43 : QWidget(parent) {
44 setupUi(this);
45 setObjectName(name);
49 class CreationSourceWidget : public QWidget, public Ui::CreationSourceUI {
50 Q_OBJECT
51 public:
52 CreationSourceWidget(QWidget *parent, const char *name)
53 : QWidget(parent) {
54 setupUi(this);
55 setObjectName(name);
59 class KDEDocSourceWidget : public QWidget, public Ui::KDEDocSourceUI {
60 Q_OBJECT
61 public:
62 KDEDocSourceWidget(QWidget *parent, const char *name)
63 : QWidget(parent) {
64 setupUi(this);
65 setObjectName(name);
66 languageButton->showLanguageCodes(true);
67 languageButton->loadAllLanguages();
69 ooDictURL->setFilter ("*.dic");
73 /**
74 * This class represents a wizard that is used in order to gather all
75 * necessary information for creating a new dictionary for the word
76 * completion.
78 class DictionaryCreationWizard : public K3Wizard {
79 Q_OBJECT
80 public:
81 DictionaryCreationWizard (QWidget *parent, const char *name,
82 QStringList dictionaryNames,
83 QStringList dictionaryFiles,
84 QStringList dictionaryLanguages);
85 ~DictionaryCreationWizard();
87 QString createDictionary();
88 QString name();
89 QString language();
91 private slots:
92 void calculateAppropriate (bool);
94 private:
95 void buildCodecList ();
96 void buildCodecCombo (QComboBox *combo);
98 CreationSourceWidget *creationSource;
99 CreationSourceDetailsWidget *fileWidget;
100 CreationSourceDetailsWidget *dirWidget;
101 KDEDocSourceWidget *kdeDocWidget;
102 MergeWidget *mergeWidget;
104 QList<QTextCodec*> *codecList;
108 * This class represents a widget for creating an initial dictionary from the
109 * KDE documentation.
110 * @author Gunnar Schmi Dt
112 class MergeWidget : public Q3ScrollView {
113 Q_OBJECT
114 public:
115 MergeWidget(K3Wizard *parent, const char *name,
116 QStringList dictionaryNames,
117 QStringList dictionaryFiles,
118 QStringList dictionaryLanguages);
119 ~MergeWidget();
121 QMap <QString, int> mergeParameters ();
122 QString language ();
124 private:
125 Q3Dict<QCheckBox> dictionaries;
126 Q3Dict<KIntNumInput> weights;
127 QMap<QString,QString> languages;
131 * This class represents a widget for creating an initial dictionary from the
132 * KDE documentation.
133 * @author Gunnar Schmi Dt
135 class CompletionWizardWidget : public QWidget, public Ui::KDEDocSourceUI {
136 Q_OBJECT
137 friend class ConfigWizard;
138 public:
139 CompletionWizardWidget(K3Wizard *parent, const char *name);
140 ~CompletionWizardWidget();
142 void ok (KConfig *config);
145 #endif