diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:56:07 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:56:07 +0000 |
commit | d6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch) | |
tree | d109539636691d7b03036ca1c0ed29dbae6577cf /lib/widgets/propeditor/plinestyleedit.cpp | |
parent | 3331a47a9cad24795c7440ee8107143ce444ef34 (diff) | |
download | tdevelop-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/plinestyleedit.cpp')
-rw-r--r-- | lib/widgets/propeditor/plinestyleedit.cpp | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/lib/widgets/propeditor/plinestyleedit.cpp b/lib/widgets/propeditor/plinestyleedit.cpp index 50f55e5d..adee930e 100644 --- a/lib/widgets/propeditor/plinestyleedit.cpp +++ b/lib/widgets/propeditor/plinestyleedit.cpp @@ -19,10 +19,10 @@ ***************************************************************************/ #include "plinestyleedit.h" -#include <qpainter.h> -#include <qpixmap.h> -#include <qcombobox.h> -#include <qlayout.h> +#include <tqpainter.h> +#include <tqpixmap.h> +#include <tqcombobox.h> +#include <tqlayout.h> namespace PropertyLib { @@ -127,75 +127,75 @@ namespace PropertyLib { "................................................"}; -PLineStyleEdit::PLineStyleEdit(MultiProperty* property, QWidget* parent, const char* name): PropertyWidget(property, parent, name) +PLineStyleEdit::PLineStyleEdit(MultiProperty* property, TQWidget* parent, const char* name): PropertyWidget(property, parent, name) { - QHBoxLayout *l = new QHBoxLayout(this, 0, 0); - m_edit = new QComboBox(this); - m_edit->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); + TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0); + m_edit = new TQComboBox(this); + m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding); l->addWidget(m_edit); - m_edit->insertItem(QPixmap(nopen)); - m_edit->insertItem(QPixmap(solid)); - m_edit->insertItem(QPixmap(dash)); - m_edit->insertItem(QPixmap(dashdot)); - m_edit->insertItem(QPixmap(dashdotdot)); + m_edit->insertItem(TQPixmap(nopen)); + m_edit->insertItem(TQPixmap(solid)); + m_edit->insertItem(TQPixmap(dash)); + m_edit->insertItem(TQPixmap(dashdot)); + m_edit->insertItem(TQPixmap(dashdotdot)); - connect(m_edit, SIGNAL(activated(int)), this, SLOT(updateProperty(int))); + connect(m_edit, TQT_SIGNAL(activated(int)), this, TQT_SLOT(updateProperty(int))); } -QVariant PLineStyleEdit::value() const +TQVariant PLineStyleEdit::value() const { return m_edit->currentItem(); } -void PLineStyleEdit::drawViewer(QPainter* p, const QColorGroup& cg, const QRect& r, const QVariant& value) +void PLineStyleEdit::drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value) { p->setPen(Qt::NoPen); p->setBrush(cg.background()); p->drawRect(r); - if (!value.canCast(QVariant::Int)) + if (!value.canCast(TQVariant::Int)) if ((value.toInt() > 5) || (value.toInt() < 0)) return; switch (value.toInt()) { case 0: - p->drawPixmap(r, QPixmap(nopen)); + p->drawPixmap(r, TQPixmap(nopen)); break; case 1: - p->drawPixmap(r, QPixmap(solid)); + p->drawPixmap(r, TQPixmap(solid)); break; case 2: - p->drawPixmap(r, QPixmap(dash)); + p->drawPixmap(r, TQPixmap(dash)); break; case 3: - p->drawPixmap(r, QPixmap(dashdot)); + p->drawPixmap(r, TQPixmap(dashdot)); break; case 4: - p->drawPixmap(r, QPixmap(dashdot)); + p->drawPixmap(r, TQPixmap(dashdot)); break; case 5: - p->drawPixmap(r, QPixmap(dashdotdot)); + p->drawPixmap(r, TQPixmap(dashdotdot)); break; } } -void PLineStyleEdit::setValue(const QVariant& value, bool emitChange) +void PLineStyleEdit::setValue(const TQVariant& value, bool emitChange) { - if (!value.canCast(QVariant::Int)) + if (!value.canCast(TQVariant::Int)) return; if ((value.toInt() > 5) || (value.toInt() < 0)) return; - disconnect(m_edit, SIGNAL(activated(int)), this, SLOT(updateProperty(int))); + disconnect(m_edit, TQT_SIGNAL(activated(int)), this, TQT_SLOT(updateProperty(int))); m_edit->setCurrentItem(value.toInt()); - connect(m_edit, SIGNAL(activated(int)), this, SLOT(updateProperty(int))); + connect(m_edit, TQT_SIGNAL(activated(int)), this, TQT_SLOT(updateProperty(int))); if (emitChange) emit propertyChanged(m_property, value); } void PLineStyleEdit::updateProperty(int val) { - emit propertyChanged(m_property, QVariant(val)); + emit propertyChanged(m_property, TQVariant(val)); } } |