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/pcolorbutton.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/pcolorbutton.cpp')
-rw-r--r-- | lib/widgets/propeditor/pcolorbutton.cpp | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/lib/widgets/propeditor/pcolorbutton.cpp b/lib/widgets/propeditor/pcolorbutton.cpp index 84063e8b..9609442f 100644 --- a/lib/widgets/propeditor/pcolorbutton.cpp +++ b/lib/widgets/propeditor/pcolorbutton.cpp @@ -19,46 +19,46 @@ ***************************************************************************/ #include "pcolorbutton.h" -#include <qlayout.h> -#include <qpainter.h> +#include <tqlayout.h> +#include <tqpainter.h> #ifndef PURE_QT #include <kcolorbutton.h> #else -#include <qpushbutton.h> -#include <qpixmap.h> -#include <qiconset.h> +#include <tqpushbutton.h> +#include <tqpixmap.h> +#include <tqiconset.h> #endif -#include <qcolordialog.h> +#include <tqcolordialog.h> namespace PropertyLib { -PColorButton::PColorButton(MultiProperty* property, QWidget* parent, const char* name) +PColorButton::PColorButton(MultiProperty* property, TQWidget* parent, const char* name) :PropertyWidget(property, parent, name) { - QHBoxLayout *l = new QHBoxLayout(this, 0, 0); + TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0); #ifndef PURE_QT m_edit = new KColorButton(this); - connect(m_edit, SIGNAL(changed(const QColor&)), this, SLOT(updateProperty(const QColor&))); + connect(m_edit, TQT_SIGNAL(changed(const TQColor&)), this, TQT_SLOT(updateProperty(const TQColor&))); #else - m_edit = new QPushButton(this); - connect(m_edit, SIGNAL(clicked()), this, SLOT(changeColor())); + m_edit = new TQPushButton(this); + connect(m_edit, TQT_SIGNAL(clicked()), this, TQT_SLOT(changeColor())); #endif - m_edit->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); + m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding); l->addWidget(m_edit); } -QVariant PColorButton::value() const +TQVariant PColorButton::value() const { #ifndef PURE_QT - return QVariant(m_edit->color()); + return TQVariant(m_edit->color()); #else - return QVariant(m_color); + return TQVariant(m_color); #endif } -void PColorButton::drawViewer(QPainter* p, const QColorGroup& cg, const QRect& r, const QVariant& value) +void PColorButton::drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value) { /* p->setBrush(value.toColor()); p->setPen(Qt::NoPen); @@ -69,22 +69,22 @@ void PColorButton::drawViewer(QPainter* p, const QColorGroup& cg, const QRect& r p->setBrush(value.toColor()); p->setPen(Qt::SolidLine); - QRect r2(r); - r2.setTopLeft(r.topLeft() + QPoint(5,5)); - r2.setBottomRight(r.bottomRight() - QPoint(5,5)); + TQRect r2(r); + r2.setTopLeft(r.topLeft() + TQPoint(5,5)); + r2.setBottomRight(r.bottomRight() - TQPoint(5,5)); p->drawRect(r2); } -void PColorButton::setValue(const QVariant& value, bool emitChange) +void PColorButton::setValue(const TQVariant& value, bool emitChange) { #ifndef PURE_QT - disconnect(m_edit, SIGNAL(changed(const QColor&)), this, SLOT(updateProperty(const QColor&))); + disconnect(m_edit, TQT_SIGNAL(changed(const TQColor&)), this, TQT_SLOT(updateProperty(const TQColor&))); m_edit->setColor(value.toColor()); - connect(m_edit, SIGNAL(changed(const QColor&)), this, SLOT(updateProperty(const QColor&))); + connect(m_edit, TQT_SIGNAL(changed(const TQColor&)), this, TQT_SLOT(updateProperty(const TQColor&))); #else m_color = value.toColor(); m_edit->setText(m_color.name()); - QPixmap px; + TQPixmap px; px.resize(14,14); px.fill(m_color); m_edit->setIconSet(px); @@ -94,7 +94,7 @@ void PColorButton::setValue(const QVariant& value, bool emitChange) } -void PColorButton::updateProperty(const QColor &// color +void PColorButton::updateProperty(const TQColor &// color ) { emit propertyChanged(m_property, value()); @@ -106,7 +106,7 @@ void PColorButton::changeColor() m_color = QColorDialog::getColor(m_color,this); updateProperty(m_color); m_edit->setText(m_color.name()); - QPixmap px; + TQPixmap px; px.resize(14,14); px.fill(m_color); m_edit->setIconSet(px); |