diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-26 21:04:57 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-26 21:04:57 +0000 |
commit | bf7f88413be3831a9372d323d02fc0335b9f9188 (patch) | |
tree | 516fdef9206245b40a14f99b4e3d9ef9289196e0 /src/app/metaedit.cpp | |
parent | e238aa77b1fb3c2f55aef2ef2c91ce52166d2cc8 (diff) | |
download | gwenview-bf7f88413be3831a9372d323d02fc0335b9f9188.tar.gz gwenview-bf7f88413be3831a9372d323d02fc0335b9f9188.zip |
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
Diffstat (limited to 'src/app/metaedit.cpp')
-rw-r--r-- | src/app/metaedit.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
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 <qlabel.h> -#include <qtextedit.h> -#include <qfileinfo.h> +// TQt +#include <tqlabel.h> +#include <tqtextedit.h> +#include <tqfileinfo.h> // KDE #include <kdeversion.h> @@ -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("<i>%1</i>").arg(msg)); + mCommentEdit->setText(TQString("<i>%1</i>").tqarg(msg)); } } // namespace |