summaryrefslogtreecommitdiffstats
path: root/kspell2/ui
diff options
context:
space:
mode:
Diffstat (limited to 'kspell2/ui')
-rw-r--r--kspell2/ui/configdialog.cpp6
-rw-r--r--kspell2/ui/configdialog.h2
-rw-r--r--kspell2/ui/configwidget.cpp22
-rw-r--r--kspell2/ui/configwidget.h6
-rw-r--r--kspell2/ui/dialog.cpp104
-rw-r--r--kspell2/ui/dialog.h28
-rw-r--r--kspell2/ui/highlighter.cpp24
-rw-r--r--kspell2/ui/highlighter.h12
8 files changed, 102 insertions, 102 deletions
diff --git a/kspell2/ui/configdialog.cpp b/kspell2/ui/configdialog.cpp
index 09a0af923..56e39ca2b 100644
--- a/kspell2/ui/configdialog.cpp
+++ b/kspell2/ui/configdialog.cpp
@@ -23,7 +23,7 @@
#include <klocale.h>
-#include <qvbox.h>
+#include <tqvbox.h>
using namespace KSpell2;
@@ -33,7 +33,7 @@ public:
ConfigWidget *ui;
};
-ConfigDialog::ConfigDialog( Broker *broker, QWidget *parent )
+ConfigDialog::ConfigDialog( Broker *broker, TQWidget *parent )
: KDialogBase( parent, "KSpell2ConfigDialog", true,
i18n( "KSpell2 Configuration" ),
KDialogBase::Ok|KDialogBase::Apply|KDialogBase::Cancel,
@@ -50,7 +50,7 @@ ConfigDialog::~ConfigDialog()
void ConfigDialog::init( Broker *broker )
{
d = new Private;
- QVBox *page = makeVBoxMainWidget();
+ TQVBox *page = makeVBoxMainWidget();
d->ui = new ConfigWidget( broker, page );
}
diff --git a/kspell2/ui/configdialog.h b/kspell2/ui/configdialog.h
index 5a2ee53c8..ead508d34 100644
--- a/kspell2/ui/configdialog.h
+++ b/kspell2/ui/configdialog.h
@@ -31,7 +31,7 @@ namespace KSpell2
Q_OBJECT
public:
ConfigDialog( Broker *broker,
- QWidget *parent );
+ TQWidget *parent );
~ConfigDialog();
protected slots:
diff --git a/kspell2/ui/configwidget.cpp b/kspell2/ui/configwidget.cpp
index 09811e56a..6d98955ae 100644
--- a/kspell2/ui/configwidget.cpp
+++ b/kspell2/ui/configwidget.cpp
@@ -28,8 +28,8 @@
#include <kcombobox.h>
#include <klocale.h>
-#include <qcheckbox.h>
-#include <qlayout.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
using namespace KSpell2;
@@ -40,8 +40,8 @@ public:
KSpell2ConfigUI *ui;
};
-ConfigWidget::ConfigWidget( Broker *broker, QWidget *parent, const char *name )
- : QWidget( parent, name )
+ConfigWidget::ConfigWidget( Broker *broker, TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
init( broker );
}
@@ -56,22 +56,22 @@ void ConfigWidget::init( Broker *broker )
d = new Private;
d->broker = broker;
- QVBoxLayout *layout = new QVBoxLayout( this, 0, 0, "KSpell2ConfigUILayout");
+ TQVBoxLayout *layout = new TQVBoxLayout( this, 0, 0, "KSpell2ConfigUILayout");
d->ui = new KSpell2ConfigUI( this );
- QStringList langs = d->broker->languages();
- //QStringList clients = d->broker->clients();
+ TQStringList langs = d->broker->languages();
+ //TQStringList clients = d->broker->clients();
d->ui->m_langCombo->insertStringList( langs );
setCorrectLanguage( langs );
//d->ui->m_clientCombo->insertStringList( clients );
d->ui->m_skipUpperCB->setChecked( !d->broker->settings()->checkUppercase() );
d->ui->m_skipRunTogetherCB->setChecked( d->broker->settings()->skipRunTogether() );
- QStringList ignoreList = d->broker->settings()->currentIgnoreList();
+ TQStringList ignoreList = d->broker->settings()->currentIgnoreList();
ignoreList.sort();
d->ui->m_ignoreListBox->insertStringList( ignoreList );
d->ui->m_bgSpellCB->setChecked( d->broker->settings()->backgroundCheckerEnabled() );
d->ui->m_bgSpellCB->hide();//hidden by default
- connect( d->ui->m_ignoreListBox, SIGNAL(changed()), SLOT(slotChanged()) );
+ connect( d->ui->m_ignoreListBox, TQT_SIGNAL(changed()), TQT_SLOT(slotChanged()) );
layout->addWidget( d->ui );
}
@@ -100,10 +100,10 @@ void ConfigWidget::slotChanged()
d->ui->m_ignoreListBox->items() );
}
-void ConfigWidget::setCorrectLanguage( const QStringList& langs)
+void ConfigWidget::setCorrectLanguage( const TQStringList& langs)
{
int idx = 0;
- for ( QStringList::const_iterator itr = langs.begin();
+ for ( TQStringList::const_iterator itr = langs.begin();
itr != langs.end(); ++itr, ++idx ) {
if ( *itr == d->broker->settings()->defaultLanguage() )
d->ui->m_langCombo->setCurrentItem( idx );
diff --git a/kspell2/ui/configwidget.h b/kspell2/ui/configwidget.h
index 18eb8e74f..ed49ca20e 100644
--- a/kspell2/ui/configwidget.h
+++ b/kspell2/ui/configwidget.h
@@ -21,7 +21,7 @@
#ifndef KSPELL_CONFIGWIDGET_H
#define KSPELL_CONFIGWIDGET_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdelibs_export.h>
namespace KSpell2
@@ -31,7 +31,7 @@ namespace KSpell2
{
Q_OBJECT
public:
- ConfigWidget( Broker *broker, QWidget *parent, const char *name =0 );
+ ConfigWidget( Broker *broker, TQWidget *parent, const char *name =0 );
~ConfigWidget();
bool backgroundCheckingButtonShown() const;
@@ -46,7 +46,7 @@ namespace KSpell2
private:
void init( Broker *broker );
void setFromGUI();
- void setCorrectLanguage( const QStringList& langs );
+ void setCorrectLanguage( const TQStringList& langs );
private:
class Private;
diff --git a/kspell2/ui/dialog.cpp b/kspell2/ui/dialog.cpp
index c7f6aa51e..93b81fd94 100644
--- a/kspell2/ui/dialog.cpp
+++ b/kspell2/ui/dialog.cpp
@@ -31,13 +31,13 @@
#include <klocale.h>
#include <kdebug.h>
-#include <qlistview.h>
-#include <qpushbutton.h>
-#include <qcombobox.h>
-#include <qlineedit.h>
-#include <qlabel.h>
-#include <qtimer.h>
-#include <qdict.h>
+#include <tqlistview.h>
+#include <tqpushbutton.h>
+#include <tqcombobox.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
+#include <tqtimer.h>
+#include <tqdict.h>
namespace KSpell2
{
@@ -49,15 +49,15 @@ class Dialog::Private
{
public:
KSpell2UI *ui;
- QString originalBuffer;
+ TQString originalBuffer;
BackgroundChecker *checker;
Word currentWord;
- QMap<QString, QString> replaceAllMap;
+ TQMap<TQString, TQString> replaceAllMap;
};
Dialog::Dialog( BackgroundChecker *checker,
- QWidget *parent, const char *name )
+ TQWidget *parent, const char *name )
: KDialogBase( parent, name, true,
i18n( "Check Spelling" ),
Help|Cancel|User1, Cancel, true,
@@ -79,35 +79,35 @@ Dialog::~Dialog()
void Dialog::initConnections()
{
- connect( d->ui->m_addBtn, SIGNAL(clicked()),
- SLOT(slotAddWord()) );
- connect( d->ui->m_replaceBtn, SIGNAL(clicked()),
- SLOT(slotReplaceWord()) );
- connect( d->ui->m_replaceAllBtn, SIGNAL(clicked()),
- SLOT(slotReplaceAll()) );
- connect( d->ui->m_skipBtn, SIGNAL(clicked()),
- SLOT(slotSkip()) );
- connect( d->ui->m_skipAllBtn, SIGNAL(clicked()),
- SLOT(slotSkipAll()) );
- connect( d->ui->m_suggestBtn, SIGNAL(clicked()),
- SLOT(slotSuggest()) );
- connect( d->ui->m_language, SIGNAL(activated(const QString&)),
- SLOT(slotChangeLanguage(const QString&)) );
- connect( d->ui->m_suggestions, SIGNAL(selectionChanged(QListViewItem*)),
- SLOT(slotSelectionChanged(QListViewItem*)) );
- connect( d->checker, SIGNAL(misspelling(const QString&, int)),
- SIGNAL(misspelling(const QString&, int)) );
- connect( d->checker, SIGNAL(misspelling(const QString&, int)),
- SLOT(slotMisspelling(const QString&, int)) );
- connect( d->checker, SIGNAL(done()),
- SLOT(slotDone()) );
- connect( d->ui->m_suggestions, SIGNAL(doubleClicked(QListViewItem*, const QPoint&, int)),
- SLOT( slotReplaceWord() ) );
- connect( this, SIGNAL(user1Clicked()), this, SLOT(slotFinished()) );
- connect( this, SIGNAL(cancelClicked()),this, SLOT(slotCancel()) );
- connect( d->ui->m_replacement, SIGNAL(returnPressed()), this, SLOT(slotReplaceWord()) );
- connect( d->ui->m_autoCorrect, SIGNAL(clicked()),
- SLOT(slotAutocorrect()) );
+ connect( d->ui->m_addBtn, TQT_SIGNAL(clicked()),
+ TQT_SLOT(slotAddWord()) );
+ connect( d->ui->m_replaceBtn, TQT_SIGNAL(clicked()),
+ TQT_SLOT(slotReplaceWord()) );
+ connect( d->ui->m_replaceAllBtn, TQT_SIGNAL(clicked()),
+ TQT_SLOT(slotReplaceAll()) );
+ connect( d->ui->m_skipBtn, TQT_SIGNAL(clicked()),
+ TQT_SLOT(slotSkip()) );
+ connect( d->ui->m_skipAllBtn, TQT_SIGNAL(clicked()),
+ TQT_SLOT(slotSkipAll()) );
+ connect( d->ui->m_suggestBtn, TQT_SIGNAL(clicked()),
+ TQT_SLOT(slotSuggest()) );
+ connect( d->ui->m_language, TQT_SIGNAL(activated(const TQString&)),
+ TQT_SLOT(slotChangeLanguage(const TQString&)) );
+ connect( d->ui->m_suggestions, TQT_SIGNAL(selectionChanged(TQListViewItem*)),
+ TQT_SLOT(slotSelectionChanged(TQListViewItem*)) );
+ connect( d->checker, TQT_SIGNAL(misspelling(const TQString&, int)),
+ TQT_SIGNAL(misspelling(const TQString&, int)) );
+ connect( d->checker, TQT_SIGNAL(misspelling(const TQString&, int)),
+ TQT_SLOT(slotMisspelling(const TQString&, int)) );
+ connect( d->checker, TQT_SIGNAL(done()),
+ TQT_SLOT(slotDone()) );
+ connect( d->ui->m_suggestions, TQT_SIGNAL(doubleClicked(TQListViewItem*, const TQPoint&, int)),
+ TQT_SLOT( slotReplaceWord() ) );
+ connect( this, TQT_SIGNAL(user1Clicked()), this, TQT_SLOT(slotFinished()) );
+ connect( this, TQT_SIGNAL(cancelClicked()),this, TQT_SLOT(slotCancel()) );
+ connect( d->ui->m_replacement, TQT_SIGNAL(returnPressed()), this, TQT_SLOT(slotReplaceWord()) );
+ connect( d->ui->m_autoCorrect, TQT_SIGNAL(clicked()),
+ TQT_SLOT(slotAutocorrect()) );
// button use by kword/kpresenter
// hide by default
d->ui->m_autoCorrect->hide();
@@ -120,7 +120,7 @@ void Dialog::initGui()
d->ui->m_language->clear();
d->ui->m_language->insertStringList( d->checker->broker()->languages() );
for ( int i = 0; !d->ui->m_language->text( i ).isNull(); ++i ) {
- QString ct = d->ui->m_language->text( i );
+ TQString ct = d->ui->m_language->text( i );
if ( ct == d->checker->broker()->settings()->defaultLanguage() ) {
d->ui->m_language->setCurrentItem( i );
break;
@@ -159,17 +159,17 @@ void Dialog::slotCancel()
reject();
}
-QString Dialog::originalBuffer() const
+TQString Dialog::originalBuffer() const
{
return d->originalBuffer;
}
-QString Dialog::buffer() const
+TQString Dialog::buffer() const
{
return d->checker->filter()->buffer();
}
-void Dialog::setBuffer( const QString& buf )
+void Dialog::setBuffer( const TQString& buf )
{
d->originalBuffer = buf;
}
@@ -180,11 +180,11 @@ void Dialog::setFilter( Filter *filter )
d->checker->setFilter( filter );
}
-void Dialog::updateDialog( const QString& word )
+void Dialog::updateDialog( const TQString& word )
{
d->ui->m_unknownWord->setText( word );
d->ui->m_contextLabel->setText( d->checker->filter()->context() );
- QStringList suggs = d->checker->suggest( word );
+ TQStringList suggs = d->checker->suggest( word );
d->ui->m_replacement->setText( suggs.first() );
fillSuggestions( suggs );
}
@@ -233,31 +233,31 @@ void Dialog::slotSkipAll()
void Dialog::slotSuggest()
{
- QStringList suggs = d->checker->suggest( d->ui->m_replacement->text() );
+ TQStringList suggs = d->checker->suggest( d->ui->m_replacement->text() );
fillSuggestions( suggs );
}
-void Dialog::slotChangeLanguage( const QString& lang )
+void Dialog::slotChangeLanguage( const TQString& lang )
{
d->checker->changeLanguage( lang );
slotSuggest();
}
-void Dialog::slotSelectionChanged( QListViewItem *item )
+void Dialog::slotSelectionChanged( TQListViewItem *item )
{
d->ui->m_replacement->setText( item->text( 0 ) );
}
-void Dialog::fillSuggestions( const QStringList& suggs )
+void Dialog::fillSuggestions( const TQStringList& suggs )
{
d->ui->m_suggestions->clear();
- for ( QStringList::ConstIterator it = suggs.begin(); it != suggs.end(); ++it ) {
- new QListViewItem( d->ui->m_suggestions, d->ui->m_suggestions->firstChild(),
+ for ( TQStringList::ConstIterator it = suggs.begin(); it != suggs.end(); ++it ) {
+ new TQListViewItem( d->ui->m_suggestions, d->ui->m_suggestions->firstChild(),
*it );
}
}
-void Dialog::slotMisspelling(const QString& word, int start )
+void Dialog::slotMisspelling(const TQString& word, int start )
{
kdDebug()<<"Dialog misspelling!!"<<endl;
d->currentWord = Word( word, start );
diff --git a/kspell2/ui/dialog.h b/kspell2/ui/dialog.h
index 20d295c96..1da714c7c 100644
--- a/kspell2/ui/dialog.h
+++ b/kspell2/ui/dialog.h
@@ -33,30 +33,30 @@ namespace KSpell2
Q_OBJECT
public:
Dialog( BackgroundChecker *checker,
- QWidget *parent, const char *name=0 );
+ TQWidget *parent, const char *name=0 );
~Dialog();
- QString originalBuffer() const;
- QString buffer() const;
+ TQString originalBuffer() const;
+ TQString buffer() const;
void show();
void activeAutoCorrect( bool _active );
public slots:
- void setBuffer( const QString& );
+ void setBuffer( const TQString& );
void setFilter( Filter* filter );
signals:
- void done( const QString& newBuffer );
- void misspelling( const QString& word, int start );
- void replace( const QString& oldWord, int start,
- const QString& newWord );
+ void done( const TQString& newBuffer );
+ void misspelling( const TQString& word, int start );
+ void replace( const TQString& oldWord, int start,
+ const TQString& newWord );
void stop();
void cancel();
- void autoCorrect( const QString & currentWord, const QString & replaceWord );
+ void autoCorrect( const TQString & currentWord, const TQString & replaceWord );
private slots:
- void slotMisspelling(const QString& word, int start );
+ void slotMisspelling(const TQString& word, int start );
void slotDone();
void slotFinished();
@@ -68,13 +68,13 @@ namespace KSpell2
void slotSkip();
void slotSkipAll();
void slotSuggest();
- void slotChangeLanguage( const QString& );
- void slotSelectionChanged( QListViewItem * );
+ void slotChangeLanguage( const TQString& );
+ void slotSelectionChanged( TQListViewItem * );
void slotAutocorrect();
private:
- void updateDialog( const QString& word );
- void fillSuggestions( const QStringList& suggs );
+ void updateDialog( const TQString& word );
+ void fillSuggestions( const TQStringList& suggs );
void initConnections();
void initGui();
void continueChecking();
diff --git a/kspell2/ui/highlighter.cpp b/kspell2/ui/highlighter.cpp
index 0ecbb9802..2d185462d 100644
--- a/kspell2/ui/highlighter.cpp
+++ b/kspell2/ui/highlighter.cpp
@@ -27,10 +27,10 @@
#include <kconfig.h>
#include <kdebug.h>
-#include <qtextedit.h>
-#include <qtimer.h>
-#include <qcolor.h>
-#include <qdict.h>
+#include <tqtextedit.h>
+#include <tqtimer.h>
+#include <tqcolor.h>
+#include <tqdict.h>
namespace KSpell2 {
@@ -40,13 +40,13 @@ public:
Filter *filter;
Broker::Ptr broker;
Dictionary *dict;
- QDict<Dictionary> dictCache;
+ TQDict<Dictionary> dictCache;
};
-Highlighter::Highlighter( QTextEdit *textEdit,
- const QString& configFile,
+Highlighter::Highlighter( TQTextEdit *textEdit,
+ const TQString& configFile,
Filter *filter)
- : QSyntaxHighlighter( textEdit )
+ : TQSyntaxHighlighter( textEdit )
{
d = new Private;
d->filter = filter;
@@ -67,7 +67,7 @@ Highlighter::~Highlighter()
delete d; d = 0;
}
-int Highlighter::highlightParagraph( const QString& text,
+int Highlighter::highlightParagraph( const TQString& text,
int endStateOfLastPara )
{
Q_UNUSED( endStateOfLastPara );
@@ -87,7 +87,7 @@ int Highlighter::highlightParagraph( const QString& text,
w = d->filter->nextWord();
}
}
- //QTimer::singleShot( 0, this, SLOT(checkWords()) );
+ //TQTimer::singleShot( 0, this, TQT_SLOT(checkWords()) );
return 0;
}
@@ -103,12 +103,12 @@ void Highlighter::setCurrentFilter( Filter *filter )
d->filter->setSettings( d->broker->settings() );
}
-QString Highlighter::currentLanguage() const
+TQString Highlighter::currentLanguage() const
{
return d->dict->language();
}
-void Highlighter::setCurrentLanguage( const QString& lang )
+void Highlighter::setCurrentLanguage( const TQString& lang )
{
if ( !d->dictCache.find( lang ) ) {
Dictionary *dict = d->broker->dictionary( lang );
diff --git a/kspell2/ui/highlighter.h b/kspell2/ui/highlighter.h
index 86140f054..c9a832f3a 100644
--- a/kspell2/ui/highlighter.h
+++ b/kspell2/ui/highlighter.h
@@ -23,7 +23,7 @@
#include "filter.h"
-#include <qsyntaxhighlighter.h>
+#include <tqsyntaxhighlighter.h>
class QTextEdit;
@@ -32,19 +32,19 @@ namespace KSpell2
class Highlighter : public QSyntaxHighlighter
{
public:
- Highlighter( QTextEdit *textEdit,
- const QString& configFile = QString::null,
+ Highlighter( TQTextEdit *textEdit,
+ const TQString& configFile = TQString::null,
Filter *filter = Filter::defaultFilter() );
~Highlighter();
- virtual int highlightParagraph( const QString& text,
+ virtual int highlightParagraph( const TQString& text,
int endStateOfLastPara );
Filter *currentFilter() const;
void setCurrentFilter( Filter *filter );
- QString currentLanguage() const;
- void setCurrentLanguage( const QString& lang );
+ TQString currentLanguage() const;
+ void setCurrentLanguage( const TQString& lang );
protected:
virtual void setMisspelled( int start, int count );