summaryrefslogtreecommitdiffstats
path: root/lib/widgets/propeditor/ppixmapedit.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
commitd6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch)
treed109539636691d7b03036ca1c0ed29dbae6577cf /lib/widgets/propeditor/ppixmapedit.cpp
parent3331a47a9cad24795c7440ee8107143ce444ef34 (diff)
downloadtdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.tar.gz
tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'lib/widgets/propeditor/ppixmapedit.cpp')
-rw-r--r--lib/widgets/propeditor/ppixmapedit.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/lib/widgets/propeditor/ppixmapedit.cpp b/lib/widgets/propeditor/ppixmapedit.cpp
index db6a69d3..a4c18791 100644
--- a/lib/widgets/propeditor/ppixmapedit.cpp
+++ b/lib/widgets/propeditor/ppixmapedit.cpp
@@ -21,10 +21,10 @@
***************************************************************************/
#include "ppixmapedit.h"
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qlabel.h>
-#include <qcursor.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqlabel.h>
+#include <tqcursor.h>
#ifndef PURE_QT
#include <klocale.h>
@@ -35,41 +35,41 @@
#ifndef PURE_QT
#include <kfiledialog.h>
#else
-#include <qfiledialog.h>
+#include <tqfiledialog.h>
#endif
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
namespace PropertyLib{
-PPixmapEdit::PPixmapEdit(MultiProperty* property, QWidget* parent, const char* name)
+PPixmapEdit::PPixmapEdit(MultiProperty* property, TQWidget* parent, const char* name)
:PropertyWidget(property, parent, name)
{
- QHBoxLayout *l = new QHBoxLayout(this, 0, 0);
- m_edit = new QLabel(this);
+ TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
+ m_edit = new TQLabel(this);
m_edit->setAlignment(Qt::AlignTop);
m_edit->resize(width(), height()-1);
m_edit->setBackgroundMode(Qt::PaletteBase);
m_edit->installEventFilter(this);
- m_button = new QPushButton(i18n("..."), 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(QSizePolicy::Maximum, QSizePolicy::Fixed);
+ m_button->setSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::Fixed);
l->addWidget(m_edit);
l->addWidget(m_button);
- m_popup = new QLabel(0, 0, Qt::WStyle_NoBorder|Qt::WX11BypassWM|WStyle_StaysOnTop);
+ m_popup = new TQLabel(0, 0, Qt::WStyle_NoBorder|Qt::WX11BypassWM|WStyle_StaysOnTop);
m_popup->hide();
- connect(m_button, SIGNAL(clicked()), this, SLOT(updateProperty()));
+ connect(m_button, TQT_SIGNAL(clicked()), this, TQT_SLOT(updateProperty()));
}
-QVariant PPixmapEdit::value() const
+TQVariant PPixmapEdit::value() const
{
- return QVariant(*(m_edit->pixmap()));
+ return TQVariant(*(m_edit->pixmap()));
}
-void PPixmapEdit::drawViewer(QPainter* p, const QColorGroup& cg, const QRect& r, const QVariant& value)
+void PPixmapEdit::drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value)
{
p->setPen(Qt::NoPen);
p->setBrush(cg.background());
@@ -77,7 +77,7 @@ void PPixmapEdit::drawViewer(QPainter* p, const QColorGroup& cg, const QRect& r,
p->drawPixmap(r.topLeft().x(), r.topLeft().y(), value.toPixmap());
}
-void PPixmapEdit::setValue(const QVariant& value, bool emitChange)
+void PPixmapEdit::setValue(const TQVariant& value, bool emitChange)
{
m_edit->setPixmap(value.toPixmap());
if (emitChange)
@@ -87,51 +87,51 @@ void PPixmapEdit::setValue(const QVariant& value, bool emitChange)
void PPixmapEdit::updateProperty()
{
#ifndef PURE_QT
- KURL url = KFileDialog::getImageOpenURL(QString::null, this);
+ KURL url = KFileDialog::getImageOpenURL(TQString::null, this);
if (!url.isEmpty())
{
- m_edit->setPixmap(QPixmap(url.path()));
+ m_edit->setPixmap(TQPixmap(url.path()));
emit propertyChanged(m_property, value());
}
#else
- QString url = QFileDialog::getOpenFileName();
+ TQString url = TQFileDialog::getOpenFileName();
if (!url.isEmpty())
{
- m_edit->setPixmap(QPixmap(url));
+ m_edit->setPixmap(TQPixmap(url));
emit propertyChanged(m_property, value());
}
#endif
}
-void PPixmapEdit::resizeEvent(QResizeEvent *ev)
+void PPixmapEdit::resizeEvent(TQResizeEvent *ev)
{
m_edit->resize(ev->size().width(), ev->size().height()-1);
m_button->move(ev->size().width() - m_button->width(), 0);
m_edit->setMaximumHeight(m_button->height());
}
-bool PPixmapEdit::eventFilter(QObject *o, QEvent *ev)
+bool PPixmapEdit::eventFilter(TQObject *o, TQEvent *ev)
{
if(o == m_edit)
{
- if(ev->type() == QEvent::MouseButtonPress)
+ if(ev->type() == TQEvent::MouseButtonPress)
{
if(m_edit->pixmap()->size().height() < height()-2
&& m_edit->pixmap()->size().width() < width()-20)
return false;
m_popup->setPixmap(*(m_edit->pixmap()));
m_popup->resize(m_edit->pixmap()->size());
- m_popup->move(QCursor::pos());
+ m_popup->move(TQCursor::pos());
m_popup->show();
}
- if(ev->type() == QEvent::MouseButtonRelease)
+ if(ev->type() == TQEvent::MouseButtonRelease)
{
if(m_popup->isVisible())
m_popup->hide();
}
- if(ev->type() == QEvent::KeyPress)
+ if(ev->type() == TQEvent::KeyPress)
{
- QKeyEvent* e = static_cast<QKeyEvent*>(ev);
+ TQKeyEvent* e = static_cast<TQKeyEvent*>(ev);
if((e->key() == Key_Enter) || (e->key()== Key_Space) || (e->key() == Key_Return))
{
m_button->animateClick();