Fix some error
[kdeaccessibility.git] / kmouth / wordcompletion / dictionarycreationwizard.h
blob2a8bc27d958ca6f53743270b1889c80ae7d37145
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 <q3ptrlist.h>
24 #include <qmap.h>
26 #include <kwizard.h>
27 #include <knuminput.h>
28 #include "kdedocsourceui.h"
30 class CreationSourceUI;
31 class CompletionWizardWidget;
32 class CreationSourceDetailsUI;
33 class KDEDocSourceUI;
34 class QTextCodec;
35 class QComboBox;
36 class MergeWidget;
38 /**
39 * This class represents a wizard that is used in order to gather all
40 * necessary information for creating a new dictionary for the word
41 * completion.
43 class DictionaryCreationWizard : public KWizard {
44 Q_OBJECT
45 public:
46 DictionaryCreationWizard (QWidget *parent, const char *name,
47 QStringList dictionaryNames,
48 QStringList dictionaryFiles,
49 QStringList dictionaryLanguages);
50 ~DictionaryCreationWizard();
52 QString createDictionary();
53 QString name();
54 QString language();
56 private slots:
57 void calculateAppropriate (bool);
59 private:
60 void buildCodecList ();
61 void buildCodecCombo (QComboBox *combo);
63 CreationSourceUI *creationSource;
64 CreationSourceDetailsUI *fileWidget;
65 CreationSourceDetailsUI *dirWidget;
66 KDEDocSourceUI *kdeDocWidget;
67 MergeWidget *mergeWidget;
69 Q3PtrList<QTextCodec> *codecList;
72 /**
73 * This class represents a widget for creating an initial dictionary from the
74 * KDE documentation.
75 * @author Gunnar Schmi Dt
77 class MergeWidget : public Q3ScrollView {
78 Q_OBJECT
79 public:
80 MergeWidget(KWizard *parent, const char *name,
81 QStringList dictionaryNames,
82 QStringList dictionaryFiles,
83 QStringList dictionaryLanguages);
84 ~MergeWidget();
86 QMap <QString, int> mergeParameters ();
87 QString language ();
89 private:
90 Q3Dict<QCheckBox> dictionaries;
91 Q3Dict<KIntNumInput> weights;
92 QMap<QString,QString> languages;
95 /**
96 * This class represents a widget for creating an initial dictionary from the
97 * KDE documentation.
98 * @author Gunnar Schmi Dt
100 class CompletionWizardWidget : public KDEDocSourceUI {
101 Q_OBJECT
102 friend class ConfigWizard;
103 public:
104 CompletionWizardWidget(KWizard *parent, const char *name);
105 ~CompletionWizardWidget();
107 void ok (KConfig *config);
110 #endif