From c5353a1315a1018886ccaa0d783d53d8fada76f0 Mon Sep 17 00:00:00 2001 From: cramblitt Date: Thu, 1 Jun 2006 02:36:58 +0000 Subject: [PATCH] ui v3 to 4 git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/KDE/kdeaccessibility@547173 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kmouth/CMakeLists.txt | 5 +- kmouth/wordcompletion/creationsourcedetailsui.ui | 376 +++++++++++---------- kmouth/wordcompletion/creationsourceui.ui | 334 +++++++++--------- kmouth/wordcompletion/dictionarycreationwizard.cpp | 17 +- kmouth/wordcompletion/dictionarycreationwizard.h | 48 ++- kmouth/wordcompletion/kdedocsourceui.ui | 214 ++++++------ kmouth/wordcompletion/wordcompletionwidget.cpp | 3 + 7 files changed, 512 insertions(+), 485 deletions(-) rewrite kmouth/wordcompletion/creationsourcedetailsui.ui (100%) rewrite kmouth/wordcompletion/creationsourceui.ui (96%) rewrite kmouth/wordcompletion/kdedocsourceui.ui (100%) diff --git a/kmouth/CMakeLists.txt b/kmouth/CMakeLists.txt index 9879c10e..0919e20e 100644 --- a/kmouth/CMakeLists.txt +++ b/kmouth/CMakeLists.txt @@ -17,13 +17,10 @@ set(libwordcompletion_SRCS ${CMAKE_SOURCE_DIR}/kmouth/wordcompletion/klanguagebuttonhelper.cpp ) -kde4_add_ui3_files(libwordcompletion_SRCS +kde4_add_ui_files(libwordcompletion_SRCS ${CMAKE_SOURCE_DIR}/kmouth/wordcompletion/creationsourceui.ui ${CMAKE_SOURCE_DIR}/kmouth/wordcompletion/creationsourcedetailsui.ui ${CMAKE_SOURCE_DIR}/kmouth/wordcompletion/kdedocsourceui.ui - ) - -kde4_add_ui_files(libwordcompletion_SRCS ${CMAKE_SOURCE_DIR}/kmouth/wordcompletion/wordcompletionui.ui ) add_subdirectory( icons ) diff --git a/kmouth/wordcompletion/creationsourcedetailsui.ui b/kmouth/wordcompletion/creationsourcedetailsui.ui dissimilarity index 100% index 5880b3a5..d25032c1 100644 --- a/kmouth/wordcompletion/creationsourcedetailsui.ui +++ b/kmouth/wordcompletion/creationsourcedetailsui.ui @@ -1,184 +1,192 @@ - -CreationSourceDetailsUI - - - CreationSourceDetailsUI - - - - 0 - 0 - 421 - 189 - - - - - unnamed - - - - spellCheckBox - - - &Compare to OpenOffice.org dictionary: - - - false - - - If you select this check box the words are spell-checked before they are inserted into the new dictionary. - - - - - encodingLabel - - - - 5 - 0 - 0 - 0 - - - - Character &encoding: - - - encodingCombo - - - With this combo box you select the character encoding used to load text files. This combo box is not used for XML files or for dictionary files. - - - - - urlLabel - - - - 5 - 0 - 0 - 0 - - - - &Filename: - - - url - - - With this input field you specify which file you want to load for creating the new dictionary. - - - - - url - - - - 5 - 5 - 1 - 0 - - - - With this input field you specify which file you want to load for creating the new dictionary. - - - - - encodingCombo - - - - 1 - 0 - 1 - 0 - - - - With this combo box you select the character encoding used to load text files. This combo box is not used for XML files or for dictionary files. - - - - - ooDictURL - - - false - - - - 5 - 0 - 1 - 0 - - - - With this input field you select the OpenOffice.org directory that will be used to spellcheck the words of the new dictionary. - - - - - languageLabel - - - - 5 - 0 - 0 - 0 - - - - &Language: - - - With this combo box you decide which language should be associated with the new dictionary. - - - - - - - spellCheckBox - toggled(bool) - ooDictURL - setEnabled(bool) - - - - kinputdialog.h - klanguagebutton.h - klanguagebuttonhelper.h - creationsourcedetailsui.ui.h - - - class KLanguageButton - - - KLanguageButton *languageButton; - - - languageButton_activated( int index ) - - - init() - - - - kinputdialog.h - kpushbutton.h - kcombobox.h - kurlrequester.h - kinputdialog.h - kpushbutton.h - - + + + + + CreationSourceDetailsUI + + + + 0 + 0 + 421 + 189 + + + + + 11 + + + 6 + + + + + If you select this check box the words are spell-checked before they are inserted into the new dictionary. + + + &Compare to OpenOffice.org dictionary: + + + false + + + + + + + + 5 + 0 + 0 + 0 + + + + With this combo box you select the character encoding used to load text files. This combo box is not used for XML files or for dictionary files. + + + Character &encoding: + + + encodingCombo + + + + + + + + 5 + 0 + 0 + 0 + + + + With this input field you specify which file you want to load for creating the new dictionary. + + + &Filename: + + + url + + + + + + + + 5 + 5 + 1 + 0 + + + + With this input field you specify which file you want to load for creating the new dictionary. + + + + + + + + 1 + 0 + 1 + 0 + + + + With this combo box you select the character encoding used to load text files. This combo box is not used for XML files or for dictionary files. + + + + + + + false + + + + 5 + 0 + 1 + 0 + + + + With this input field you select the OpenOffice.org directory that will be used to spellcheck the words of the new dictionary. + + + + + + + + + + + 5 + 0 + 0 + 0 + + + + With this combo box you decide which language should be associated with the new dictionary. + + + &Language: + + + + + + + qPixmapFromMimeSource + + + KUrlRequester + QFrame +
kurlrequester.h
+ 0 + +
+ + KLanguageButton + QWidget +
klanguagebutton.h
+ 0 + +
+ + KComboBox + QComboBox +
kcombobox.h
+ 0 + +
+
+ + + + spellCheckBox + toggled(bool) + ooDictURL + setEnabled(bool) + + + 20 + 20 + + + 20 + 20 + + + + +
diff --git a/kmouth/wordcompletion/creationsourceui.ui b/kmouth/wordcompletion/creationsourceui.ui dissimilarity index 96% index 13a7c062..432df0c1 100644 --- a/kmouth/wordcompletion/creationsourceui.ui +++ b/kmouth/wordcompletion/creationsourceui.ui @@ -1,179 +1,155 @@ - -CreationSourceUI - - - CreationSourceUI - - - - 0 - 0 - 318 - 223 - - - - - unnamed - - - - createButton - - - C&reate new dictionary: - - - true - - - If you select this box a new dictionary is created by either loading a dictionary file or by counting the individual words in a text. - - - - - mergeButton - - - &Merge dictionaries - - - If you select this box a new dictionary is created by merging existing dictionaries. - - - - - fileButton - - - true - - - - 1 - 0 - 1 - 0 - - - - From &file - - - If you select this box a new dictionary is created by loading a file. You may either select an XML file, a standard text file or a file containing a word completion dictionary. If you select a standard text file or an XML file the frequentness of the individual words is detected by simply counting the occurrences of each word. - - - - - kdeDocButton - - - true - - - - 1 - 0 - 1 - 0 - - - - From &KDE documentation - - - true - - - If you select this box a new dictionary is created by parsing the KDE documentation. The frequentness of the individual words is detect by simply counting the occurrences of each word. - - - - - directoryButton - - - true - - - - 1 - 0 - 1 - 0 - - - - From f&older - - - If you select this box a new dictionary is created by loading all files in a folder and its subdirectories. - - - - - spacer1 - - - Vertical - - - Fixed - - - - 20 - 40 - - - - - - emptyButton - - - Create an &empty wordlist - - - If you select this box a blank dictionary without any entries is created. As KMouth automatically adds newly typed words to the dictionaries it will learn your vocabulary with the time. - - - - - - - createButton - toggled(bool) - kdeDocButton - setEnabled(bool) - - - createButton - toggled(bool) - fileButton - setEnabled(bool) - - - createButton - toggled(bool) - directoryButton - setEnabled(bool) - - - - qbuttongroup.h - creationsourceui.ui.h - - - class QButtonGroup - - - QButtonGroup *group2; - QButtonGroup *group1; - - - init() - destroy() - - - + + + + + CreationSourceUI + + + + 0 + 0 + 318 + 223 + + + + + + + C&reate new dictionary: + + + true + + + If you select this box a new dictionary is created by either loading a dictionary file or by counting the individual words in a text. + + + + + + + &Merge dictionaries + + + If you select this box a new dictionary is created by merging existing dictionaries. + + + + + + + true + + + + 1 + 0 + 1 + 0 + + + + From &file + + + If you select this box a new dictionary is created by loading a file. You may either select an XML file, a standard text file or a file containing a word completion dictionary. If you select a standard text file or an XML file the frequentness of the individual words is detected by simply counting the occurrences of each word. + + + + + + + true + + + + 1 + 0 + 1 + 0 + + + + From &KDE documentation + + + true + + + If you select this box a new dictionary is created by parsing the KDE documentation. The frequentness of the individual words is detect by simply counting the occurrences of each word. + + + + + + + true + + + + 1 + 0 + 1 + 0 + + + + From f&older + + + If you select this box a new dictionary is created by loading all files in a folder and its subdirectories. + + + + + + + + 20 + 40 + + + + Fixed + + + Vertical + + + + + + + Create an &empty wordlist + + + If you select this box a blank dictionary without any entries is created. As KMouth automatically adds newly typed words to the dictionaries it will learn your vocabulary with the time. + + + + + + + qPixmapFromMimeSource + + + createButton + toggled(bool) + kdeDocButton + setEnabled(bool) + + + createButton + toggled(bool) + fileButton + setEnabled(bool) + + + createButton + toggled(bool) + directoryButton + setEnabled(bool) + + + diff --git a/kmouth/wordcompletion/dictionarycreationwizard.cpp b/kmouth/wordcompletion/dictionarycreationwizard.cpp index 6ebedc3c..ea80a6a6 100644 --- a/kmouth/wordcompletion/dictionarycreationwizard.cpp +++ b/kmouth/wordcompletion/dictionarycreationwizard.cpp @@ -40,9 +40,7 @@ #include #include "dictionarycreationwizard.h" #include "klanguagebutton.h" -#include "creationsourceui.h" -#include "creationsourcedetailsui.h" -#include "kdedocsourceui.h" +#include "klanguagebuttonhelper.h" #include "wordlist.h" DictionaryCreationWizard::DictionaryCreationWizard (QWidget *parent, const char *name, @@ -52,16 +50,16 @@ DictionaryCreationWizard::DictionaryCreationWizard (QWidget *parent, const char { buildCodecList (); - creationSource = new CreationSourceUI (this, "source page"); + creationSource = new CreationSourceWidget(this, "source page"); addPage (creationSource, i18n("Source of New Dictionary (1)")); setHelpEnabled (creationSource, false); setFinishEnabled (creationSource, false); - fileWidget= new CreationSourceDetailsUI (this, "file source page"); + fileWidget= new CreationSourceDetailsWidget (this, "file source page"); addPage (fileWidget, i18n("Source of New Dictionary (2)")); buildCodecCombo (fileWidget->encodingCombo); - dirWidget= new CreationSourceDetailsUI (this, "directory source page"); + dirWidget= new CreationSourceDetailsWidget (this, "directory source page"); addPage (dirWidget, i18n("Source of New Dictionary (2)")); dirWidget->urlLabel->setText (i18n("&Directory:")); dirWidget->urlLabel->setWhatsThis( i18n("With this input field you specify which directory you want to load for creating the new dictionary.")); @@ -69,8 +67,9 @@ DictionaryCreationWizard::DictionaryCreationWizard (QWidget *parent, const char dirWidget->url->setWhatsThis( i18n("With this input field you specify which directory you want to load for creating the new dictionary.")); buildCodecCombo (dirWidget->encodingCombo); - kdeDocWidget= new KDEDocSourceUI (this, "KDE documentation source page"); + kdeDocWidget= new KDEDocSourceWidget (this, "KDE documentation source page"); addPage (kdeDocWidget, i18n("Source of New Dictionary (2)")); + loadLanguageList(kdeDocWidget->languageButton); mergeWidget = new MergeWidget (this, "merge source page", dictionaryNames, dictionaryFiles, dictionaryLanguages); addPage (mergeWidget, i18n("Source of New Dictionary (2)")); @@ -345,7 +344,9 @@ QString MergeWidget::language () { /***************************************************************************/ CompletionWizardWidget::CompletionWizardWidget (K3Wizard *parent, const char *name) - : KDEDocSourceUI (parent, name) { + : QWidget (parent) { + setupUi(this); + setObjectName(name); } CompletionWizardWidget::~CompletionWizardWidget() { diff --git a/kmouth/wordcompletion/dictionarycreationwizard.h b/kmouth/wordcompletion/dictionarycreationwizard.h index 1ca454c2..d2468cd2 100644 --- a/kmouth/wordcompletion/dictionarycreationwizard.h +++ b/kmouth/wordcompletion/dictionarycreationwizard.h @@ -25,16 +25,46 @@ #include #include #include -#include "kdedocsourceui.h" -class CreationSourceUI; +#include "ui_creationsourceui.h" +#include "ui_creationsourcedetailsui.h" +#include "ui_kdedocsourceui.h" + class CompletionWizardWidget; -class CreationSourceDetailsUI; -class KDEDocSourceUI; class QTextCodec; class QComboBox; class MergeWidget; +class CreationSourceDetailsWidget : public QWidget, public Ui::CreationSourceDetailsUI { + Q_OBJECT +public: + CreationSourceDetailsWidget(QWidget *parent, const char *name) + : QWidget(parent) { + setupUi(this); + setObjectName(name); + } +}; + +class CreationSourceWidget : public QWidget, public Ui::CreationSourceUI { + Q_OBJECT +public: + CreationSourceWidget(QWidget *parent, const char *name) + : QWidget(parent) { + setupUi(this); + setObjectName(name); + } +}; + +class KDEDocSourceWidget : public QWidget, public Ui::KDEDocSourceUI { + Q_OBJECT +public: + KDEDocSourceWidget(QWidget *parent, const char *name) + : QWidget(parent) { + setupUi(this); + setObjectName(name); + } +}; + /** * This class represents a wizard that is used in order to gather all * necessary information for creating a new dictionary for the word @@ -60,10 +90,10 @@ private: void buildCodecList (); void buildCodecCombo (QComboBox *combo); - CreationSourceUI *creationSource; - CreationSourceDetailsUI *fileWidget; - CreationSourceDetailsUI *dirWidget; - KDEDocSourceUI *kdeDocWidget; + CreationSourceWidget *creationSource; + CreationSourceDetailsWidget *fileWidget; + CreationSourceDetailsWidget *dirWidget; + KDEDocSourceWidget *kdeDocWidget; MergeWidget *mergeWidget; QList *codecList; @@ -97,7 +127,7 @@ private: * KDE documentation. * @author Gunnar Schmi Dt */ -class CompletionWizardWidget : public KDEDocSourceUI { +class CompletionWizardWidget : public QWidget, public Ui::KDEDocSourceUI { Q_OBJECT friend class ConfigWizard; public: diff --git a/kmouth/wordcompletion/kdedocsourceui.ui b/kmouth/wordcompletion/kdedocsourceui.ui dissimilarity index 100% index 72fe06ab..b803060b 100644 --- a/kmouth/wordcompletion/kdedocsourceui.ui +++ b/kmouth/wordcompletion/kdedocsourceui.ui @@ -1,101 +1,113 @@ - -KDEDocSourceUI - - - KDEDocSourceUI - - - - 0 - 0 - 272 - 100 - - - - - unnamed - - - - spellCheckBox - - - &Compare to OpenOffice.org dictionary: - - - false - - - If you select this check box the words from the KDE documentation are spell-checked before they are inserted into the new dictionary. - - - - - ooDictURL - - - false - - - - 5 - 0 - 1 - 0 - - - - With this input field you select the OpenOffice.org directory that will be used to spellcheck the words of the new dictionary. - - - - - languageLabel - - - - 5 - 0 - 0 - 0 - - - - &Language: - - - With this combo box you select which of the installed languages is used for creating the new dictionary. KMouth will only parse documentation files of this language. - - - - - - - spellCheckBox - toggled(bool) - ooDictURL - setEnabled(bool) - - - - klanguagebutton.h - klanguagebuttonhelper.h - kdedocsourceui.ui.h - - - class KLanguageButton - - - KLanguageButton *languageButton; - - - init() - - - - kurlrequester.h - klineedit.h - kpushbutton.h - - + + + + + KDEDocSourceUI + + + + 0 + 0 + 272 + 100 + + + + + 11 + + + 6 + + + + + If you select this check box the words from the KDE documentation are spell-checked before they are inserted into the new dictionary. + + + &Compare to OpenOffice.org dictionary: + + + false + + + + + + + false + + + + 5 + 0 + 1 + 0 + + + + With this input field you select the OpenOffice.org directory that will be used to spellcheck the words of the new dictionary. + + + + + + + + + + + 5 + 0 + 0 + 0 + + + + With this combo box you select which of the installed languages is used for creating the new dictionary. KMouth will only parse documentation files of this language. + + + &Language: + + + + + + + qPixmapFromMimeSource + + + KUrlRequester + QFrame +
kurlrequester.h
+ 0 + +
+ + KLanguageButton + QWidget +
klanguagebutton.h
+ 0 + +
+
+ + + + spellCheckBox + toggled(bool) + ooDictURL + setEnabled(bool) + + + 20 + 20 + + + 20 + 20 + + + + +
diff --git a/kmouth/wordcompletion/wordcompletionwidget.cpp b/kmouth/wordcompletion/wordcompletionwidget.cpp index d52df99b..c959297f 100644 --- a/kmouth/wordcompletion/wordcompletionwidget.cpp +++ b/kmouth/wordcompletion/wordcompletionwidget.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include "dictionarycreationwizard.h" #include "wordcompletionwidget.h" @@ -98,6 +99,8 @@ WordCompletionWidget::WordCompletionWidget(QWidget *parent, const char *name) setObjectName(name); dictionaryList->setSorting (-1); // no sorted list + loadLanguageList(languageButton); + // Connect the signals from hte KCMKTTSDWidget to this class connect (addButton, SIGNAL (clicked()), this, SLOT(addDictionary()) ); connect (deleteButton, SIGNAL (clicked()), this, SLOT (deleteDictionary()) ); -- 2.11.4.GIT