diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /lib/koproperty/editors/rectedit.cpp | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip |
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'lib/koproperty/editors/rectedit.cpp')
-rw-r--r-- | lib/koproperty/editors/rectedit.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/lib/koproperty/editors/rectedit.cpp b/lib/koproperty/editors/rectedit.cpp index 4f495b60..313e4e53 100644 --- a/lib/koproperty/editors/rectedit.cpp +++ b/lib/koproperty/editors/rectedit.cpp @@ -20,10 +20,10 @@ #include "rectedit.h" #include "editoritem.h" -#include <qvariant.h> -#include <qlayout.h> -#include <qpainter.h> -#include <qtooltip.h> +#include <tqvariant.h> +#include <tqlayout.h> +#include <tqpainter.h> +#include <tqtooltip.h> #include <kactivelabel.h> #include <klocale.h> @@ -33,14 +33,14 @@ using namespace KoProperty; -RectEdit::RectEdit(Property *property, QWidget *parent, const char *name) - : Widget(property, parent, name) +RectEdit::RectEdit(Property *property, TQWidget *tqparent, const char *name) + : Widget(property, tqparent, name) { setHasBorders(false); m_edit = new KActiveLabel(this); - m_edit->setFocusPolicy(NoFocus); - m_edit->setPaletteBackgroundColor(palette().active().base()); - m_edit->setWordWrap( QTextEdit::NoWrap ); + m_edit->setFocusPolicy(TQ_NoFocus); + m_edit->setPaletteBackgroundColor(tqpalette().active().base()); + m_edit->setWordWrap( TQTextEdit::NoWrap ); m_edit->setMinimumHeight(5); setEditor(m_edit); // setFocusWidget(m_edit); @@ -49,38 +49,38 @@ RectEdit::RectEdit(Property *property, QWidget *parent, const char *name) RectEdit::~RectEdit() {} -QVariant +TQVariant RectEdit::value() const { return m_value; } void -RectEdit::setValue(const QVariant &value, bool emitChange) +RectEdit::setValue(const TQVariant &value, bool emitChange) { m_value = value; m_edit->selectAll(false); - m_edit->setText(QString(RECTEDIT_MASK).arg(value.toRect().x()). - arg(value.toRect().y()).arg(value.toRect().width()).arg(value.toRect().height())); - QToolTip::add(this, i18n("Position: %1, %2\nSize: %3 x %4").arg(value.toRect().x()). - arg(value.toRect().y()).arg(value.toRect().width()).arg(value.toRect().height())); + m_edit->setText(TQString(RECTEDIT_MASK).tqarg(value.toRect().x()). + tqarg(value.toRect().y()).tqarg(value.toRect().width()).tqarg(value.toRect().height())); + TQToolTip::add(this, i18n("Position: %1, %2\nSize: %3 x %4").tqarg(value.toRect().x()). + tqarg(value.toRect().y()).tqarg(value.toRect().width()).tqarg(value.toRect().height())); if (emitChange) emit valueChanged(this); } void -RectEdit::drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value) +RectEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value) { - QRect rect(r); + TQRect rect(r); rect.setBottom(r.bottom()+1); Widget::drawViewer(p, cg, rect, - QString(RECTEDIT_MASK).arg(value.toRect().x()).arg(value.toRect().y()) - .arg(value.toRect().width()).arg(value.toRect().height())); + TQString(RECTEDIT_MASK).tqarg(value.toRect().x()).tqarg(value.toRect().y()) + .tqarg(value.toRect().width()).tqarg(value.toRect().height())); // p->eraseRect(r); -// p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, -// QString("[ %1, %2, %3, %4 ]").arg(value.toRect().x()).arg(value.toRect().y()) -// .arg(value.toRect().width()).arg(value.toRect().height())); +// p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, +// TQString("[ %1, %2, %3, %4 ]").tqarg(value.toRect().x()).tqarg(value.toRect().y()) +// .tqarg(value.toRect().width()).tqarg(value.toRect().height())); } void |