ui v3 to 4
[kdeaccessibility.git] / kmouth / wordcompletion / dictionarycreationwizard.h
blobd2468cd2c0a1eab930163a18bf702a827ef92064
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 <QList>
24 #include <QMap>
25 #include <Q3Dict>
26 #include <k3wizard.h>
27 #include <knuminput.h>
29 #include "ui_creationsourceui.h"
30 #include "ui_creationsourcedetailsui.h"
31 #include "ui_kdedocsourceui.h"
33 class CompletionWizardWidget;
34 class QTextCodec;
35 class QComboBox;
36 class MergeWidget;
38 class CreationSourceDetailsWidget : public QWidget, public Ui::CreationSourceDetailsUI {
39 Q_OBJECT
40 public:
41 CreationSourceDetailsWidget(QWidget *parent, const char *name)
42 : QWidget(parent) {
43 setupUi(this);
44 setObjectName(name);
48 class CreationSourceWidget : public QWidget, public Ui::CreationSourceUI {
49 Q_OBJECT
50 public:
51 CreationSourceWidget(QWidget *parent, const char *name)
52 : QWidget(parent) {
53 setupUi(this);
54 setObjectName(name);
58 class KDEDocSourceWidget : public QWidget, public Ui::KDEDocSourceUI {
59 Q_OBJECT
60 public:
61 KDEDocSourceWidget(QWidget *parent, const char *name)
62 : QWidget(parent) {
63 setupUi(this);
64 setObjectName(name);
68 /**
69 * This class represents a wizard that is used in order to gather all
70 * necessary information for creating a new dictionary for the word
71 * completion.
73 class DictionaryCreationWizard : public K3Wizard {
74 Q_OBJECT
75 public:
76 DictionaryCreationWizard (QWidget *parent, const char *name,
77 QStringList dictionaryNames,
78 QStringList dictionaryFiles,
79 QStringList dictionaryLanguages);
80 ~DictionaryCreationWizard();
82 QString createDictionary();
83 QString name();
84 QString language();
86 private slots:
87 void calculateAppropriate (bool);
89 private:
90 void buildCodecList ();
91 void buildCodecCombo (QComboBox *combo);
93 CreationSourceWidget *creationSource;
94 CreationSourceDetailsWidget *fileWidget;
95 CreationSourceDetailsWidget *dirWidget;
96 KDEDocSourceWidget *kdeDocWidget;
97 MergeWidget *mergeWidget;
99 QList<QTextCodec*> *codecList;
103 * This class represents a widget for creating an initial dictionary from the
104 * KDE documentation.
105 * @author Gunnar Schmi Dt
107 class MergeWidget : public Q3ScrollView {
108 Q_OBJECT
109 public:
110 MergeWidget(K3Wizard *parent, const char *name,
111 QStringList dictionaryNames,
112 QStringList dictionaryFiles,
113 QStringList dictionaryLanguages);
114 ~MergeWidget();
116 QMap <QString, int> mergeParameters ();
117 QString language ();
119 private:
120 Q3Dict<QCheckBox> dictionaries;
121 Q3Dict<KIntNumInput> weights;
122 QMap<QString,QString> languages;
126 * This class represents a widget for creating an initial dictionary from the
127 * KDE documentation.
128 * @author Gunnar Schmi Dt
130 class CompletionWizardWidget : public QWidget, public Ui::KDEDocSourceUI {
131 Q_OBJECT
132 friend class ConfigWizard;
133 public:
134 CompletionWizardWidget(K3Wizard *parent, const char *name);
135 ~CompletionWizardWidget();
137 void ok (KConfig *config);
140 #endif