diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:51:49 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:51:49 +0000 |
commit | 4ae0c208b66e0f7954e194384464fe2d0a2c56dd (patch) | |
tree | b0a7cd1c184f0003c0292eb416ed27f674f9cc43 /cervisia/logmessageedit.cpp | |
parent | 1964ea0fb4ab57493ca2ebb709c8d3b5395fd653 (diff) | |
download | tdesdk-4ae0c208b66e0f7954e194384464fe2d0a2c56dd.tar.gz tdesdk-4ae0c208b66e0f7954e194384464fe2d0a2c56dd.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1157652 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'cervisia/logmessageedit.cpp')
-rw-r--r-- | cervisia/logmessageedit.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/cervisia/logmessageedit.cpp b/cervisia/logmessageedit.cpp index 33599409..f861c873 100644 --- a/cervisia/logmessageedit.cpp +++ b/cervisia/logmessageedit.cpp @@ -22,11 +22,11 @@ #include "logmessageedit.h" using Cervisia::LogMessageEdit; -#include <qtextstream.h> +#include <tqtextstream.h> #include <kaccel.h> -LogMessageEdit::LogMessageEdit(QWidget* parent) +LogMessageEdit::LogMessageEdit(TQWidget* parent) : KTextEdit(parent) , KCompletionBase() , m_completing(false) @@ -36,18 +36,18 @@ LogMessageEdit::LogMessageEdit(QWidget* parent) completionObject(); // a mouse click stops the completion process - connect( this, SIGNAL(clicked(int, int)), SLOT(stopCompletion()) ); + connect( this, TQT_SIGNAL(clicked(int, int)), TQT_SLOT(stopCompletion()) ); } -void LogMessageEdit::setCompletedText(const QString& match) +void LogMessageEdit::setCompletedText(const TQString& match) { int para, index; getCursorPosition(¶, &index); - QString paragraphText = text(para); + TQString paragraphText = text(para); int length = index - m_completionStartPos; - QString word = match.right(match.length() - length); + TQString word = match.right(match.length() - length); insert(word); @@ -62,12 +62,12 @@ void LogMessageEdit::setCompletedText(const QString& match) } -void LogMessageEdit::setCompletedItems(const QStringList&) +void LogMessageEdit::setCompletedItems(const TQStringList&) { } -void LogMessageEdit::keyPressEvent(QKeyEvent* event) +void LogMessageEdit::keyPressEvent(TQKeyEvent* event) { bool noModifier = (event->state() == NoButton || event->state() == ShiftButton || @@ -75,7 +75,7 @@ void LogMessageEdit::keyPressEvent(QKeyEvent* event) if( noModifier ) { - QString keycode = event->text(); + TQString keycode = event->text(); if( !keycode.isEmpty() && keycode.unicode()->isPrint() ) { KTextEdit::keyPressEvent(event); @@ -155,16 +155,16 @@ void LogMessageEdit::tryCompletion() int para, index; getCursorPosition(¶, &index); - QString paragraphText = text(para); + TQString paragraphText = text(para); if( paragraphText.at(index).isSpace() ) { if( !m_completing ) m_completionStartPos = paragraphText.findRev(' ', index-1) + 1; int length = index - m_completionStartPos; - QString word = paragraphText.mid(m_completionStartPos, length); + TQString word = paragraphText.mid(m_completionStartPos, length); - QString match = compObj()->makeCompletion(word); + TQString match = compObj()->makeCompletion(word); if( !match.isNull() && match != word ) { setCompletedText(match); @@ -184,15 +184,15 @@ void LogMessageEdit::rotateMatches(KeyBindingType type) if( completionObj && m_completing && (type == PrevCompletionMatch || type == NextCompletionMatch) ) { - QString match = (type == PrevCompletionMatch) ? completionObj->previousMatch() + TQString match = (type == PrevCompletionMatch) ? completionObj->previousMatch() : completionObj->nextMatch(); int para, index; getCursorPosition(¶, &index); - QString paragraphText = text(para); + TQString paragraphText = text(para); - QString word = paragraphText.mid(m_completionStartPos, index - m_completionStartPos); + TQString word = paragraphText.mid(m_completionStartPos, index - m_completionStartPos); if( match.isNull() || match == word ) return; |