summaryrefslogtreecommitdiffstats
path: root/lib/widgets/propeditor/pcolorbutton.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/widgets/propeditor/pcolorbutton.cpp')
-rw-r--r--lib/widgets/propeditor/pcolorbutton.cpp50
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);