summaryrefslogtreecommitdiffstats
path: root/kicker/libkicker/panelbutton.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kicker/libkicker/panelbutton.cpp')
-rw-r--r--kicker/libkicker/panelbutton.cpp72
1 files changed, 36 insertions, 36 deletions
diff --git a/kicker/libkicker/panelbutton.cpp b/kicker/libkicker/panelbutton.cpp
index aaac124c2..0708d0b5f 100644
--- a/kicker/libkicker/panelbutton.cpp
+++ b/kicker/libkicker/panelbutton.cpp
@@ -74,7 +74,7 @@ PanelButton::PanelButton( TQWidget* parent, const char* name, bool forceStandard
m_arrowDirection(KPanelExtension::Bottom),
m_popupDirection(KPanelApplet::Up),
m_iconAlignment(AlignCenter),
- m_orientation(Qt::Horizontal),
+ m_orientation(TQt::Horizontal),
m_size((TDEIcon::StdSizes)-1),
m_fontPercent(0.40),
m_forceStandardCursor(forceStandardCursor)
@@ -93,8 +93,8 @@ PanelButton::PanelButton( TQWidget* parent, const char* name, bool forceStandard
installEventFilter(KickerTip::the());
- connect(kapp, TQT_SIGNAL(settingsChanged(int)), TQT_SLOT(updateSettings(int)));
- connect(kapp, TQT_SIGNAL(iconChanged(int)), TQT_SLOT(updateIcon(int)));
+ connect(kapp, TQ_SIGNAL(settingsChanged(int)), TQ_SLOT(updateSettings(int)));
+ connect(kapp, TQ_SIGNAL(iconChanged(int)), TQ_SLOT(updateIcon(int)));
}
void PanelButton::configure()
@@ -196,7 +196,7 @@ void PanelButton::setPopupDirection(KPanelApplet::Direction d)
setArrowDirection(KickerLib::directionToPopupPosition(d));
}
-void PanelButton::setIconAlignment(TQ_Alignment align)
+void PanelButton::setIconAlignment(TQt::AlignmentFlags align)
{
m_iconAlignment = align;
update();
@@ -245,7 +245,7 @@ void PanelButton::checkForDeletion(const TQString& path)
if (path == m_backingFile)
{
setEnabled(false);
- TQTimer::singleShot(1000, this, TQT_SLOT(scheduleForRemoval()));
+ TQTimer::singleShot(1000, this, TQ_SLOT(scheduleForRemoval()));
}
}
@@ -278,7 +278,7 @@ void PanelButton::scheduleForRemoval()
}
timelapse *= 2;
- TQTimer::singleShot(timelapse, this, TQT_SLOT(scheduleForRemoval()));
+ TQTimer::singleShot(timelapse, this, TQ_SLOT(scheduleForRemoval()));
}
}
@@ -305,7 +305,7 @@ int PanelButton::widthForHeight(int height) const
// we only paint the text when horizontal, so make sure we're horizontal
// before adding the text in here
- if (orientation() == Qt::Horizontal && !m_buttonText.isEmpty())
+ if (orientation() == TQt::Horizontal && !m_buttonText.isEmpty())
{
TQFont f(font());
//f.setPixelSize(KMIN(height, KMAX(int(float(height) * m_fontPercent), 16)));
@@ -483,7 +483,7 @@ void PanelButton::dropEvent(TQDropEvent* e)
void PanelButton::mouseMoveEvent(TQMouseEvent *e)
{
- if (!m_isLeftMouseButtonDown || (e->state() & Qt::LeftButton) == 0)
+ if (!m_isLeftMouseButtonDown || (e->state() & TQt::LeftButton) == 0)
{
return;
}
@@ -501,7 +501,7 @@ void PanelButton::mouseMoveEvent(TQMouseEvent *e)
void PanelButton::mousePressEvent(TQMouseEvent *e)
{
- if (e->button() == Qt::LeftButton)
+ if (e->button() == TQt::LeftButton)
{
m_lastLeftMouseButtonPress = e->pos();
m_isLeftMouseButtonDown = true;
@@ -511,7 +511,7 @@ void PanelButton::mousePressEvent(TQMouseEvent *e)
void PanelButton::mouseReleaseEvent(TQMouseEvent *e)
{
- if (e->button() == Qt::LeftButton)
+ if (e->button() == TQt::LeftButton)
{
m_isLeftMouseButtonDown = false;
@@ -540,7 +540,7 @@ void PanelButton::drawButton(TQPainter *p)
if (m_tileColor.isValid())
{
p->fillRect(rect(), m_tileColor);
- style().tqdrawPrimitive(TQStyle::PE_Panel, p, rect(), colorGroup());
+ style().drawPrimitive(TQStyle::PE_Panel, p, rect(), colorGroup());
}
else if (paletteBackgroundPixmap())
{
@@ -560,7 +560,7 @@ void PanelButton::drawButton(TQPainter *p)
else if (isDown() || isOn())
{
// Draw shapes to indicate the down state.
- style().tqdrawPrimitive(TQStyle::PE_Panel, p, rect(), colorGroup(), TQStyle::Style_Sunken);
+ style().drawPrimitive(TQStyle::PE_Panel, p, rect(), colorGroup(), TQStyle::Style_Sunken);
}
drawButtonLabel(p);
@@ -568,9 +568,9 @@ void PanelButton::drawButton(TQPainter *p)
if (hasFocus() || m_hasAcceptedDrag)
{
int x1, y1, x2, y2;
- TQT_TQRECT_OBJECT(rect()).coords(&x1, &y1, &x2, &y2);
+ rect().coords(&x1, &y1, &x2, &y2);
TQRect r(x1+2, y1+2, x2-x1-3, y2-y1-3);
- style().tqdrawPrimitive(TQStyle::PE_FocusRect, p, r, colorGroup(),
+ style().drawPrimitive(TQStyle::PE_FocusRect, p, r, colorGroup(),
TQStyle::Style_Default, colorGroup().button());
}
}
@@ -582,7 +582,7 @@ void PanelButton::drawDeepButton(TQPainter *p)
if (m_tileColor.isValid())
{
p->fillRect(rect(), m_tileColor);
- style().tqdrawPrimitive(TQStyle::PE_Panel, p, rect(), colorGroup());
+ style().drawPrimitive(TQStyle::PE_Panel, p, rect(), colorGroup());
}
else if (paletteBackgroundPixmap())
{
@@ -596,10 +596,10 @@ void PanelButton::drawDeepButton(TQPainter *p)
TQRect btn_rect = TQRect(rect().x(), rect().y()+1, rect().width(), rect().height()-2);
if (isDown() || isOn()) {
- style().tqdrawPrimitive(TQStyle::PE_ButtonBevel, p, btn_rect, colorGroup(), TQStyle::Style_Down);
+ style().drawPrimitive(TQStyle::PE_ButtonBevel, p, btn_rect, colorGroup(), TQStyle::Style_Down);
}
else {
- style().tqdrawPrimitive(TQStyle::PE_ButtonBevel, p, btn_rect, colorGroup(), TQStyle::Style_Raised);
+ style().drawPrimitive(TQStyle::PE_ButtonBevel, p, btn_rect, colorGroup(), TQStyle::Style_Raised);
}
drawButtonLabel(p,0,FALSE);
@@ -607,9 +607,9 @@ void PanelButton::drawDeepButton(TQPainter *p)
if (hasFocus() || m_hasAcceptedDrag)
{
int x1, y1, x2, y2;
- TQT_TQRECT_OBJECT(rect()).coords(&x1, &y1, &x2, &y2);
+ rect().coords(&x1, &y1, &x2, &y2);
TQRect r(x1+2, y1+2, x2-x1-3, y2-y1-3);
- style().tqdrawPrimitive(TQStyle::PE_FocusRect, p, r, colorGroup(),
+ style().drawPrimitive(TQStyle::PE_FocusRect, p, r, colorGroup(),
TQStyle::Style_Default, colorGroup().button());
}
}
@@ -645,7 +645,7 @@ void PanelButton::drawButtonLabel(TQPainter *p, int voffset, bool drawArrow)
else if (m_iconAlignment & AlignBottom)
y = (height() - icon.height());
- if (!m_buttonText.isEmpty() && orientation() == Qt::Horizontal)
+ if (!m_buttonText.isEmpty() && orientation() == TQt::Horizontal)
{
int h = height();
int w = width();
@@ -749,7 +749,7 @@ void PanelButton::drawButtonLabel(TQPainter *p, int voffset, bool drawArrow)
r = TQRect(0, (height() - arrowSize)/2, arrowSize, arrowSize);
break;
case KPanelExtension::Floating:
- if (orientation() == Qt::Horizontal)
+ if (orientation() == TQt::Horizontal)
{
e = TQStyle::PE_ArrowDown;
r.moveBy(0, height() - arrowSize);
@@ -772,7 +772,7 @@ void PanelButton::drawButtonLabel(TQPainter *p, int voffset, bool drawArrow)
{
flags |= TQStyle::Style_Down;
}
- style().tqdrawPrimitive(e, p, r, colorGroup(), flags);
+ style().drawPrimitive(e, p, r, colorGroup(), flags);
}
}
@@ -795,7 +795,7 @@ int PanelButton::preferredIconSize(int proposed_size) const
if (proposed_size < 0)
{
- proposed_size = (orientation() == Qt::Horizontal) ? height() : width();
+ proposed_size = (orientation() == TQt::Horizontal) ? height() : width();
}
// determine the upper limit on the size. Normally, this is panelSize,
@@ -833,16 +833,16 @@ void PanelButton::backedByFile(const TQString& localFilePath)
}
// avoid multiple connections
- disconnect(KDirWatch::self(), TQT_SIGNAL(deleted(const TQString&)),
- this, TQT_SLOT(checkForDeletion(const TQString&)));
+ disconnect(KDirWatch::self(), TQ_SIGNAL(deleted(const TQString&)),
+ this, TQ_SLOT(checkForDeletion(const TQString&)));
if (!KDirWatch::self()->contains(m_backingFile))
{
KDirWatch::self()->addFile(m_backingFile);
}
- connect(KDirWatch::self(), TQT_SIGNAL(deleted(const TQString&)),
- this, TQT_SLOT(checkForDeletion(const TQString&)));
+ connect(KDirWatch::self(), TQ_SIGNAL(deleted(const TQString&)),
+ this, TQ_SLOT(checkForDeletion(const TQString&)));
}
@@ -966,7 +966,7 @@ PanelPopupButton::PanelPopupButton(TQWidget *parent, const char *name, bool forc
m_pressedDuringPopup(false),
m_initialized(false)
{
- connect(this, TQT_SIGNAL(pressed()), TQT_SLOT(slotExecMenu()));
+ connect(this, TQ_SIGNAL(pressed()), TQ_SLOT(slotExecMenu()));
}
void PanelPopupButton::setPopup(TQWidget *popup)
@@ -974,7 +974,7 @@ void PanelPopupButton::setPopup(TQWidget *popup)
if (m_popup)
{
m_popup->removeEventFilter(this);
- disconnect(m_popup, TQT_SIGNAL(aboutToHide()), this, TQT_SLOT(menuAboutToHide()));
+ disconnect(m_popup, TQ_SIGNAL(aboutToHide()), this, TQ_SLOT(menuAboutToHide()));
}
m_popup = popup;
@@ -983,7 +983,7 @@ void PanelPopupButton::setPopup(TQWidget *popup)
if (m_popup)
{
m_popup->installEventFilter(this);
- connect(m_popup, TQT_SIGNAL(aboutToHide()), this, TQT_SLOT(menuAboutToHide()));
+ connect(m_popup, TQ_SIGNAL(aboutToHide()), this, TQ_SLOT(menuAboutToHide()));
}
}
@@ -996,8 +996,8 @@ bool PanelPopupButton::eventFilter(TQObject *, TQEvent *e)
{
if (e->type() == TQEvent::MouseMove)
{
- TQMouseEvent *me = TQT_TQMOUSEEVENT(e);
- if (TQT_TQRECT_OBJECT(rect()).contains(mapFromGlobal(me->globalPos())) &&
+ TQMouseEvent *me = static_cast<TQMouseEvent*>(e);
+ if (rect().contains(mapFromGlobal(me->globalPos())) &&
((me->state() & ControlButton) != 0 ||
(me->state() & ShiftButton) != 0))
{
@@ -1008,8 +1008,8 @@ bool PanelPopupButton::eventFilter(TQObject *, TQEvent *e)
else if (e->type() == TQEvent::MouseButtonPress ||
e->type() == TQEvent::MouseButtonDblClick)
{
- TQMouseEvent *me = TQT_TQMOUSEEVENT(e);
- if (TQT_TQRECT_OBJECT(rect()).contains(mapFromGlobal(me->globalPos())))
+ TQMouseEvent *me = static_cast<TQMouseEvent*>(e);
+ if (rect().contains(mapFromGlobal(me->globalPos())))
{
m_pressedDuringPopup = true;
return true;
@@ -1017,8 +1017,8 @@ bool PanelPopupButton::eventFilter(TQObject *, TQEvent *e)
}
else if (e->type() == TQEvent::MouseButtonRelease)
{
- TQMouseEvent *me = TQT_TQMOUSEEVENT(e);
- if (TQT_TQRECT_OBJECT(rect()).contains(mapFromGlobal(me->globalPos())))
+ TQMouseEvent *me = static_cast<TQMouseEvent*>(e);
+ if (rect().contains(mapFromGlobal(me->globalPos())))
{
if (m_pressedDuringPopup && m_popup)
{