summaryrefslogtreecommitdiffstats
path: root/lib/koproperty/widget.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /lib/koproperty/widget.cpp
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-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/widget.cpp')
-rw-r--r--lib/koproperty/widget.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/lib/koproperty/widget.cpp b/lib/koproperty/widget.cpp
index 2584477e..1efeb5c0 100644
--- a/lib/koproperty/widget.cpp
+++ b/lib/koproperty/widget.cpp
@@ -23,8 +23,8 @@
#include "editoritem.h"
#include "editor.h"
-#include <qpainter.h>
-#include <qvariant.h>
+#include <tqpainter.h>
+#include <tqvariant.h>
#include <klistview.h>
#include <kdebug.h>
@@ -47,7 +47,7 @@ class WidgetPrivate
~WidgetPrivate() {}
Property *property;
- QWidget *editor;
+ TQWidget *editor;
bool leaveTheSpaceForRevertButton : 1;
bool hasBorders : 1;
bool readOnly : 1;
@@ -55,8 +55,8 @@ class WidgetPrivate
};
}
-Widget::Widget(Property *property, QWidget *parent, const char *name)
- : QWidget(parent, name)
+Widget::Widget(Property *property, TQWidget *tqparent, const char *name)
+ : TQWidget(tqparent, name)
{
d = new WidgetPrivate();
d->property = property;
@@ -85,16 +85,16 @@ Widget::setProperty(Property *property)
}
void
-Widget::drawViewer(QPainter *p, const QColorGroup &, const QRect &r, const QVariant &value)
+Widget::drawViewer(TQPainter *p, const TQColorGroup &, const TQRect &r, const TQVariant &value)
{
p->eraseRect(r);
- QRect rect(r);
+ TQRect rect(r);
rect.setLeft(rect.left()+KPROPEDITOR_ITEM_MARGIN);
// if (d->hasBorders)
// rect.setTop(rect.top()+1); //+1 to have the same vertical position as editor
// else
// rect.setHeight(rect.height()-1); //don't place over listviews's border
- p->drawText(rect, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, value.toString());
+ p->drawText(rect, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, value.toString());
}
void
@@ -105,11 +105,11 @@ Widget::undo()
}
bool
-Widget::eventFilter(QObject*, QEvent* e)
+Widget::eventFilter(TQObject*, TQEvent* e)
{
- if(e->type() == QEvent::KeyPress)
+ if(e->type() == TQEvent::KeyPress)
{
- QKeyEvent* ev = static_cast<QKeyEvent*>(e);
+ TQKeyEvent* ev = TQT_TQKEYEVENT(e);
if(ev->key() == Key_Escape)
{
emit rejectInput(this);
@@ -122,7 +122,7 @@ Widget::eventFilter(QObject*, QEvent* e)
return true;
}
else {
- Editor *list = static_cast<KoProperty::Editor*>(parentWidget()->parentWidget());
+ Editor *list = static_cast<KoProperty::Editor*>(tqparentWidget()->tqparentWidget());
if (!list)
return false; //for sanity
return list->handleKeyPress(ev);
@@ -149,10 +149,10 @@ Widget::eventFilter(QObject*, QEvent* e)
}
void
-Widget::setFocusWidget(QWidget*focusProxy)
+Widget::setFocusWidget(TQWidget*focusProxy)
{
if (focusProxy) {
- if (focusProxy->focusPolicy() != NoFocus)
+ if (focusProxy->focusPolicy() != TQ_NoFocus)
setFocusProxy(focusProxy);
focusProxy->installEventFilter(this);
}
@@ -187,19 +187,19 @@ Widget::hasBorders() const
}
void
-Widget::setEditor(QWidget* editor)
+Widget::setEditor(TQWidget* editor)
{
d->editor = editor;
if (!d->editor)
return;
- d->editor->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+ d->editor->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed);
d->editor->move(0,0);
}
void
-Widget::resizeEvent(QResizeEvent *e)
+Widget::resizeEvent(TQResizeEvent *e)
{
- QWidget::resizeEvent(e);
+ TQWidget::resizeEvent(e);
if (d->editor)
d->editor->resize(size());
}