From f008adb5a77e094eaf6abf3fc0f36958e66896a5 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 25 Jun 2011 05:28:35 +0000 Subject: TQt4 port koffice This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- lib/kopainter/ko_gray_widget.cc | 70 ++++++++++++++++++++--------------------- 1 file changed, 35 insertions(+), 35 deletions(-) (limited to 'lib/kopainter/ko_gray_widget.cc') diff --git a/lib/kopainter/ko_gray_widget.cc b/lib/kopainter/ko_gray_widget.cc index 957ee917..bf7503df 100644 --- a/lib/kopainter/ko_gray_widget.cc +++ b/lib/kopainter/ko_gray_widget.cc @@ -19,11 +19,11 @@ #include "ko_gray_widget.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include @@ -31,46 +31,46 @@ #include #include -KoGrayWidget::KoGrayWidget(QWidget *parent, const char *name) : super(parent, name) +KoGrayWidget::KoGrayWidget(TQWidget *tqparent, const char *name) : super(tqparent, name) { m_ColorButton = new KDualColorButton(this); Q_CHECK_PTR(m_ColorButton); - m_ColorButton -> setFixedSize(m_ColorButton->sizeHint()); - QGridLayout *mGrid = new QGridLayout(this, 3, 5, 5, 2); + m_ColorButton -> setFixedSize(m_ColorButton->tqsizeHint()); + TQGridLayout *mGrid = new TQGridLayout(this, 3, 5, 5, 2); /* setup color sliders */ mSlider = new KoColorSlider(this); - mSlider->setFocusPolicy( QWidget::ClickFocus ); + mSlider->setFocusPolicy( TQ_ClickFocus ); mSlider->setMaximumHeight(20); mSlider->slotSetRange(0, 255); - mSlider->slotSetColor1(QColor(255, 255, 255)); - mSlider->slotSetColor2(QColor(0, 0, 0)); + mSlider->slotSetColor1(TQColor(255, 255, 255)); + mSlider->slotSetColor2(TQColor(0, 0, 0)); /* setup slider labels */ - mLabel = new QLabel("K:", this); + mLabel = new TQLabel("K:", this); mLabel->setFixedWidth(12); mLabel->setFixedHeight(20); /* setup spin box */ - mIn = new QSpinBox(0, 255, 1, this); + mIn = new TQSpinBox(0, 255, 1, this); mIn->setFixedWidth(50); mIn->setFixedHeight(20); - mIn->setFocusPolicy( QWidget::ClickFocus ); + mIn->setFocusPolicy( TQ_ClickFocus ); - mGrid->addMultiCellWidget(m_ColorButton, 0, 3, 0, 0, Qt::AlignTop); + mGrid->addMultiCellWidget(m_ColorButton, 0, 3, 0, 0, TQt::AlignTop); mGrid->addWidget(mLabel, 0, 1); mGrid->addMultiCellWidget(mSlider, 0, 0, 2, 3); mGrid->addWidget(mIn, 0, 4); - connect(m_ColorButton, SIGNAL(fgChanged(const QColor &)), this, SLOT(slotFGColorSelected(const QColor &))); - connect(m_ColorButton, SIGNAL(bgChanged(const QColor &)), this, SLOT(slotBGColorSelected(const QColor &))); + connect(m_ColorButton, TQT_SIGNAL(fgChanged(const TQColor &)), this, TQT_SLOT(slotFGColorSelected(const TQColor &))); + connect(m_ColorButton, TQT_SIGNAL(bgChanged(const TQColor &)), this, TQT_SLOT(slotBGColorSelected(const TQColor &))); /* connect color slider */ - connect(mSlider, SIGNAL(valueChanged(int)), this, SLOT(slotChanged(int))); + connect(mSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotChanged(int))); /* connect spin box */ - connect(mIn, SIGNAL(valueChanged(int)), this, SLOT(slotChanged(int))); + connect(mIn, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotChanged(int))); } void KoGrayWidget::slotChanged(int v) @@ -78,37 +78,37 @@ void KoGrayWidget::slotChanged(int v) v = 255 - v; if (m_ColorButton->current() == KDualColorButton::Foreground){ - slotFGColorSelected( QColor( v, v, v)); + slotFGColorSelected( TQColor( v, v, v)); } else{ - slotBGColorSelected( QColor( v, v, v)); + slotBGColorSelected( TQColor( v, v, v)); } } -void KoGrayWidget::setFgColor(const QColor & c) +void KoGrayWidget::setFgColor(const TQColor & c) { blockSignals(true); slotFGColorSelected(c); blockSignals(false); } -void KoGrayWidget::setBgColor(const QColor & c) +void KoGrayWidget::setBgColor(const TQColor & c) { blockSignals(true); slotBGColorSelected(c); blockSignals(false); } -void KoGrayWidget::update(const QColor & fgColor, const QColor & bgColor) +void KoGrayWidget::update(const TQColor & fgColor, const TQColor & bgColor) { m_fgColor = fgColor; m_bgColor = bgColor; - QColor color = (m_ColorButton->current() == KDualColorButton::Foreground)? m_fgColor : m_bgColor; + TQColor color = (m_ColorButton->current() == KDualColorButton::Foreground)? m_fgColor : m_bgColor; - disconnect(mSlider, SIGNAL(valueChanged(int)), this, SLOT(slotChanged(int))); - disconnect(mIn, SIGNAL(valueChanged(int)), this, SLOT(slotChanged(int))); + disconnect(mSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotChanged(int))); + disconnect(mIn, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotChanged(int))); mIn->blockSignals(true); mSlider->blockSignals(true); @@ -120,28 +120,28 @@ void KoGrayWidget::update(const QColor & fgColor, const QColor & bgColor) mIn->blockSignals(false); mSlider->blockSignals(false); - connect(mSlider, SIGNAL(valueChanged(int)), this, SLOT(slotChanged(int))); - connect(mIn, SIGNAL(valueChanged(int)), this, SLOT(slotChanged(int))); + connect(mSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotChanged(int))); + connect(mIn, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotChanged(int))); } -void KoGrayWidget::slotFGColorSelected(const QColor& c) +void KoGrayWidget::slotFGColorSelected(const TQColor& c) { m_fgColor = c; - disconnect(m_ColorButton, SIGNAL(fgChanged(const QColor &)), this, SLOT(slotFGColorSelected(const QColor &))); + disconnect(m_ColorButton, TQT_SIGNAL(fgChanged(const TQColor &)), this, TQT_SLOT(slotFGColorSelected(const TQColor &))); m_ColorButton->setForeground( m_fgColor ); - connect(m_ColorButton, SIGNAL(fgChanged(const QColor &)), this, SLOT(slotFGColorSelected(const QColor &))); + connect(m_ColorButton, TQT_SIGNAL(fgChanged(const TQColor &)), this, TQT_SLOT(slotFGColorSelected(const TQColor &))); emit sigFgColorChanged(m_fgColor); } -void KoGrayWidget::slotBGColorSelected(const QColor& c) +void KoGrayWidget::slotBGColorSelected(const TQColor& c) { m_bgColor = c; - disconnect(m_ColorButton, SIGNAL(bgChanged(const QColor &)), this, SLOT(slotBGColorSelected(const QColor &))); + disconnect(m_ColorButton, TQT_SIGNAL(bgChanged(const TQColor &)), this, TQT_SLOT(slotBGColorSelected(const TQColor &))); m_ColorButton->setBackground( m_bgColor ); - connect(m_ColorButton, SIGNAL(bgChanged(const QColor &)), this, SLOT(slotBGColorSelected(const QColor &))); + connect(m_ColorButton, TQT_SIGNAL(bgChanged(const TQColor &)), this, TQT_SLOT(slotBGColorSelected(const TQColor &))); emit sigBgColorChanged(m_bgColor); } -- cgit v1.2.1