Commit 86fcec95 authored by Jeremy Whiting's avatar Jeremy Whiting

Cleanup headers and bump version to 1.2.0

Remove unused/unneeded headers.
Use CamelCase headers.
Sort headers.
Port from KGlobalSettings to QFontDatabase.
parent 7f3257fb
......@@ -19,14 +19,12 @@
#include <QLayout>
#include <QLabel>
#include <klocale.h>
#include <QStandardPaths>
#include <kconfig.h>
#include <KConfigGroup>
#include <KHelpClient>
#include <ktoolinvocation.h>
#include <QStandardPaths>
#include <KLocalizedString>
#include "texttospeechconfigurationwidget.h"
#include "phrasebook/initialphrasebookwidget.h"
......
......@@ -18,7 +18,6 @@
#ifndef CONFIGWIZARD_H
#define CONFIGWIZARD_H
#include <QWidget>
#include <QWizard>
class KConfig;
......
......@@ -20,23 +20,24 @@
#define KMOUTH_H
// include files for Qt
#include <QAction>
#include <QPrinter>
// include files for KDE
#include <kxmlguiwindow.h>
#include <QAction>
#include <kurl.h>
#include <kconfig.h>
#include <ksharedconfig.h>
#include <kurl.h>
#include <kxmlguiwindow.h>
// forward declaration of the KMouth classes
class PhraseList;
class OptionsDialog;
class TextToSpeechSystem;
class PhraseBook;
class QLabel;
class KToggleAction;
class KActionCollection;
class QLabel;
/**
* The base class for KMouth application windows. It sets up the main
......@@ -45,8 +46,6 @@ class QLabel;
* KMouthApp reimplements the methods that KXmlGuiWindow provides for main window handling and supports
* full session management as well as using KActions.
* @see KXmlGuiWindow
* @see KApplication
* @see KConfig
*
* @author Source Framework Automatically Generated by KDevelop, (c) The KDevelop Team.
* @version KDevelop version 1.2 code generation
......
......@@ -16,16 +16,13 @@
***************************************************************************/
#include <kaboutdata.h>
#include <klocale.h>
#include <kuniqueapplication.h>
#include <QApplication>
#include <KAboutData>
#include <KLocalizedString>
#include <QCommandLineParser>
#include <QCommandLineOption>
#include <KAboutData>
#include <KLocalizedString>
#include "kmouth.h"
#include "version.h"
......
......@@ -20,15 +20,15 @@
#ifndef OPTIONSDIALOG_H
#define OPTIONSDIALOG_H
#include <kpagedialog.h>
#include <QtCore/QObject>
#include <KConfig>
#include <KPageDialog>
#include "ui_preferencesui.h"
#include "texttospeechconfigurationwidget.h"
class KTabWidget;
class KCModule;
class TextToSpeechSystem;
class TextToSpeechConfigurationWidget;
class WordCompletionWidget;
/**This class represents a configuration widget for user preferences.
......
......@@ -27,11 +27,9 @@
#include <QVBoxLayout>
// include files for KDE
#include <kdialog.h>
#include <klocalizedstring.h>
#include <kurl.h>
#include "phrasebook.h"
#include <KDialog>
#include <KLocalizedString>
#include <KUrl>
#include <QDebug>
......
......@@ -18,29 +18,28 @@
#include "phrasebook.h"
#include "phrasebookparser.h"
#include <QPainter>
#include <QFile>
#include <QFontDatabase>
#include <QPainter>
#include <QRegExp>
#include <QStack>
#include <QTextStream>
#include <QMenu>
#include <QXmlInputSource>
#include <QXmlSimpleReader>
#include <kactionmenu.h>
#include <kactioncollection.h>
#include <klocale.h>
#include <kaction.h>
#include <kdesktopfile.h>
#include <kmenu.h>
#include <ktoolbar.h>
#include <ktemporaryfile.h>
#include <kio/netaccess.h>
#include <kfiledialog.h>
#include <kmessagebox.h>
#include <kglobalsettings.h>
#include <KAction>
#include <KActionMenu>
#include <KActionCollection>
#include <KDesktopFile>
#include <KFileDialog>
#include <KLocalizedString>
#include <KMenu>
#include <KMessageBox>
#include <KToolBar>
#include <KTemporaryFile>
#include <KUrl>
#include <KConfigGroup>
#include <kio/netaccess.h>
Phrase::Phrase()
{
......@@ -122,7 +121,7 @@ void PhraseBook::print(QPrinter *pPrinter)
int x = size.x();
int y = size.y();
int w = size.width();
printpainter.setFont(QFont(KGlobalSettings::generalFont().family(), 12));
printpainter.setFont(QFont(QFontDatabase::systemFont(QFontDatabase::GeneralFont).family(), 12));
QFontMetrics metrics = printpainter.fontMetrics();
PhraseBookEntryList::iterator it;
......
......@@ -19,15 +19,15 @@
#define PHRASEBOOK_H
#include <QObject>
#include <QTextStream>
#include <QMenu>
#include <QPrinter>
#include <QTextStream>
#include <QXmlInputSource>
#include <ktoolbar.h>
#include <kaction.h>
#include <kactioncollection.h>
#include <kicon.h>
#include <KAction>
#include <KActionCollection>
#include <KIcon>
#include <KToolBar>
class KUrl;
......
......@@ -21,15 +21,14 @@
#include <QClipboard>
#include <QMimeData>
#include <QStack>
#include <QStandardPaths>
// include files for KDE
#include <kactionmenu.h>
#include <kfiledialog.h>
#include <kmenu.h>
#include <kmessagebox.h>
#include <ktoolbarpopupaction.h>
#include <kxmlguifactory.h>
#include <QStandardPaths>
#include <KActionMenu>
#include <KFileDialog>
#include <KMessageBox>
#include <KToolBarPopupAction>
#include <KXMLGUIFactory>
#include "phrasebook.h"
......@@ -51,6 +50,25 @@ const QString kWholeBookXML = QLatin1String("<?xml version=\"1.0\" encoding=\"UT
const QIcon kPhraseBookIcon = KIcon(kPhraseBook);
const QIcon kPhraseIcon = KIcon(kPhrase);
StandardPhraseBookInsertAction::StandardPhraseBookInsertAction(const KUrl &url, const QString& name, const QObject* receiver, const char* slot, KActionCollection* parent)
: KAction(KIcon(QLatin1String("phrasebook")), name, parent)
{
this->url = url;
connect(this, SIGNAL(triggered(bool)), this, SLOT(slotActivated()));
connect(this, SIGNAL(slotActivated(const KUrl &)), receiver, slot);
parent->addAction(name, this);
}
StandardPhraseBookInsertAction::~StandardPhraseBookInsertAction()
{
}
void StandardPhraseBookInsertAction::slotActivated()
{
emit slotActivated(url);
}
namespace PhraseBookPrivate
{
PhraseBookDialog *instance = 0;
......
......@@ -21,10 +21,12 @@
#include <QDomNode>
#include <QStandardItemModel>
#include <kurl.h>
#include <kxmlguiwindow.h>
#include <KAction>
#include <KIcon>
#include <KUrl>
#include <KXmlGuiWindow>
#include "phrasebook.h"
//#include "phrasebook.h"
#include "ui_phrasebookdialog.h"
class KActionMenu;
......@@ -39,23 +41,11 @@ class StandardPhraseBookInsertAction : public KAction
{
Q_OBJECT
public:
StandardPhraseBookInsertAction(const KUrl &url, const QString& name, const QObject* receiver, const char* slot, KActionCollection* parent)
: KAction(KIcon(QLatin1String("phrasebook")), name, parent)
{
this->url = url;
connect(this, SIGNAL(triggered(bool)), this, SLOT(slotActivated()));
connect(this, SIGNAL(slotActivated(const KUrl &)), receiver, slot);
parent->addAction(name, this);
}
~StandardPhraseBookInsertAction()
{
}
StandardPhraseBookInsertAction(const KUrl &url, const QString& name, const QObject* receiver, const char* slot, KActionCollection* parent);
~StandardPhraseBookInsertAction();
public slots:
void slotActivated()
{
emit slotActivated(url);
}
void slotActivated();
signals:
void slotActivated(const KUrl &url);
......
......@@ -18,8 +18,8 @@
#ifndef PHRASEBOOKPARSER_H
#define PHRASEBOOKPARSER_H
#include <QtXml/QXmlParseException>
#include <QtXml/QXmlAttributes>
#include <QXmlAttributes>
#include <QXmlParseException>
#include "phrasebook.h"
......
......@@ -23,30 +23,25 @@
#include "wordcompletion/wordcompletion.h"
// include files for Qt
#include <QPainter>
#include <QLayout>
#include <QApplication>
#include <QMenu>
#include <QClipboard>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QKeyEvent>
#include <QStandardItem>
#include <QListView>
#include <QPushButton>
#include <QStandardItem>
#include <QVBoxLayout>
// include files for KDE
#include <klineedit.h>
#include <kcursor.h>
#include <kiconloader.h>
#include <klocale.h>
#include <kfiledialog.h>
#include <kcombobox.h>
#include <kmessagebox.h>
#include <kxmlguifactory.h>
#include <KComboBox>
#include <KConfigGroup>
#include <KIcon>
#include <KLineEdit>
#include <KLocalizedString>
#include <KMessageBox>
#include <KXMLGUIFactory>
#include <stdlib.h>
#include <kfiledialog.h>
PhraseList::PhraseList(QWidget *parent, const char *name) : QWidget(parent)
{
......@@ -322,7 +317,6 @@ void PhraseList::lineEntered(const QString &phrase)
void PhraseList::speakPhrase(const QString &phrase)
{
// QApplication::setOverrideCursor (KCursor::WaitCursor, false);
QApplication::setOverrideCursor(Qt::WaitCursor);
KMouthApp *theApp = (KMouthApp *) parentWidget();
QString language = completion->languageOfWordList(completion->currentWordList());
......
......@@ -19,18 +19,18 @@
#define PHRASELIST_H
// include files for KDE
#include <klineedit.h>
#include <kconfig.h>
#include <kcombobox.h>
#include <KUrl>
// include files for Qt
#include <QWidget>
#include <QPushButton>
#include <QKeyEvent>
#include <QPrinter>
class KComboBox;
class KConfig;
class KLineEdit;
class QKeyEvent;
class QListView;
class QPrinter;
class QPushButton;
class QStandardItemModel;
class WordCompletion;
......
......@@ -17,15 +17,12 @@
#include "speech.h"
#include <QtCore/QStack>
#include <QtCore/QRegExp>
#include <QtCore/QTextCodec>
#include <QtCore/QFile>
#include <QtCore/QHash>
#include <QtCore/QTextStream>
#include <kdebug.h>
#include <kdeversion.h>
#include <QHash>
#include <QRegExp>
#include <QStack>
#include <QTextCodec>
#include <QTextStream>
#define macroExpander
#include <kmacroexpander.h>
......
......@@ -16,19 +16,14 @@
***************************************************************************/
#include "texttospeechconfigurationwidget.h"
#include <kconfig.h>
#include <QTextCodec>
#include <QLayout>
#include <QLabel>
#include <QLineEdit>
#include <QPushButton>
#include <QCheckBox>
#include <kcombobox.h>
#include <KConfig>
#include <KLocalizedString>
#include "speech.h"
#include <kurlrequester.h>
#include "texttospeechsystem.h"
TextToSpeechConfigurationWidget::TextToSpeechConfigurationWidget(QWidget *parent, const char *name)
: QWizardPage(parent)
......
......@@ -19,9 +19,12 @@
#define TEXTTOSPEECHCONFIGURATIONWIDGET_H
#include "ui_texttospeechconfigurationui.h"
#include "texttospeechsystem.h"
#include <QWizardPage>
class KConfig;
class TextToSpeechSystem;
/**This class represents a configuration widget for the text-to-speech system.
*@author Gunnar Schmi Dt
*/
......
......@@ -16,17 +16,13 @@
***************************************************************************/
#include "texttospeechsystem.h"
#include <stdlib.h>
#include <QtCore/QTextCodec>
#include <QtDBus/QtDBus>
#include <kconfig.h>
#include <kconfiggroup.h>
#include <kdebug.h>
#include <QTextCodec>
#include <QTextToSpeech>
#include <KConfig>
#include <KConfigGroup>
#include "speech.h"
TextToSpeechSystem::TextToSpeechSystem()
......
......@@ -18,8 +18,8 @@
#ifndef TEXTTOSPEECHSYSTEM_H
#define TEXTTOSPEECHSYSTEM_H
#include <QtCore/QList>
#include <QtCore/QObject>
#include <QList>
#include <QObject>
class KConfig;
......
......@@ -3,6 +3,6 @@
#ifndef kmouth_version_h
#define kmouth_version_h
#define KMOUTH_VERSION "1.1.1"
#define KMOUTH_VERSION "1.2.0"
#endif /*version_h*/
......@@ -18,26 +18,19 @@
#include "dictionarycreationwizard.h"
#include "wordlist.h"
#include <QLayout>
#include <QLabel>
#include <QCheckBox>
#include <QRadioButton>
#include <QLineEdit>
#include <QLocale>
#include <QGridLayout>
#include <QProgressDialog>
#include <QRadioButton>
#include <QStandardPaths>
#include <QTextCodec>
#include <QTextStream>
#include <QProgressDialog>
#include <QDebug>
#include <QLocale>
#include <klineedit.h>
#include <kurlrequester.h>
#include <kcombobox.h>
#include <kapplication.h>
#include <kconfig.h>
#include <KConfig>
#include <KConfigGroup>
#include <klanguagebutton.h>
#include <QStandardPaths>
int CreationSourceWidget::nextId() const
{
......
......@@ -20,23 +20,22 @@
#ifndef DICTIONARYCREATIONWIZARD_H
#define DICTIONARYCREATIONWIZARD_H
#include <QtCore/QList>
#include <QtCore/QMap>
#include <QScrollArea>
#include <QList>
#include <QMap>
#include <QWizard>
#include <kcombobox.h>
#include <knuminput.h>
#include <KConfig>
#include <KNumInput>
#include "ui_creationsourceui.h"
#include "ui_creationsourcedetailsui.h"
#include "ui_kdedocsourceui.h"
class CompletionWizardWidget;
class QTextCodec;
class KComboBox;
class KConfig;
class MergeWidget;
class QScrollArea;
class QTextCodec;
class CreationSourceWidget : public QWizardPage, public Ui::CreationSourceUI
{
......
#include "wordcompletion.h"
#include <QtCore/QRegExp>
#include <QtCore/QFile>
#include <QtCore/QList>
#include <QtCore/QTextStream>
#include <kconfig.h>
#include <kconfiggroup.h>
#include <QFile>
#include <QList>
#include <QRegExp>
#include <QStandardPaths>
#include <QTextStream>
#include <KConfig>
#include <KConfigGroup>
class WordCompletion::WordCompletionPrivate
{
......
......@@ -16,29 +16,22 @@
***************************************************************************/
#include "wordcompletionwidget.h"
#include "wordcompletion.h"
#include "dictionarycreationwizard.h"
#include <QLayout>
#include <QLabel>
#include <QCheckBox>
#include <QLineEdit>
#include <QStandardItemModel>
#include <QStandardPaths>
#include <QDebug>
#include <klineedit.h>
#include <kurlrequester.h>
#include <klocale.h>
#include <kglobal.h>
#include <KConfig>
#include <KConfigGroup>
#include <kfiledialog.h>
#include <KFileDialog>
#include <KLocalizedString>
#include <KMessageBox>
#include <KUrl>
#include <kio/netaccess.h>
#include <kmessagebox.h>
#include <klanguagebutton.h>
#include <QStandardPaths>
#include "dictionarycreationwizard.h"
#include "wordcompletion.h"
WordCompletionWidget::WordCompletionWidget(QWidget *parent, const char *name)
: QWidget(parent)
......
......@@ -22,10 +22,8 @@
#include "ui_wordcompletionui.h"
#include <KConfig>
#include <KUrl>
class QStandardItemModel;
class KConfig;
/**
* This class represents a configuration widget for managing dictionaries.
......
......@@ -19,17 +19,18 @@
#include "wordlist.h"
#include <QtCore/QRegExp>
#include <QtCore/QDir>
#include <QtCore/QTextStream>
#include <QtXml/QXmlParseException>
#include <QtXml/QXmlAttributes>
#include <QtXml/QXmlInputSource>
#include <QtXml/QXmlSimpleReader>
#include <QProgressDialog>
#include <QApplication>
#include <QTextCodec>
#include <QDir>
#include <QList>
#include <QProgressDialog>
#include <QRegExp>
#include <QStandardPaths>
#include <QTextCodec>
#include <QTextStream>
#include <QXmlAttributes>
#include <QXmlInputSource>
#include <QXmlParseException>
#include <QXmlSimpleReader>
#include <KLocalizedString>
......@@ -228,11 +229,6 @@ void addWordsFromFile(WordMap &map, QString filename, QTextCodec *codec)
}
}
}
#include <kdebug.h>
namespace WordList
{
WordMap parseFiles(QStringList files, QTextCodec *codec, QProgressDialog *pdlg)
{
int progress = 0;
......@@ -364,9 +360,8 @@ WordMap parseDir(QString directory, QTextCodec *codec, QProgressDialog *pdlg)
return parseFiles(files, codec, pdlg);
}
/***************************************************************************/
#include <QList>
/***************************************************************************/
/* Structures used for storing *.aff files (part of OpenOffice.org dictionaries)
*/
......
......@@ -20,12 +20,10 @@
#ifndef WORDLIST_H
#define WORDLIST_H
#include <QtXml/QXmlDefaultHandler>
#include <QtXml/QXmlParseException>
#include <QtXml/QXmlAttributes>
#include <QtCore/QObject>
#include <QtCore/QMap>
#include <QtCore/QTextStream>
#include <QMap>
#include <QXmlAttributes>
#include <QXmlDefaultHandler>
#include <QXmlParseException>
class QTextCodec;
class QProgressDialog;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment