summaryrefslogtreecommitdiffstats
path: root/lib/widgets/propeditor/ppixmapedit.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-14 16:45:05 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-14 16:45:05 +0000
commit48d4a26399959121f33d2bc3bfe51c7827b654fc (patch)
tree5ae5e6e00d3ba330b7b8be9bc097154b6bc739e8 /lib/widgets/propeditor/ppixmapedit.cpp
parent7e701ace6592d09e1f2c0cf28c7d6d872d78f4f5 (diff)
downloadtdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.tar.gz
tdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.zip
TQt4 port kdevelop
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1236710 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'lib/widgets/propeditor/ppixmapedit.cpp')
-rw-r--r--lib/widgets/propeditor/ppixmapedit.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/widgets/propeditor/ppixmapedit.cpp b/lib/widgets/propeditor/ppixmapedit.cpp
index a4c18791..0eaec74b 100644
--- a/lib/widgets/propeditor/ppixmapedit.cpp
+++ b/lib/widgets/propeditor/ppixmapedit.cpp
@@ -41,23 +41,23 @@
namespace PropertyLib{
-PPixmapEdit::PPixmapEdit(MultiProperty* property, TQWidget* parent, const char* name)
- :PropertyWidget(property, parent, name)
+PPixmapEdit::PPixmapEdit(MultiProperty* property, TQWidget* tqparent, const char* name)
+ :PropertyWidget(property, tqparent, name)
{
TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
m_edit = new TQLabel(this);
- m_edit->setAlignment(Qt::AlignTop);
+ m_edit->tqsetAlignment(TQt::AlignTop);
m_edit->resize(width(), height()-1);
- m_edit->setBackgroundMode(Qt::PaletteBase);
+ m_edit->setBackgroundMode(TQt::PaletteBase);
m_edit->installEventFilter(this);
m_button = new TQPushButton(i18n("..."), this);
m_button->resize(height(), height()-8);
m_button->move(width() - m_button->width() -1, 0);
- m_button->setSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::Fixed);
+ m_button->tqsetSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::Fixed);
l->addWidget(m_edit);
l->addWidget(m_button);
- m_popup = new TQLabel(0, 0, Qt::WStyle_NoBorder|Qt::WX11BypassWM|WStyle_StaysOnTop);
+ m_popup = new TQLabel(0, 0, TQt::WStyle_NoBorder|TQt::WX11BypassWM|WStyle_StaysOnTop);
m_popup->hide();
@@ -71,7 +71,7 @@ TQVariant PPixmapEdit::value() const
void PPixmapEdit::drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value)
{
- p->setPen(Qt::NoPen);
+ p->setPen(TQt::NoPen);
p->setBrush(cg.background());
p->drawRect(r);
p->drawPixmap(r.topLeft().x(), r.topLeft().y(), value.toPixmap());
@@ -87,7 +87,7 @@ void PPixmapEdit::setValue(const TQVariant& value, bool emitChange)
void PPixmapEdit::updateProperty()
{
#ifndef PURE_QT
- KURL url = KFileDialog::getImageOpenURL(TQString::null, this);
+ KURL url = KFileDialog::getImageOpenURL(TQString(), this);
if (!url.isEmpty())
{
m_edit->setPixmap(TQPixmap(url.path()));
@@ -112,7 +112,7 @@ void PPixmapEdit::resizeEvent(TQResizeEvent *ev)
bool PPixmapEdit::eventFilter(TQObject *o, TQEvent *ev)
{
- if(o == m_edit)
+ if(TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(m_edit))
{
if(ev->type() == TQEvent::MouseButtonPress)
{
@@ -131,7 +131,7 @@ bool PPixmapEdit::eventFilter(TQObject *o, TQEvent *ev)
}
if(ev->type() == TQEvent::KeyPress)
{
- TQKeyEvent* e = static_cast<TQKeyEvent*>(ev);
+ TQKeyEvent* e = TQT_TQKEYEVENT(ev);
if((e->key() == Key_Enter) || (e->key()== Key_Space) || (e->key() == Key_Return))
{
m_button->animateClick();