summaryrefslogtreecommitdiffstats
path: root/kicker/kicker/core/container_extension.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kicker/kicker/core/container_extension.cpp')
-rw-r--r--kicker/kicker/core/container_extension.cpp112
1 files changed, 56 insertions, 56 deletions
diff --git a/kicker/kicker/core/container_extension.cpp b/kicker/kicker/core/container_extension.cpp
index 721df418e..afb786f7f 100644
--- a/kicker/kicker/core/container_extension.cpp
+++ b/kicker/kicker/core/container_extension.cpp
@@ -137,20 +137,20 @@ void ExtensionContainer::init()
KWin::setState(winId(), NET::Sticky);
KWin::setOnAllDesktops(winId(), true);
- connect(Kicker::the()->twinModule(), TQT_SIGNAL(strutChanged()), this, TQT_SLOT(strutChanged()));
- connect(Kicker::the()->twinModule(), TQT_SIGNAL(currentDesktopChanged(int)),
- this, TQT_SLOT( currentDesktopChanged(int)));
+ connect(Kicker::the()->twinModule(), TQ_SIGNAL(strutChanged()), this, TQ_SLOT(strutChanged()));
+ connect(Kicker::the()->twinModule(), TQ_SIGNAL(currentDesktopChanged(int)),
+ this, TQ_SLOT( currentDesktopChanged(int)));
setBackgroundOrigin(AncestorOrigin);
setFrameStyle(NoFrame);
setLineWidth(0);
setMargin(0);
- connect(UnhideTrigger::the(), TQT_SIGNAL(triggerUnhide(UnhideTrigger::Trigger,int)),
- this, TQT_SLOT(unhideTriggered(UnhideTrigger::Trigger,int)));
+ connect(UnhideTrigger::the(), TQ_SIGNAL(triggerUnhide(UnhideTrigger::Trigger,int)),
+ this, TQ_SLOT(unhideTriggered(UnhideTrigger::Trigger,int)));
- _popupWidgetFilter = new PopupWidgetFilter( TQT_TQOBJECT(this) );
- connect(_popupWidgetFilter, TQT_SIGNAL(popupWidgetHiding()), TQT_SLOT(maybeStartAutoHideTimer()));
+ _popupWidgetFilter = new PopupWidgetFilter( this );
+ connect(_popupWidgetFilter, TQ_SIGNAL(popupWidgetHiding()), TQ_SLOT(maybeStartAutoHideTimer()));
// layout
_layout = new TQGridLayout(this, 3, 3, 0, 0);
@@ -160,15 +160,15 @@ void ExtensionContainer::init()
// instantiate the autohide timer
_autohideTimer = new TQTimer(this, "_autohideTimer");
- connect(_autohideTimer, TQT_SIGNAL(timeout()), TQT_SLOT(autoHideTimeout()));
+ connect(_autohideTimer, TQ_SIGNAL(timeout()), TQ_SLOT(autoHideTimeout()));
// instantiate the updateLayout event compressor timer
_updateLayoutTimer = new TQTimer(this, "_updateLayoutTimer");
- connect(_updateLayoutTimer, TQT_SIGNAL(timeout()), TQT_SLOT(actuallyUpdateLayout()));
+ connect(_updateLayoutTimer, TQ_SIGNAL(timeout()), TQ_SLOT(actuallyUpdateLayout()));
installEventFilter(this); // for mouse event handling
- connect(Kicker::the(), TQT_SIGNAL(tdedisplayPaletteChanged()), this, TQT_SLOT(updateHighlightColor()));
+ connect(Kicker::the(), TQ_SIGNAL(tdedisplayPaletteChanged()), this, TQ_SLOT(updateHighlightColor()));
updateHighlightColor();
// if we were hidden when kicker quit, let's start out hidden as well!
@@ -207,9 +207,9 @@ void ExtensionContainer::init()
item->setDefaultValue(m_extension->customSize());
}
- connect(m_extension, TQT_SIGNAL(updateLayout()), TQT_SLOT(updateLayout()));
- connect(m_extension, TQT_SIGNAL(maintainFocus(bool)),
- TQT_SLOT(maintainFocus(bool)));
+ connect(m_extension, TQ_SIGNAL(updateLayout()), TQ_SLOT(updateLayout()));
+ connect(m_extension, TQ_SIGNAL(maintainFocus(bool)),
+ TQ_SLOT(maintainFocus(bool)));
_layout->addWidget(m_extension, 1, 1);
}
@@ -733,7 +733,7 @@ void ExtensionContainer::autoHideTimeout()
{
// kdDebug(1210) << "PanelContainer::autoHideTimeout() " << name() << endl;
// Hack: If there is a popup open, don't autohide until it closes.
- TQWidget* popup = TQT_TQWIDGET(TQApplication::activePopupWidget());
+ TQWidget* popup = TQApplication::activePopupWidget();
if (popup)
{
@@ -885,7 +885,7 @@ void ExtensionContainer::autoHide(bool hide)
_in_autohide = false;
- TQTimer::singleShot(100, this, TQT_SLOT(enableMouseOverEffects()));
+ TQTimer::singleShot(100, this, TQ_SLOT(enableMouseOverEffects()));
}
void ExtensionContainer::animatedHide(bool left)
@@ -925,7 +925,7 @@ void ExtensionContainer::animatedHide(bool left)
!TQApplication::desktop()->screenGeometry(s).intersects(geometry()))
{
blockUserInput(false);
- TQTimer::singleShot(100, this, TQT_SLOT(enableMouseOverEffects()));
+ TQTimer::singleShot(100, this, TQ_SLOT(enableMouseOverEffects()));
return;
}
}
@@ -988,7 +988,7 @@ void ExtensionContainer::animatedHide(bool left)
config->setGroup(extensionId());
config->writeEntry("UserHidden", userHidden());
- TQTimer::singleShot(100, this, TQT_SLOT(enableMouseOverEffects()));
+ TQTimer::singleShot(100, this, TQ_SLOT(enableMouseOverEffects()));
}
bool ExtensionContainer::reserveStrut() const
@@ -1208,7 +1208,7 @@ int ExtensionContainer::arrangeHideButtons()
_layout->setEnabled(false);
}
- if (orientation() == Qt::Vertical)
+ if (orientation() == TQt::Vertical)
{
int maxWidth = width();
@@ -1227,7 +1227,7 @@ int ExtensionContainer::arrangeHideButtons()
_ltHB->setMaximumWidth(maxWidth);
_ltHB->setMaximumHeight(14);
_layout->remove(_ltHB);
- _layout->addWidget(_ltHB, 0, 1, Qt::AlignBottom | Qt::AlignLeft);
+ _layout->addWidget(_ltHB, 0, 1, TQt::AlignBottom | TQt::AlignLeft);
}
if (_rbHB)
@@ -1252,8 +1252,8 @@ int ExtensionContainer::arrangeHideButtons()
maxHeight = maxHeight - (PANEL_RESIZE_HANDLE_WIDTH + PANEL_BOTTOM_SPACING_W_RESIZE_HANDLE);
}
- int vertAlignment = (position() == KPanelExtension::Top) ? Qt::AlignTop : 0;
- int leftAlignment = Qt::AlignRight;
+ int vertAlignment = (position() == KPanelExtension::Top) ? TQt::AlignTop : 0;
+ int leftAlignment = TQt::AlignRight;
if (_ltHB)
{
@@ -1262,11 +1262,11 @@ int ExtensionContainer::arrangeHideButtons()
_layout->remove(_ltHB);
if (kapp->reverseLayout())
{
- _layout->addWidget(_ltHB, 1, 2, (TQ_Alignment)vertAlignment);
+ _layout->addWidget(_ltHB, 1, 2, (TQt::AlignmentFlags)vertAlignment);
}
else
{
- _layout->addWidget(_ltHB, 1, 0, (TQ_Alignment)(leftAlignment | vertAlignment));
+ _layout->addWidget(_ltHB, 1, 0, (TQt::AlignmentFlags)(leftAlignment | vertAlignment));
}
}
@@ -1277,11 +1277,11 @@ int ExtensionContainer::arrangeHideButtons()
_layout->remove(_rbHB);
if (kapp->reverseLayout())
{
- _layout->addWidget(_rbHB, 1, 0, (TQ_Alignment)(leftAlignment | vertAlignment));
+ _layout->addWidget(_rbHB, 1, 0, (TQt::AlignmentFlags)(leftAlignment | vertAlignment));
}
else
{
- _layout->addWidget(_rbHB, 1, 2, (TQ_Alignment)vertAlignment);
+ _layout->addWidget(_rbHB, 1, 2, (TQt::AlignmentFlags)vertAlignment);
}
}
}
@@ -1315,7 +1315,7 @@ int ExtensionContainer::setupBorderSpace()
TQRect r = TQApplication::desktop()->screenGeometry(xineramaScreen());
TQRect h = geometry();
- if (orientation() == Qt::Vertical)
+ if (orientation() == TQt::Vertical)
{
if (h.top() > 0)
{
@@ -1417,26 +1417,26 @@ void ExtensionContainer::paintEvent(TQPaintEvent *e)
// KPanelExtension::Left/Right don't seem to draw the separators at all!
if (position() == KPanelExtension::Left) {
rect = TQRect(width()-2,0,PANEL_RESIZE_HANDLE_WIDTH,height());
- style().tqdrawPrimitive( TQStyle::PE_Separator, &p, rect, colorGroup(), TQStyle::Style_Horizontal );
+ style().drawPrimitive( TQStyle::PE_Separator, &p, rect, colorGroup(), TQStyle::Style_Horizontal );
}
else if (position() == KPanelExtension::Right) {
rect = TQRect(0,0,PANEL_RESIZE_HANDLE_WIDTH,height());
- style().tqdrawPrimitive( TQStyle::PE_Separator, &p, rect, colorGroup(), TQStyle::Style_Horizontal );
+ style().drawPrimitive( TQStyle::PE_Separator, &p, rect, colorGroup(), TQStyle::Style_Horizontal );
}
else if (position() == KPanelExtension::Top) {
// Nastiness to both vertically flip the PE_Separator
// and make sure it pops out of, not sinks into, the screen
TQPixmap inv_pm(width(),PANEL_RESIZE_HANDLE_WIDTH);
- TQPainter myp(TQT_TQPAINTDEVICE(&inv_pm));
+ TQPainter myp(&inv_pm);
rect = TQRect(0,0,width(),PANEL_RESIZE_HANDLE_WIDTH);
TQColorGroup darkcg = colorGroup();
darkcg.setColor(TQColorGroup::Light, colorGroup().dark());
- style().tqdrawPrimitive( TQStyle::PE_Separator, &myp, rect, darkcg, TQStyle::Style_Default );
+ style().drawPrimitive( TQStyle::PE_Separator, &myp, rect, darkcg, TQStyle::Style_Default );
p.drawPixmap(0,height()-2,inv_pm);
}
else {
rect = TQRect(0,0,width(),PANEL_RESIZE_HANDLE_WIDTH);
- style().tqdrawPrimitive( TQStyle::PE_Separator, &p, rect, colorGroup(), TQStyle::Style_Default );
+ style().drawPrimitive( TQStyle::PE_Separator, &p, rect, colorGroup(), TQStyle::Style_Default );
}
}
}
@@ -1486,7 +1486,7 @@ void ExtensionContainer::unhideIfHidden(int showForAtLeastHowManyMS)
{
autoHide(false);
TQTimer::singleShot(showForAtLeastHowManyMS,
- this, TQT_SLOT(maybeStartAutoHideTimer()));
+ this, TQ_SLOT(maybeStartAutoHideTimer()));
return;
}
@@ -1582,11 +1582,11 @@ KPanelExtension::Orientation ExtensionContainer::orientation() const
{
if (position() == KPanelExtension::Top || position() == KPanelExtension::Bottom)
{
- return Qt::Horizontal;
+ return TQt::Horizontal;
}
else
{
- return Qt::Vertical;
+ return TQt::Vertical;
}
}
@@ -1627,18 +1627,18 @@ void ExtensionContainer::resetLayout()
_ltHB = new HideButton(this);
_ltHB->installEventFilter(this);
_ltHB->setEnabled(true);
- connect(_ltHB, TQT_SIGNAL(clicked()), this, TQT_SLOT(hideLeft()));
+ connect(_ltHB, TQ_SIGNAL(clicked()), this, TQ_SLOT(hideLeft()));
haveToArrangeButtons = true;
}
- if (orientation() == Qt::Horizontal)
+ if (orientation() == TQt::Horizontal)
{
- _ltHB->setArrowType(Qt::LeftArrow);
+ _ltHB->setArrowType(TQt::LeftArrow);
_ltHB->setFixedSize(m_settings.hideButtonSize(), height());
}
else
{
- _ltHB->setArrowType(Qt::UpArrow);
+ _ltHB->setArrowType(TQt::UpArrow);
_ltHB->setFixedSize(width(), m_settings.hideButtonSize());
}
@@ -1658,18 +1658,18 @@ void ExtensionContainer::resetLayout()
_rbHB = new HideButton(this);
_rbHB->installEventFilter(this);
_rbHB->setEnabled(true);
- connect(_rbHB, TQT_SIGNAL(clicked()), this, TQT_SLOT(hideRight()));
+ connect(_rbHB, TQ_SIGNAL(clicked()), this, TQ_SLOT(hideRight()));
haveToArrangeButtons = true;
}
- if ( orientation() == Qt::Horizontal)
+ if ( orientation() == TQt::Horizontal)
{
- _rbHB->setArrowType(Qt::RightArrow);
+ _rbHB->setArrowType(TQt::RightArrow);
_rbHB->setFixedSize(m_settings.hideButtonSize(), height());
}
else
{
- _rbHB->setArrowType(Qt::DownArrow);
+ _rbHB->setArrowType(TQt::DownArrow);
_rbHB->setFixedSize(width(), m_settings.hideButtonSize());
}
@@ -1709,7 +1709,7 @@ void ExtensionContainer::resetLayout()
updateGeometry();
int endBorderWidth = haveToArrangeButtons ? arrangeHideButtons() : setupBorderSpace();
- if (orientation() == Qt::Horizontal)
+ if (orientation() == TQt::Horizontal)
{
if (m_extension)
{
@@ -2145,8 +2145,8 @@ bool ExtensionContainer::eventFilter( TQObject*, TQEvent * e)
{
case TQEvent::MouseButtonPress:
{
- TQMouseEvent* me = TQT_TQMOUSEEVENT(e);
- if ( me->button() == Qt::LeftButton )
+ TQMouseEvent* me = static_cast<TQMouseEvent*>(e);
+ if ( me->button() == TQt::LeftButton )
{
if (inResizeArea(me->pos()))
{
@@ -2170,7 +2170,7 @@ bool ExtensionContainer::eventFilter( TQObject*, TQEvent * e)
_is_lmb_down = true;
}
}
- else if (me->button() == Qt::RightButton)
+ else if (me->button() == TQt::RightButton)
{
showPanelMenu(me->globalPos());
return true; // don't crash!
@@ -2180,8 +2180,8 @@ bool ExtensionContainer::eventFilter( TQObject*, TQEvent * e)
case TQEvent::MouseButtonRelease:
{
- TQMouseEvent* me = TQT_TQMOUSEEVENT(e);
- if ( me->button() == Qt::LeftButton )
+ TQMouseEvent* me = static_cast<TQMouseEvent*>(e);
+ if ( me->button() == TQt::LeftButton )
{
_is_lmb_down = false;
}
@@ -2190,7 +2190,7 @@ bool ExtensionContainer::eventFilter( TQObject*, TQEvent * e)
case TQEvent::MouseMove:
{
- TQMouseEvent* me = TQT_TQMOUSEEVENT(e);
+ TQMouseEvent* me = static_cast<TQMouseEvent*>(e);
if (KickerSettings::useResizeHandle())
{
KPanelExtension::Position pos = position();
@@ -2202,7 +2202,7 @@ bool ExtensionContainer::eventFilter( TQObject*, TQEvent * e)
}
else
{
- setCursor(tqarrowCursor);
+ setCursor(TQt::arrowCursor);
}
}
else if (pos == KPanelExtension::Right)
@@ -2213,35 +2213,35 @@ bool ExtensionContainer::eventFilter( TQObject*, TQEvent * e)
}
else
{
- setCursor(tqarrowCursor);
+ setCursor(TQt::arrowCursor);
}
}
else if (pos == KPanelExtension::Top)
{
if (inResizeArea(me->pos()))
{
- setCursor(tqsizeVerCursor);
+ setCursor(TQt::sizeVerCursor);
}
else
{
- setCursor(tqarrowCursor);
+ setCursor(TQt::arrowCursor);
}
}
else
{
if (inResizeArea(me->pos()))
{
- setCursor(tqsizeVerCursor);
+ setCursor(TQt::sizeVerCursor);
}
else
{
- setCursor(tqarrowCursor);
+ setCursor(TQt::arrowCursor);
}
}
}
if (_is_lmb_down &&
- ((me->state() & Qt::LeftButton) == Qt::LeftButton) &&
+ ((me->state() & TQt::LeftButton) == TQt::LeftButton) &&
!Kicker::the()->isImmutable() &&
!m_settings.config()->isImmutable() &&
!ExtensionManager::the()->isMenuBar(this))