summaryrefslogtreecommitdiffstats
path: root/kwin-styles/riscos/Button.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-14 05:14:51 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-14 05:14:51 +0000
commit1d077caf68127ab1a5518df84cc5592a1b47a965 (patch)
tree9729a338937930e9014ccbd70296f3313d6dc2cc /kwin-styles/riscos/Button.cpp
parent771e57c60b52ff27c4d92cddc8e6bfc0b8dafd1a (diff)
downloadtdeartwork-1d077caf68127ab1a5518df84cc5592a1b47a965.tar.gz
tdeartwork-1d077caf68127ab1a5518df84cc5592a1b47a965.zip
TQt4 port kdeartwork
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeartwork@1246991 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kwin-styles/riscos/Button.cpp')
-rw-r--r--kwin-styles/riscos/Button.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/kwin-styles/riscos/Button.cpp b/kwin-styles/riscos/Button.cpp
index d126ced1..7bf4f477 100644
--- a/kwin-styles/riscos/Button.cpp
+++ b/kwin-styles/riscos/Button.cpp
@@ -31,13 +31,13 @@ Button::Button(TQWidget *parent, const TQString& tip,
const ButtonState realizeButtons)
: TQWidget(parent, "Button", 0),
realizeButtons_(realizeButtons),
- lastButton_(NoButton),
+ lastButton_(Qt::NoButton),
alignment_(Left),
down_ (false),
active_ (false)
{
TQToolTip::add(this, tip);
- setBackgroundColor(Qt::black);
+ setBackgroundColor(TQt::black);
setFixedSize(Static::instance()->titleHeight() - 1,
Static::instance()->titleHeight());
@@ -48,19 +48,19 @@ Button::~Button()
// Empty.
}
-void Button::setAlignment(Alignment a)
+void Button::tqsetAlignment(Alignment a)
{
alignment_ = a;
- repaint();
+ tqrepaint();
}
void Button::setActive(bool b)
{
active_ = b;
- repaint();
+ tqrepaint();
}
-Button::Alignment Button::alignment() const
+Button::Alignment Button::tqalignment() const
{
return alignment_;
}
@@ -69,10 +69,10 @@ void Button::mousePressEvent(TQMouseEvent *e)
{
down_ = true;
lastButton_ = e->button();
- repaint();
+ tqrepaint();
TQMouseEvent me(e->type(), e->pos(), e->globalPos(),
- (e->button()&realizeButtons_) ? LeftButton : NoButton,
+ (e->button()&realizeButtons_) ? Qt::LeftButton : Qt::NoButton,
e->state());
TQWidget::mousePressEvent(&me);
}
@@ -81,9 +81,9 @@ void Button::mouseReleaseEvent(TQMouseEvent *e)
{
down_ = false;
lastButton_ = e->button();
- repaint();
+ tqrepaint();
TQMouseEvent me(e->type(), e->pos(), e->globalPos(),
- (e->button()&realizeButtons_) ? LeftButton : NoButton,
+ (e->button()&realizeButtons_) ? Qt::LeftButton : Qt::NoButton,
e->state());
TQWidget::mouseReleaseEvent(&me);
}
@@ -94,9 +94,9 @@ void Button::setPixmap(const TQPixmap &p)
aPixmap_ = iPixmap_ = p;
else
{
- QRgb light;
- QRgb* data = NULL;
- QRgb w = qRgb(255, 255, 255);
+ TQRgb light;
+ TQRgb* data = NULL;
+ TQRgb w = tqRgb(255, 255, 255);
TQImage aTx(p.convertToImage());
TQImage iTx(aTx.copy());
@@ -104,10 +104,10 @@ void Button::setPixmap(const TQPixmap &p)
const KDecorationOptions* options = KDecoration::options();
light = options->color(KDecoration::ColorButtonBg, true).light(150).rgb();
- if (light == qRgb(0, 0, 0))
- light = qRgb(228, 228, 228);
+ if (light == tqRgb(0, 0, 0))
+ light = tqRgb(228, 228, 228);
- data = (QRgb *)aTx.bits();
+ data = (TQRgb *)aTx.bits();
for (int x = 0; x < 144; x++)
if (data[x] == w)
@@ -115,10 +115,10 @@ void Button::setPixmap(const TQPixmap &p)
light = options->color(KDecoration::ColorButtonBg, false).light(150).rgb();
- if (light == qRgb(0, 0, 0))
- light = qRgb(228, 228, 228);
+ if (light == tqRgb(0, 0, 0))
+ light = tqRgb(228, 228, 228);
- data = (QRgb *)iTx.bits();
+ data = (TQRgb *)iTx.bits();
for (int x = 0; x < 144; x++)
if (data[x] == w)
@@ -133,7 +133,7 @@ void Button::setPixmap(const TQPixmap &p)
iPixmap_.setMask(*p.mask());
}
}
- repaint();
+ tqrepaint();
}
void Button::paintEvent(TQPaintEvent *)