From bf7f88413be3831a9372d323d02fc0335b9f9188 Mon Sep 17 00:00:00 2001 From: tpearson Date: Thu, 26 May 2011 21:04:57 +0000 Subject: TQt4 port Gwenview This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/gwenview@1233720 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- src/app/metaedit.cpp | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'src/app/metaedit.cpp') diff --git a/src/app/metaedit.cpp b/src/app/metaedit.cpp index 8e2999c..0d37135 100644 --- a/src/app/metaedit.cpp +++ b/src/app/metaedit.cpp @@ -17,10 +17,10 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -// Qt -#include -#include -#include +// TQt +#include +#include +#include // KDE #include @@ -31,20 +31,20 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "metaedit.moc" namespace Gwenview { -// FIXME: Why doesn't MetaEdit inherits from QTextEdit rather than QVBox? -MetaEdit::MetaEdit(QWidget *parent, Document *gvp, const char *name) -: QVBox(parent, name) +// FIXME: Why doesn't MetaEdit inherits from TQTextEdit rather than TQVBox? +MetaEdit::MetaEdit(TQWidget *tqparent, Document *gvp, const char *name) +: TQVBox(tqparent, name) , mEmpty(true) , mDocument(gvp) { - mCommentEdit=new QTextEdit(this); + mCommentEdit=new TQTextEdit(this); mCommentEdit->installEventFilter(this); - connect(mCommentEdit, SIGNAL(modificationChanged(bool)), - this, SLOT(setModified(bool))); - connect(mDocument,SIGNAL(loaded(const KURL&)), - this,SLOT(updateContent()) ); - connect(mCommentEdit, SIGNAL(textChanged()), - this, SLOT(updateDoc()) ); + connect(mCommentEdit, TQT_SIGNAL(modificationChanged(bool)), + this, TQT_SLOT(setModified(bool))); + connect(mDocument,TQT_SIGNAL(loaded(const KURL&)), + this,TQT_SLOT(updateContent()) ); + connect(mCommentEdit, TQT_SIGNAL(textChanged()), + this, TQT_SLOT(updateDoc()) ); updateContent(); mCommentEdit->setMinimumHeight(int (mCommentEdit->fontMetrics().height() * 1.5) ); } @@ -54,10 +54,10 @@ MetaEdit::~MetaEdit() { } -bool MetaEdit::eventFilter(QObject*, QEvent *event) { +bool MetaEdit::eventFilter(TQObject*, TQEvent *event) { if (mEmpty && (mDocument->commentState()==Document::WRITABLE) - && (event->type()==QEvent::FocusIn || event->type()==QEvent::FocusOut) + && (event->type()==TQEvent::FocusIn || event->type()==TQEvent::FocusOut) ) { setEmptyText(); } @@ -83,7 +83,7 @@ void MetaEdit::updateContent() { return; } - QString comment=mDocument->comment(); + TQString comment=mDocument->comment(); mEmpty = comment.isEmpty(); if (mEmpty) { setEmptyText(); @@ -118,9 +118,9 @@ void MetaEdit::setEmptyText() { /** * Use mCommentEdit to show the comment and let the user edit it */ -void MetaEdit::setComment(const QString& comment) { +void MetaEdit::setComment(const TQString& comment) { Q_ASSERT(mDocument->commentState()!=Document::NONE); - mCommentEdit->setTextFormat(QTextEdit::PlainText); + mCommentEdit->setTextFormat(TQTextEdit::PlainText); mCommentEdit->setReadOnly(mDocument->commentState()==Document::READ_ONLY); mCommentEdit->setText(comment); } @@ -129,10 +129,10 @@ void MetaEdit::setComment(const QString& comment) { /** * Use mCommentEdit to display a read-only message */ -void MetaEdit::setMessage(const QString& msg) { - mCommentEdit->setTextFormat(QTextEdit::RichText); +void MetaEdit::setMessage(const TQString& msg) { + mCommentEdit->setTextFormat(TQTextEdit::RichText); mCommentEdit->setReadOnly(true); - mCommentEdit->setText(QString("%1").arg(msg)); + mCommentEdit->setText(TQString("%1").tqarg(msg)); } } // namespace -- cgit v1.2.1