summaryrefslogtreecommitdiffstats
path: root/kicker/libkicker
diff options
context:
space:
mode:
Diffstat (limited to 'kicker/libkicker')
-rw-r--r--kicker/libkicker/global.cpp19
-rw-r--r--kicker/libkicker/global.h2
-rw-r--r--kicker/libkicker/kickerSettings.kcfg17
-rw-r--r--kicker/libkicker/kickertip.cpp42
-rw-r--r--kicker/libkicker/kickertip.h2
-rw-r--r--kicker/libkicker/kshadowengine.cpp2
-rw-r--r--kicker/libkicker/menuinfo.cpp2
-rw-r--r--kicker/libkicker/panelbutton.cpp72
-rw-r--r--kicker/libkicker/panelbutton.h8
-rw-r--r--kicker/libkicker/panner.cpp34
-rw-r--r--kicker/libkicker/panner.h6
-rw-r--r--kicker/libkicker/simplebutton.cpp32
-rw-r--r--kicker/libkicker/simplebutton.h18
13 files changed, 126 insertions, 130 deletions
diff --git a/kicker/libkicker/global.cpp b/kicker/libkicker/global.cpp
index 62f7f055a..224cf427a 100644
--- a/kicker/libkicker/global.cpp
+++ b/kicker/libkicker/global.cpp
@@ -114,19 +114,19 @@ KPanelApplet::Direction arrowToDirection(TQt::ArrowType p)
{
switch (p)
{
- case Qt::DownArrow:
+ case TQt::DownArrow:
return KPanelApplet::Down;
break;
- case Qt::LeftArrow:
+ case TQt::LeftArrow:
return KPanelApplet::Left;
break;
- case Qt::RightArrow:
+ case TQt::RightArrow:
return KPanelApplet::Right;
break;
- case Qt::UpArrow:
+ case TQt::UpArrow:
default:
return KPanelApplet::Up;
break;
@@ -464,20 +464,15 @@ TQIconSet menuIconSet(const TQString& icon)
void drawBlendedRect(TQPainter *p, const TQRect &r, const TQColor &color, int alpha)
{
static TQPixmap pix;
- static TQColor last_color = Qt::black;
+ static TQColor last_color = TQt::black;
static int last_alpha = 0;
if (pix.isNull() || last_color != color || last_alpha != alpha)
{
TQImage img(16, 16, 32);
-#ifdef USE_QT4
+ img.setAlphaBuffer(false);
+ img.fill(((uint)(alpha & 0xFF) << 24) | (color.rgb() & 0xFFFFFF));
img.setAlphaBuffer(true);
- img.fill(((uint)(alpha & 0xFF) << 24) | (color.rgb() & 0xFFFFFF));
-#else // USE_QT4
- img.setAlphaBuffer(false);
- img.fill(((uint)(alpha & 0xFF) << 24) | (color.rgb() & 0xFFFFFF));
- img.setAlphaBuffer(true);
-#endif // USE_QT4
pix.convertFromImage(img);
last_color = color;
last_alpha = alpha;
diff --git a/kicker/libkicker/global.h b/kicker/libkicker/global.h
index 663987174..61ba2f0ea 100644
--- a/kicker/libkicker/global.h
+++ b/kicker/libkicker/global.h
@@ -57,7 +57,7 @@ KDE_EXPORT void colorize(TQImage& image);
/**
* Blend a color rectangle on a painter
*/
-KDE_EXPORT void drawBlendedRect(TQPainter *p, const TQRect &r, const TQColor &color = Qt::black, int alpha = 0x40);
+KDE_EXPORT void drawBlendedRect(TQPainter *p, const TQRect &r, const TQColor &color = TQt::black, int alpha = 0x40);
/**
* Blend two colours together to get a colour halfway in between
diff --git a/kicker/libkicker/kickerSettings.kcfg b/kicker/libkicker/kickerSettings.kcfg
index 5ab6880aa..9951fe9e1 100644
--- a/kicker/libkicker/kickerSettings.kcfg
+++ b/kicker/libkicker/kickerSettings.kcfg
@@ -316,7 +316,7 @@
<entry name="KMenuTileColor" type="Color" >
<label>Color to use for Kmenu button background</label>
- <default code="true">QColor()</default>
+ <default code="true">TQColor()</default>
</entry>
<entry name="DesktopButtonTile" type="Path" >
@@ -325,7 +325,7 @@
<entry name="DesktopButtonTileColor" type="Color" >
<label>Color to use for Kmenu button background</label>
- <default code="true">QColor()</default>
+ <default code="true">TQColor()</default>
</entry>
<entry name="URLTile" type="Path" >
@@ -334,7 +334,7 @@
<entry name="URLTileColor" type="Color" >
<label>Color to use for Application, URL and special button backgrounds</label>
- <default code="true">QColor()</default>
+ <default code="true">TQColor()</default>
</entry>
<entry name="BrowserTile" type="Path" >
@@ -343,7 +343,7 @@
<entry name="BrowserTileColor" type="Color" >
<label>Color to use for Browser button background</label>
- <default code="true">QColor()</default>
+ <default code="true">TQColor()</default>
</entry>
<entry name="WindowListTile" type="Path" >
@@ -352,7 +352,7 @@
<entry name="WindowListTileColor" type="Color" >
<label>Color to use for Window List button background</label>
- <default code="true">QColor()</default>
+ <default code="true">TQColor()</default>
</entry>
</group>
@@ -416,7 +416,12 @@
<entry name="CustomKMenuIcon" key="CustomIcon" type="Path" >
<label>Custom TDE Menu Button Icon</label>
- <default code="true">QString("kmenu")</default>
+ <default code="true">TQString("kmenu")</default>
+ </entry>
+
+ <entry name="SearchShortcut" type="String" >
+ <label>Search shortcut</label>
+ <default>/</default>
</entry>
</group>
diff --git a/kicker/libkicker/kickertip.cpp b/kicker/libkicker/kickertip.cpp
index 0a6000f37..c896c830a 100644
--- a/kicker/libkicker/kickertip.cpp
+++ b/kicker/libkicker/kickertip.cpp
@@ -76,13 +76,13 @@ KickerTip::KickerTip(TQWidget * parent)
m_timer(0, "KickerTip::m_timer"),
m_frameTimer(0, "KickerTip::m_frameTimer")
{
- setFocusPolicy(TQ_NoFocus);
+ setFocusPolicy(TQWidget::NoFocus);
setBackgroundMode(NoBackground);
resize(0, 0);
hide();
- connect(&m_frameTimer, TQT_SIGNAL(timeout()), TQT_SLOT(internalUpdate()));
+ connect(&m_frameTimer, TQ_SIGNAL(timeout()), TQ_SLOT(internalUpdate()));
// // FIXME: The settingsChanged(SettingsCategory) signal is not available under Trinity; where was it originally supposed to come from?
-// connect(kapp, TQT_SIGNAL(settingsChanged(SettingsCategory)), TQT_SLOT(slotSettingsChanged()));
+// connect(kapp, TQ_SIGNAL(settingsChanged(SettingsCategory)), TQ_SLOT(slotSettingsChanged()));
}
KickerTip::~KickerTip()
@@ -176,8 +176,8 @@ void KickerTip::display()
// close the message window after given mS
if (data.duration > 0)
{
- disconnect(&m_timer, TQT_SIGNAL(timeout()), 0, 0);
- connect(&m_timer, TQT_SIGNAL(timeout()), TQT_SLOT(hide()));
+ disconnect(&m_timer, TQ_SIGNAL(timeout()), 0, 0);
+ connect(&m_timer, TQ_SIGNAL(timeout()), TQ_SLOT(hide()));
m_timer.start(data.duration, true);
}
else
@@ -283,10 +283,10 @@ void KickerTip::plainMask()
{
TQPainter maskPainter(&m_mask);
- m_mask.fill(Qt::color0);
+ m_mask.fill(TQt::color0);
- maskPainter.setBrush(Qt::color1);
- maskPainter.setPen(Qt::NoPen);
+ maskPainter.setBrush(TQt::color1);
+ maskPainter.setPen(TQt::NoPen);
//maskPainter.drawRoundRect(m_mask.rect(), 1600 / m_mask.rect().width(), 1600 / m_mask.rect().height());
drawRoundRect(maskPainter, m_mask.rect());
setMask(m_mask);
@@ -297,10 +297,10 @@ void KickerTip::dissolveMask()
{
TQPainter maskPainter(&m_mask);
- m_mask.fill(Qt::color0);
+ m_mask.fill(TQt::color0);
- maskPainter.setBrush(Qt::color1);
- maskPainter.setPen(Qt::NoPen);
+ maskPainter.setBrush(TQt::color1);
+ maskPainter.setPen(TQt::NoPen);
//maskPainter.drawRoundRect(m_mask.rect(), 1600 / m_mask.rect().width(), 1600 / m_mask.rect().height());
drawRoundRect(maskPainter, m_mask.rect());
@@ -424,16 +424,16 @@ void KickerTip::tipFor(const TQWidget* w)
{
if (m_tippingFor)
{
- disconnect(m_tippingFor, TQT_SIGNAL(destroyed(TQObject*)),
- this, TQT_SLOT(tipperDestroyed(TQObject*)));
+ disconnect(m_tippingFor, TQ_SIGNAL(destroyed(TQObject*)),
+ this, TQ_SLOT(tipperDestroyed(TQObject*)));
}
m_tippingFor = w;
if (m_tippingFor)
{
- connect(m_tippingFor, TQT_SIGNAL(destroyed(TQObject*)),
- this, TQT_SLOT(tipperDestroyed(TQObject*)));
+ connect(m_tippingFor, TQ_SIGNAL(destroyed(TQObject*)),
+ this, TQ_SLOT(tipperDestroyed(TQObject*)));
}
}
@@ -452,7 +452,7 @@ void KickerTip::tipperDestroyed(TQObject* o)
{
// we can't do a dynamic cast because we are in the process of dying
// so static it is.
- untipFor(TQT_TQWIDGET(o));
+ untipFor(static_cast<TQWidget*>(o));
}
void KickerTip::internalUpdate()
@@ -508,7 +508,7 @@ bool KickerTip::eventFilter(TQObject *object, TQEvent *event)
return false;
}
- TQWidget *widget = TQT_TQWIDGET(object);
+ TQWidget *widget = static_cast<TQWidget*>(object);
switch (event->type())
{
@@ -526,8 +526,8 @@ bool KickerTip::eventFilter(TQObject *object, TQEvent *event)
tipFor(widget);
m_timer.stop();
- disconnect(&m_timer, TQT_SIGNAL(timeout()), 0, 0);
- connect(&m_timer, TQT_SIGNAL(timeout()), TQT_SLOT(display()));
+ disconnect(&m_timer, TQ_SIGNAL(timeout()), 0, 0);
+ connect(&m_timer, TQ_SIGNAL(timeout()), TQ_SLOT(display()));
// delay to avoid false starts
// e.g. when the user quickly zooms their mouse over
@@ -547,8 +547,8 @@ bool KickerTip::eventFilter(TQObject *object, TQEvent *event)
if (isTippingFor(widget) && isVisible())
{
- disconnect(&m_timer, TQT_SIGNAL(timeout()), 0, 0);
- connect(&m_timer, TQT_SIGNAL(timeout()), TQT_SLOT(hide()));
+ disconnect(&m_timer, TQ_SIGNAL(timeout()), 0, 0);
+ connect(&m_timer, TQ_SIGNAL(timeout()), TQ_SLOT(hide()));
m_timer.start(KickerSettings::mouseOversHideDelay(), true);
}
diff --git a/kicker/libkicker/kickertip.h b/kicker/libkicker/kickertip.h
index b7332967f..7295b4efa 100644
--- a/kicker/libkicker/kickertip.h
+++ b/kicker/libkicker/kickertip.h
@@ -40,7 +40,7 @@ class TQTimer;
class KDE_EXPORT KickerTip : public TQWidget
{
- Q_OBJECT
+ TQ_OBJECT
public:
enum MaskEffect { Plain, Dissolve };
diff --git a/kicker/libkicker/kshadowengine.cpp b/kicker/libkicker/kshadowengine.cpp
index a933026d5..76f1b9d87 100644
--- a/kicker/libkicker/kshadowengine.cpp
+++ b/kicker/libkicker/kshadowengine.cpp
@@ -236,7 +236,7 @@ void KTextShadowEngine::drawText(TQPainter &p, const TQRect &tr, int tf, const T
// draw text
pixPainter.begin(&textPixmap);
- pixPainter.setPen(Qt::white);
+ pixPainter.setPen(TQt::white);
pixPainter.setFont(p.font()); // get the font from the root painter
pixPainter.drawText(tr, tf, str);
pixPainter.end();
diff --git a/kicker/libkicker/menuinfo.cpp b/kicker/libkicker/menuinfo.cpp
index a8e4bf1fa..8cdc4c664 100644
--- a/kicker/libkicker/menuinfo.cpp
+++ b/kicker/libkicker/menuinfo.cpp
@@ -64,5 +64,5 @@ KPanelMenu* MenuInfo::load(TQWidget *parent, const char *name)
return KParts::ComponentFactory::createInstanceFromLibrary<KPanelMenu>(
TQFile::encodeName( library_ ),
- TQT_TQOBJECT(parent), name );
+ parent, name );
}
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)
{
diff --git a/kicker/libkicker/panelbutton.h b/kicker/libkicker/panelbutton.h
index 80b26f377..cea132680 100644
--- a/kicker/libkicker/panelbutton.h
+++ b/kicker/libkicker/panelbutton.h
@@ -45,7 +45,7 @@ class KShadowEngine;
*/
class KDE_EXPORT PanelButton: public TQButton, public KickerTip::Client
{
- Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -263,7 +263,7 @@ public slots:
protected:
- void setIconAlignment(TQ_Alignment align);
+ void setIconAlignment(TQt::AlignmentFlags align);
/**
* Subclasses must implement this to define the name of the button which is
* used to identify this button for saving and loading. It must be unique
@@ -406,7 +406,7 @@ private:
TQPixmap m_iconz; // mouse over
KPanelExtension::Position m_arrowDirection;
KPanelApplet::Direction m_popupDirection;
- TQ_Alignment m_iconAlignment;
+ TQt::AlignmentFlags m_iconAlignment;
Orientation m_orientation;
int m_size;
double m_fontPercent;
@@ -422,7 +422,7 @@ private:
*/
class KDE_EXPORT PanelPopupButton : public PanelButton
{
- Q_OBJECT
+ TQ_OBJECT
public:
/**
diff --git a/kicker/libkicker/panner.cpp b/kicker/libkicker/panner.cpp
index ec06b30c9..0401cfcdc 100644
--- a/kicker/libkicker/panner.cpp
+++ b/kicker/libkicker/panner.cpp
@@ -46,7 +46,7 @@ Panner::Panner( TQWidget* parent, const char* name )
setBackgroundOrigin( AncestorOrigin );
_updateScrollButtonsTimer = new TQTimer(this);
- connect(_updateScrollButtonsTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(reallyUpdateScrollButtons()));
+ connect(_updateScrollButtonsTimer, TQ_SIGNAL(timeout()), this, TQ_SLOT(reallyUpdateScrollButtons()));
_clipper = new TQWidget(this);
_clipper->setBackgroundOrigin(AncestorOrigin);
@@ -57,7 +57,7 @@ Panner::Panner( TQWidget* parent, const char* name )
// layout
_layout = new TQBoxLayout(this, TQBoxLayout::LeftToRight);
_layout->addWidget(_clipper, 1);
- setOrientation(Qt::Horizontal);
+ setOrientation(TQt::Horizontal);
}
Panner::~Panner()
@@ -78,8 +78,8 @@ void Panner::createScrollButtons()
_luSB->setMinimumSize(12, 12);
_luSB->hide();
_layout->addWidget(_luSB);
- connect(_luSB, TQT_SIGNAL(pressed()), TQT_SLOT(startScrollLeftUp()));
- connect(_luSB, TQT_SIGNAL(released()), TQT_SLOT(stopScroll()));
+ connect(_luSB, TQ_SIGNAL(pressed()), TQ_SLOT(startScrollLeftUp()));
+ connect(_luSB, TQ_SIGNAL(released()), TQ_SLOT(stopScroll()));
// right/down scroll button
_rdSB = new SimpleArrowButton(this);
@@ -88,8 +88,8 @@ void Panner::createScrollButtons()
_rdSB->setMinimumSize(12, 12);
_rdSB->hide();
_layout->addWidget(_rdSB);
- connect(_rdSB, TQT_SIGNAL(pressed()), TQT_SLOT(startScrollRightDown()));
- connect(_rdSB, TQT_SIGNAL(released()), TQT_SLOT(stopScroll()));
+ connect(_rdSB, TQ_SIGNAL(pressed()), TQ_SLOT(startScrollRightDown()));
+ connect(_rdSB, TQ_SIGNAL(released()), TQ_SLOT(stopScroll()));
// set up the buttons
setupButtons();
@@ -97,12 +97,12 @@ void Panner::createScrollButtons()
void Panner::setupButtons()
{
- if (orientation() == Qt::Horizontal)
+ if (orientation() == TQt::Horizontal)
{
if (_luSB)
{
- _luSB->setArrowType(Qt::LeftArrow);
- _rdSB->setArrowType(Qt::RightArrow);
+ _luSB->setArrowType(TQt::LeftArrow);
+ _rdSB->setArrowType(TQt::RightArrow);
_luSB->setSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Expanding));
_rdSB->setSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Expanding));
TQToolTip::add(_luSB, i18n("Scroll left"));
@@ -115,8 +115,8 @@ void Panner::setupButtons()
{
if (_luSB)
{
- _luSB->setArrowType(Qt::UpArrow);
- _rdSB->setArrowType(Qt::DownArrow);
+ _luSB->setArrowType(TQt::UpArrow);
+ _rdSB->setArrowType(TQt::DownArrow);
_luSB->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Minimum));
_rdSB->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Minimum));
TQToolTip::add(_luSB, i18n("Scroll up"));
@@ -149,7 +149,7 @@ void Panner::resizeEvent( TQResizeEvent* )
void Panner::scrollRightDown()
{
- if(orientation() == Qt::Horizontal) // scroll right
+ if(orientation() == TQt::Horizontal) // scroll right
scrollBy( _step, 0 );
else // scroll down
scrollBy( 0, _step );
@@ -159,7 +159,7 @@ void Panner::scrollRightDown()
void Panner::scrollLeftUp()
{
- if(orientation() == Qt::Horizontal) // scroll left
+ if(orientation() == TQt::Horizontal) // scroll left
scrollBy( -_step, 0 );
else // scroll up
scrollBy( 0, -_step );
@@ -170,7 +170,7 @@ void Panner::scrollLeftUp()
void Panner::startScrollRightDown()
{
_scrollTimer = new TQTimer(this);
- connect(_scrollTimer, TQT_SIGNAL(timeout()), TQT_SLOT(scrollRightDown()));
+ connect(_scrollTimer, TQ_SIGNAL(timeout()), TQ_SLOT(scrollRightDown()));
_scrollTimer->start(50);
_step = 8;
scrollRightDown();
@@ -179,7 +179,7 @@ void Panner::startScrollRightDown()
void Panner::startScrollLeftUp()
{
_scrollTimer = new TQTimer(this);
- connect(_scrollTimer, TQT_SIGNAL(timeout()), TQT_SLOT(scrollLeftUp()));
+ connect(_scrollTimer, TQ_SIGNAL(timeout()), TQ_SLOT(scrollLeftUp()));
_scrollTimer->start(50);
_step = 8;
scrollLeftUp();
@@ -197,7 +197,7 @@ void Panner::reallyUpdateScrollButtons()
_updateScrollButtonsTimer->stop();
- if (orientation() == Qt::Horizontal)
+ if (orientation() == TQt::Horizontal)
{
delta = contentsWidth() - width();
}
@@ -336,7 +336,7 @@ void Panner::ensureVisible( int x, int y, int xmargin, int ymargin )
bool Panner::eventFilter( TQObject *obj, TQEvent *e )
{
- if ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(_viewport) || TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(_clipper) )
+ if ( obj == _viewport || obj == _clipper )
{
switch ( e->type() )
{
diff --git a/kicker/libkicker/panner.h b/kicker/libkicker/panner.h
index 7ae68d096..36305bb0c 100644
--- a/kicker/libkicker/panner.h
+++ b/kicker/libkicker/panner.h
@@ -33,7 +33,7 @@ class TQTimer;
class KDE_EXPORT Panner : public TQWidget
{
- Q_OBJECT
+ TQ_OBJECT
public:
Panner( TQWidget* parent, const char* name = 0 );
@@ -41,8 +41,8 @@ public:
TQSize minimumSizeHint() const { return TQWidget::minimumSizeHint(); }
- Qt::Orientation orientation() const { return _orient; }
- virtual void setOrientation(Qt::Orientation orientation);
+ TQt::Orientation orientation() const { return _orient; }
+ virtual void setOrientation(TQt::Orientation orientation);
TQWidget *viewport() const { return _viewport; }
diff --git a/kicker/libkicker/simplebutton.cpp b/kicker/libkicker/simplebutton.cpp
index 67c90b81a..79fd19915 100644
--- a/kicker/libkicker/simplebutton.cpp
+++ b/kicker/libkicker/simplebutton.cpp
@@ -42,15 +42,15 @@
SimpleButton::SimpleButton(TQWidget *parent, const char *name, bool forceStandardCursor)
: TQButton(parent, name),
m_highlight(false),
- m_orientation(Qt::Horizontal),
+ m_orientation(TQt::Horizontal),
m_forceStandardCursor(forceStandardCursor)
{
setBackgroundOrigin( AncestorOrigin );
- connect( kapp, TQT_SIGNAL( settingsChanged( int ) ),
- TQT_SLOT( slotSettingsChanged( int ) ) );
- connect( kapp, TQT_SIGNAL( iconChanged( int ) ),
- TQT_SLOT( slotIconChanged( int ) ) );
+ connect( kapp, TQ_SIGNAL( settingsChanged( int ) ),
+ TQ_SLOT( slotSettingsChanged( int ) ) );
+ connect( kapp, TQ_SIGNAL( iconChanged( int ) ),
+ TQ_SLOT( slotIconChanged( int ) ) );
kapp->addKipcEventMask( KIPC::SettingsChanged );
kapp->addKipcEventMask( KIPC::IconChanged );
@@ -65,7 +65,7 @@ void SimpleButton::setPixmap(const TQPixmap &pix)
update();
}
-void SimpleButton::setOrientation(Qt::Orientation orientation)
+void SimpleButton::setOrientation(TQt::Orientation orientation)
{
m_orientation = orientation;
update();
@@ -99,7 +99,7 @@ void SimpleButton::drawButton( TQPainter *p )
if (m_highlight || isDown() || isOn()) {
int flags = TQStyle::Style_Default | TQStyle::Style_Enabled;
if (isDown() || isOn()) flags |= TQStyle::Style_Down;
- style().tqdrawPrimitive(TQStyle::PE_ButtonTool, p, r, colorGroup(), flags);
+ style().drawPrimitive(TQStyle::PE_ButtonTool, p, r, colorGroup(), flags);
}
}
@@ -220,7 +220,7 @@ void SimpleButton::resizeEvent( TQResizeEvent * )
}
-SimpleArrowButton::SimpleArrowButton(TQWidget *parent, Qt::ArrowType arrow, const char *name, bool forceStandardCursor)
+SimpleArrowButton::SimpleArrowButton(TQWidget *parent, TQt::ArrowType arrow, const char *name, bool forceStandardCursor)
: SimpleButton(parent, name, forceStandardCursor),
m_forceStandardCursor(forceStandardCursor)
{
@@ -234,7 +234,7 @@ TQSize SimpleArrowButton::sizeHint() const
return TQSize( 12, 12 );
}
-void SimpleArrowButton::setArrowType(Qt::ArrowType a)
+void SimpleArrowButton::setArrowType(TQt::ArrowType a)
{
if (_arrow != a)
{
@@ -243,7 +243,7 @@ void SimpleArrowButton::setArrowType(Qt::ArrowType a)
}
}
-Qt::ArrowType SimpleArrowButton::arrowType() const
+TQt::ArrowType SimpleArrowButton::arrowType() const
{
return _arrow;
}
@@ -255,15 +255,15 @@ void SimpleArrowButton::drawButton( TQPainter *p )
TQStyle::PrimitiveElement pe = TQStyle::PE_ArrowLeft;
switch (_arrow)
{
- case Qt::LeftArrow: pe = TQStyle::PE_ArrowLeft; break;
- case Qt::RightArrow: pe = TQStyle::PE_ArrowRight; break;
- case Qt::UpArrow: pe = TQStyle::PE_ArrowUp; break;
- case Qt::DownArrow: pe = TQStyle::PE_ArrowDown; break;
+ case TQt::LeftArrow: pe = TQStyle::PE_ArrowLeft; break;
+ case TQt::RightArrow: pe = TQStyle::PE_ArrowRight; break;
+ case TQt::UpArrow: pe = TQStyle::PE_ArrowUp; break;
+ case TQt::DownArrow: pe = TQStyle::PE_ArrowDown; break;
}
int flags = TQStyle::Style_Default | TQStyle::Style_Enabled;
if (isDown() || isOn()) flags |= TQStyle::Style_Down;
- style().tqdrawPrimitive(pe, p, r, colorGroup(), flags);
+ style().drawPrimitive(pe, p, r, colorGroup(), flags);
if (m_forceStandardCursor) {
SimpleButton::drawButton(p);
@@ -285,5 +285,3 @@ void SimpleArrowButton::leaveEvent( TQEvent *e )
}
#include "simplebutton.moc"
-
-// vim:ts=4:sw=4:et
diff --git a/kicker/libkicker/simplebutton.h b/kicker/libkicker/simplebutton.h
index bbfcbd79d..7f1718273 100644
--- a/kicker/libkicker/simplebutton.h
+++ b/kicker/libkicker/simplebutton.h
@@ -28,12 +28,12 @@
class KDE_EXPORT SimpleButton : public TQButton
{
- Q_OBJECT
+ TQ_OBJECT
public:
SimpleButton(TQWidget *parent, const char *name = 0, bool forceStandardCursor = FALSE);
void setPixmap(const TQPixmap &pix);
- void setOrientation(Qt::Orientation orientaton);
+ void setOrientation(TQt::Orientation orientaton);
TQSize sizeHint() const;
TQSize minimumSizeHint() const;
@@ -55,7 +55,7 @@ class KDE_EXPORT SimpleButton : public TQButton
TQPixmap m_normalIcon;
TQPixmap m_activeIcon;
TQPixmap m_disabledIcon;
- Qt::Orientation m_orientation;
+ TQt::Orientation m_orientation;
bool m_forceStandardCursor;
class SimpleButtonPrivate;
SimpleButtonPrivate* d;
@@ -63,10 +63,10 @@ class KDE_EXPORT SimpleButton : public TQButton
class KDE_EXPORT SimpleArrowButton: public SimpleButton
{
- Q_OBJECT
+ TQ_OBJECT
public:
- SimpleArrowButton(TQWidget *parent = 0, Qt::ArrowType arrow = Qt::UpArrow, const char *name = 0, bool forceStandardCursor = FALSE);
+ SimpleArrowButton(TQWidget *parent = 0, TQt::ArrowType arrow = TQt::UpArrow, const char *name = 0, bool forceStandardCursor = FALSE);
virtual ~SimpleArrowButton() {};
TQSize sizeHint() const;
@@ -74,18 +74,16 @@ class KDE_EXPORT SimpleArrowButton: public SimpleButton
virtual void enterEvent( TQEvent *e );
virtual void leaveEvent( TQEvent *e );
virtual void drawButton(TQPainter *p);
- Qt::ArrowType arrowType() const;
+ TQt::ArrowType arrowType() const;
public slots:
- void setArrowType(Qt::ArrowType a);
+ void setArrowType(TQt::ArrowType a);
private:
- Qt::ArrowType _arrow;
+ TQt::ArrowType _arrow;
bool m_forceStandardCursor;
bool _inside;
};
#endif // HIDEBUTTON_H
-
-// vim:ts=4:sw=4:et