summaryrefslogtreecommitdiffstats
path: root/katapult/plugins/catalogs/spellcatalog/spelling.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-28 18:03:09 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-28 18:03:09 +0000
commit98d15d90b6a83e2df32d678013847e18b8a8c7e8 (patch)
tree02a588c0979fe1a40ae6216d1f831bb24de91a9f /katapult/plugins/catalogs/spellcatalog/spelling.cpp
parente0974f69b7603e3d8f2d936301e05535af25346e (diff)
downloadkatapult-98d15d90b6a83e2df32d678013847e18b8a8c7e8.tar.gz
katapult-98d15d90b6a83e2df32d678013847e18b8a8c7e8.zip
TQt4 port Katapult
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/katapult@1233929 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'katapult/plugins/catalogs/spellcatalog/spelling.cpp')
-rw-r--r--katapult/plugins/catalogs/spellcatalog/spelling.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/katapult/plugins/catalogs/spellcatalog/spelling.cpp b/katapult/plugins/catalogs/spellcatalog/spelling.cpp
index fe08355..edadc18 100644
--- a/katapult/plugins/catalogs/spellcatalog/spelling.cpp
+++ b/katapult/plugins/catalogs/spellcatalog/spelling.cpp
@@ -26,21 +26,21 @@
#include <kiconloader.h>
#include <kapplication.h>
-#include <qclipboard.h>
+#include <tqclipboard.h>
#include "spellcatalog.h"
#include "spelling.h"
-Spelling::Spelling(SpellCatalog* catalog, const QString& text): KatapultItem(), _catalog(catalog), _text(text)
+Spelling::Spelling(SpellCatalog* catalog, const TQString& text): KatapultItem(), _catalog(catalog), _text(text)
{
- spellChecker = new KSpell( 0, "caption", this, SLOT(spellCheckerReady()) );
+ spellChecker = new KSpell( 0, "caption", this, TQT_SLOT(spellCheckerReady()) );
- connect( spellChecker, SIGNAL(misspelling(const QString&, const QStringList&, unsigned int)),
- this, SLOT(spellCheckerMisspelling(const QString&, const QStringList&, unsigned int)) );
+ connect( spellChecker, TQT_SIGNAL(misspelling(const TQString&, const TQStringList&, unsigned int)),
+ this, TQT_SLOT(spellCheckerMisspelling(const TQString&, const TQStringList&, unsigned int)) );
- connect( spellChecker, SIGNAL(corrected(const QString&, const QString&, unsigned int)),
- this, SLOT(spellCheckerCorrected(const QString&, const QString&, unsigned int)) );
+ connect( spellChecker, TQT_SIGNAL(corrected(const TQString&, const TQString&, unsigned int)),
+ this, TQT_SLOT(spellCheckerCorrected(const TQString&, const TQString&, unsigned int)) );
evaluate();
}
@@ -52,16 +52,16 @@ Spelling::~Spelling() {
void Spelling::spellCheckerReady() {
}
-void Spelling::spellCheckerCorrected(const QString& /*originalword*/, const QString& /*newword*/, unsigned int /*pos*/) {
+void Spelling::spellCheckerCorrected(const TQString& /*originalword*/, const TQString& /*newword*/, unsigned int /*pos*/) {
corrected = true;
}
-void Spelling::spellCheckerMisspelling(const QString& /*originalword*/, const QStringList& suggestions, unsigned int /*pos*/) {
+void Spelling::spellCheckerMisspelling(const TQString& /*originalword*/, const TQStringList& suggestions, unsigned int /*pos*/) {
misspelt = true;
suggestedWords = suggestions.join(",");
}
-QPixmap Spelling::icon(int size) const
+TQPixmap Spelling::icon(int size) const
{
const char* icon = "checkmark";
if (_parseError || misspelt) {
@@ -70,18 +70,18 @@ QPixmap Spelling::icon(int size) const
return KGlobal::iconLoader()->loadIcon(icon, KIcon::NoGroup, size);
}
-QString Spelling::text() const
+TQString Spelling::text() const
{
return _text;
}
-void Spelling::setText(const QString& text)
+void Spelling::setText(const TQString& text)
{
_text = text;
evaluate();
}
-QString Spelling::result() const
+TQString Spelling::result() const
{
return _result;
}
@@ -100,7 +100,7 @@ void Spelling::evaluate() const
{
int length = catalog()->triggerWordLength();
- QString text = _text.mid(length + 1); // + 1 for space
+ TQString text = _text.mid(length + 1); // + 1 for space
misspelt = false;
corrected = false;
@@ -125,9 +125,9 @@ void Spelling::evaluate() const
}
void Spelling::copyToClipboard() const {
- QClipboard* clipBoard = QApplication::clipboard();
- clipBoard->setText(suggestedWords, QClipboard::Clipboard);
- clipBoard->setText(suggestedWords, QClipboard::Selection);
+ TQClipboard* clipBoard = TQApplication::tqclipboard();
+ clipBoard->setText(suggestedWords, TQClipboard::Clipboard);
+ clipBoard->setText(suggestedWords, TQClipboard::Selection);
}
#include "spelling.moc"