summaryrefslogtreecommitdiffstats
path: root/kicker/kicker/core/containerarea.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kicker/kicker/core/containerarea.cpp')
-rw-r--r--kicker/kicker/core/containerarea.cpp122
1 files changed, 61 insertions, 61 deletions
diff --git a/kicker/kicker/core/containerarea.cpp b/kicker/kicker/core/containerarea.cpp
index 5b1eb5c8c..234aba375 100644
--- a/kicker/kicker/core/containerarea.cpp
+++ b/kicker/kicker/core/containerarea.cpp
@@ -103,11 +103,11 @@ ContainerArea::ContainerArea(TDEConfig* _c,
setBackground();
- connect(&_autoScrollTimer, TQT_SIGNAL(timeout()), TQT_SLOT(autoScroll()));
- connect(kapp, TQT_SIGNAL(tdedisplayPaletteChanged()), TQT_SLOT(setBackground()));
- connect(Kicker::the(), TQT_SIGNAL(immutabilityChanged(bool)),
- TQT_SLOT(immutabilityChanged(bool)));
- connect(this, TQT_SIGNAL(contentsMoving(int, int)), TQT_SLOT(setBackground()));
+ connect(&_autoScrollTimer, TQ_SIGNAL(timeout()), TQ_SLOT(autoScroll()));
+ connect(kapp, TQ_SIGNAL(tdedisplayPaletteChanged()), TQ_SLOT(setBackground()));
+ connect(Kicker::the(), TQ_SIGNAL(immutabilityChanged(bool)),
+ TQ_SLOT(immutabilityChanged(bool)));
+ connect(this, TQ_SIGNAL(contentsMoving(int, int)), TQ_SLOT(setBackground()));
}
ContainerArea::~ContainerArea()
@@ -142,7 +142,7 @@ void ContainerArea::initialize(bool useDefaultConfig)
}
setAcceptDrops(!isImmutable());
- TQTimer::singleShot(0, this, TQT_SLOT(resizeContents()));
+ TQTimer::singleShot(0, this, TQ_SLOT(resizeContents()));
}
void ContainerArea::defaultContainerConfig()
@@ -153,7 +153,7 @@ void ContainerArea::defaultContainerConfig()
containers.append(new KMenuButtonContainer(m_opMenu, m_contents));
int dsize;
- if (orientation() == Qt::Horizontal)
+ if (orientation() == TQt::Horizontal)
{
dsize = width();
}
@@ -377,7 +377,7 @@ void ContainerArea::loadContainers(const TQStringList& containers)
// it gets executed too soon. we need to wait until the containers are
// actually resized, but we enter the event loop prior to that happening
// above.
- TQTimer::singleShot(0, this, TQT_SLOT(updateContainersBackground()));
+ TQTimer::singleShot(0, this, TQ_SLOT(updateContainersBackground()));
}
void ContainerArea::saveContainerConfig(bool layoutOnly)
@@ -728,20 +728,20 @@ void ContainerArea::addContainer(BaseContainer* a, bool arrange, int index)
m_layout->add(a);
}
- connect(a, TQT_SIGNAL(moveme(BaseContainer*)),
- TQT_SLOT(startContainerMove(BaseContainer*)));
- connect(a, TQT_SIGNAL(removeme(BaseContainer*)),
- TQT_SLOT(removeContainer(BaseContainer*)));
- connect(a, TQT_SIGNAL(takeme(BaseContainer*)),
- TQT_SLOT(takeContainer(BaseContainer*)));
- connect(a, TQT_SIGNAL(requestSave()),
- TQT_SLOT(slotSaveContainerConfig()));
- connect(a, TQT_SIGNAL(maintainFocus(bool)),
- this, TQT_SIGNAL(maintainFocus(bool)));
+ connect(a, TQ_SIGNAL(moveme(BaseContainer*)),
+ TQ_SLOT(startContainerMove(BaseContainer*)));
+ connect(a, TQ_SIGNAL(removeme(BaseContainer*)),
+ TQ_SLOT(removeContainer(BaseContainer*)));
+ connect(a, TQ_SIGNAL(takeme(BaseContainer*)),
+ TQ_SLOT(takeContainer(BaseContainer*)));
+ connect(a, TQ_SIGNAL(requestSave()),
+ TQ_SLOT(slotSaveContainerConfig()));
+ connect(a, TQ_SIGNAL(maintainFocus(bool)),
+ this, TQ_SIGNAL(maintainFocus(bool)));
if (dynamic_cast<AppletContainer*>(a))
{
- connect(a, TQT_SIGNAL(updateLayout()), TQT_SLOT(resizeContents()));
+ connect(a, TQ_SIGNAL(updateLayout()), TQ_SLOT(resizeContents()));
}
a->configure(orientation(), popupDirection());
@@ -824,16 +824,16 @@ void ContainerArea::takeContainer(BaseContainer* a)
return;
}
- disconnect(a, TQT_SIGNAL(moveme(BaseContainer*)),
- this, TQT_SLOT(startContainerMove(BaseContainer*)));
- disconnect(a, TQT_SIGNAL(removeme(BaseContainer*)),
- this, TQT_SLOT(removeContainer(BaseContainer*)));
- disconnect(a, TQT_SIGNAL(takeme(BaseContainer*)),
- this, TQT_SLOT(takeContainer(BaseContainer*)));
- disconnect(a, TQT_SIGNAL(requestSave()),
- this, TQT_SLOT(slotSaveContainerConfig()));
- disconnect(a, TQT_SIGNAL(maintainFocus(bool)),
- this, TQT_SIGNAL(maintainFocus(bool)));
+ disconnect(a, TQ_SIGNAL(moveme(BaseContainer*)),
+ this, TQ_SLOT(startContainerMove(BaseContainer*)));
+ disconnect(a, TQ_SIGNAL(removeme(BaseContainer*)),
+ this, TQ_SLOT(removeContainer(BaseContainer*)));
+ disconnect(a, TQ_SIGNAL(takeme(BaseContainer*)),
+ this, TQ_SLOT(takeContainer(BaseContainer*)));
+ disconnect(a, TQ_SIGNAL(requestSave()),
+ this, TQ_SLOT(slotSaveContainerConfig()));
+ disconnect(a, TQ_SIGNAL(maintainFocus(bool)),
+ this, TQ_SIGNAL(maintainFocus(bool)));
// Just remove the group from our own config file. Leave separate config
// files untouched.
@@ -850,7 +850,7 @@ void ContainerArea::resizeContents()
int w = width();
int h = height();
- if (orientation() == Qt::Horizontal)
+ if (orientation() == TQt::Horizontal)
{
int newWidth = m_layout->widthForHeight(h);
if (newWidth > w)
@@ -923,7 +923,7 @@ void ContainerArea::startContainerMove(BaseContainer *a)
KickerTip::enableTipping(false);
emit maintainFocus(true);
setMouseTracking(true);
- grabMouse(tqsizeAllCursor);
+ grabMouse(TQt::sizeAllCursor);
m_layout->setStretchEnabled(false);
a->raise();
@@ -940,7 +940,7 @@ void ContainerArea::mouseReleaseEvent(TQMouseEvent *)
// so we need to complete the move here
_autoScrollTimer.stop();
releaseMouse();
- setCursor(tqarrowCursor);
+ setCursor(TQt::arrowCursor);
setMouseTracking(false);
_moveAC->completeMoveOperation();
@@ -962,12 +962,12 @@ void ContainerArea::mouseMoveEvent(TQMouseEvent *ev)
return;
}
- if (ev->state() == Qt::LeftButton && !TQT_TQRECT_OBJECT(rect()).contains(ev->pos()))
+ if (ev->state() == TQt::LeftButton && !rect().contains(ev->pos()))
{
// leaveEvent() doesn't work, while grabbing the mouse
_autoScrollTimer.stop();
releaseMouse();
- setCursor(tqarrowCursor);
+ setCursor(TQt::arrowCursor);
setMouseTracking(false);
_moveAC->completeMoveOperation();
@@ -986,7 +986,7 @@ void ContainerArea::mouseMoveEvent(TQMouseEvent *ev)
return;
}
- if (orientation() == Qt::Horizontal)
+ if (orientation() == TQt::Horizontal)
{
int oldX = _moveAC->x() + _moveAC->moveOffset().x();
int x = ev->pos().x() + contentsX();
@@ -1082,7 +1082,7 @@ void ContainerArea::dragEnterEvent(TQDragEnterEvent *ev)
preferedHeight = draggedContainer->heightForWidth(width());
}
- if (orientation() == Qt::Horizontal)
+ if (orientation() == TQt::Horizontal)
{
_dragIndicator->setPreferredSize(TQSize(preferedWidth, height()));
}
@@ -1103,9 +1103,9 @@ void ContainerArea::dragEnterEvent(TQDragEnterEvent *ev)
--it;
BaseContainer* a = *it;
- if ((orientation() == Qt::Horizontal &&
+ if ((orientation() == TQt::Horizontal &&
a->x() < (ev->pos().x() + contentsX()) - _dragMoveOffset.x()) ||
- (orientation() == Qt::Vertical &&
+ (orientation() == TQt::Vertical &&
a->y() < (ev->pos().y() + contentsY()) - _dragMoveOffset.y()))
{
_dragMoveAC = a;
@@ -1114,7 +1114,7 @@ void ContainerArea::dragEnterEvent(TQDragEnterEvent *ev)
} while (it != m_containers.begin());
}
- if (orientation() == Qt::Horizontal)
+ if (orientation() == TQt::Horizontal)
{
moveDragIndicator(ev->pos().x() + contentsX() - _dragMoveOffset.x());
}
@@ -1143,7 +1143,7 @@ void ContainerArea::dragMoveEvent(TQDragMoveEvent* ev)
startContainerMove(_moveAC);
// Align the container to the mouse position.
- if (orientation() == Qt::Horizontal)
+ if (orientation() == TQt::Horizontal)
{
m_layout->moveContainerSwitch(_moveAC, ev->pos().x() + contentsX() - _moveAC->x());
}
@@ -1159,7 +1159,7 @@ void ContainerArea::dragMoveEvent(TQDragMoveEvent* ev)
return;
}
- if (orientation() == Qt::Horizontal)
+ if (orientation() == TQt::Horizontal)
{
moveDragIndicator(ev->pos().x() + contentsX() - _dragMoveOffset.x());
}
@@ -1201,7 +1201,7 @@ void ContainerArea::dropEvent(TQDropEvent *ev)
}
TQObject *parent = ev->source() ? ev->source()->parent() : 0;
- while (parent && (TQT_BASE_OBJECT(parent) != TQT_BASE_OBJECT(this)))
+ while (parent && (parent != this))
{
parent = parent->parent();
}
@@ -1209,13 +1209,13 @@ void ContainerArea::dropEvent(TQDropEvent *ev)
if (parent)
{
// Move container a
- if (orientation() == Qt::Horizontal)
+ if (orientation() == TQt::Horizontal)
{
int oldX = a->x();
int x = _dragIndicator->x();
m_layout->moveContainerSwitch(a, x - oldX);
}
- else if (orientation() == Qt::Vertical)
+ else if (orientation() == TQt::Vertical)
{
int oldY = a->y();
int y = _dragIndicator->y();
@@ -1387,7 +1387,7 @@ bool ContainerArea::eventFilter(TQObject* o, TQEvent* e)
// which contain a ContainerArea can react to layout changes of its
// contents. For example: If an applets grows, the top level widget may
// want to grow as well.
- if (TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(m_contents))
+ if (o == m_contents)
{
if (e->type() == TQEvent::LayoutHint)
{
@@ -1408,7 +1408,7 @@ void ContainerArea::resizeEvent(TQResizeEvent *ev)
void ContainerArea::viewportResizeEvent(TQResizeEvent* ev)
{
Panner::viewportResizeEvent(ev);
- if (orientation() == Qt::Horizontal)
+ if (orientation() == TQt::Horizontal)
{
m_contents->resize(kMax(widthForHeight(ev->size().height()),
ev->size().width()),
@@ -1436,8 +1436,8 @@ void ContainerArea::setBackground()
{
_rootPixmap = new KRootPixmap(this);
_rootPixmap->setCustomPainting(true);
- connect(_rootPixmap, TQT_SIGNAL(backgroundUpdated(const TQPixmap&)),
- TQT_SLOT(updateBackground(const TQPixmap&)));
+ connect(_rootPixmap, TQ_SIGNAL(backgroundUpdated(const TQPixmap&)),
+ TQ_SLOT(updateBackground(const TQPixmap&)));
}
else
{
@@ -1487,7 +1487,7 @@ void ContainerArea::setBackground()
{
TQImage bgImage = srcImage;
- if (orientation() == Qt::Vertical)
+ if (orientation() == TQt::Vertical)
{
if (KickerSettings::rotateBackground())
{
@@ -1516,7 +1516,7 @@ void ContainerArea::setBackground()
KickerLib::colorize(bgImage);
}
setPaletteBackgroundPixmap(TQPixmap(bgImage));
- TQTimer::singleShot(0, this, TQT_SLOT(updateContainersBackground()));
+ TQTimer::singleShot(0, this, TQ_SLOT(updateContainersBackground()));
}
}
@@ -1538,7 +1538,7 @@ void ContainerArea::immutabilityChanged(bool immutable)
}
setAcceptDrops(!isImmutable());
- TQTimer::singleShot(0, this, TQT_SLOT(setBackground()));
+ TQTimer::singleShot(0, this, TQ_SLOT(setBackground()));
}
TQRect ContainerArea::availableSpaceFollowing(BaseContainer* a)
@@ -1565,7 +1565,7 @@ TQRect ContainerArea::availableSpaceFollowing(BaseContainer* a)
}
}
- if (orientation() == Qt::Horizontal)
+ if (orientation() == TQt::Horizontal)
{
if (a)
{
@@ -1599,7 +1599,7 @@ void ContainerArea::moveDragIndicator(int pos)
// Move _dragIndicator to position pos, restricted by availableSpace.
// Resize _dragIndicator if necessary.
- if (orientation() == Qt::Horizontal)
+ if (orientation() == TQt::Horizontal)
{
if (availableSpace.size().width() <
_dragIndicator->preferredSize().width())
@@ -1663,7 +1663,7 @@ void ContainerArea::resizeContents(int w, int h)
if (!m_updateBackgroundsCalled)
{
m_updateBackgroundsCalled = true;
- TQTimer::singleShot(0, this, TQT_SLOT(updateContainersBackground()));
+ TQTimer::singleShot(0, this, TQ_SLOT(updateContainersBackground()));
}
}
@@ -1680,9 +1680,9 @@ void ContainerArea::setPosition(KPanelExtension::Position p)
}
_pos = p;
- Qt::Orientation o = (p == KPanelExtension::Top ||
+ TQt::Orientation o = (p == KPanelExtension::Top ||
p == KPanelExtension::Bottom) ?
- Qt::Horizontal : Qt::Vertical;
+ TQt::Horizontal : TQt::Vertical;
bool orientationChanged = (orientation() != o);
m_layout->setEnabled(false);
@@ -1696,7 +1696,7 @@ void ContainerArea::setPosition(KPanelExtension::Position p)
// when that gets called AFTER we've been moved
// it's not always safe to do the resize here, as scroll buttons
// from the panner may get in our way. =/
- if (o == Qt::Horizontal)
+ if (o == TQt::Horizontal)
{
resizeContents(0, height());
}
@@ -1742,7 +1742,7 @@ void ContainerArea::autoScroll()
{
if(!_moveAC) return;
- if(orientation() == Qt::Horizontal) {
+ if(orientation() == TQt::Horizontal) {
if(_moveAC->pos().x() <= 80)
scrollBy(-10, 0);
else if(_moveAC->pos().x() >= width() - _moveAC->width() - 80)
@@ -1793,7 +1793,7 @@ void ContainerArea::updateContainersBackground()
if( !m_cachedGeometry.contains( *it ))
{
m_cachedGeometry[ *it ] = TQRect();
- connect( *it, TQT_SIGNAL( destroyed()), TQT_SLOT( destroyCachedGeometry()));
+ connect( *it, TQ_SIGNAL( destroyed()), TQ_SLOT( destroyCachedGeometry()));
}
if( m_cachedGeometry[ *it ] != (*it)->geometry())
{
@@ -1910,7 +1910,7 @@ void ContainerArea::showAddAppletDialog()
if (!m_addAppletDialog)
{
m_addAppletDialog = new AddAppletDialog(this, this, 0);
- connect(m_addAppletDialog, TQT_SIGNAL(finished()), this, TQT_SLOT(addAppletDialogDone()));
+ connect(m_addAppletDialog, TQ_SIGNAL(finished()), this, TQ_SLOT(addAppletDialogDone()));
}
else
{
@@ -1958,7 +1958,7 @@ void DragIndicator::paintEvent(TQPaintEvent*)
{
TQPainter painter(this);
TQRect rect(0, 0, width(), height());
- style().tqdrawPrimitive( TQStyle::PE_FocusRect, &painter, rect, colorGroup(),
+ style().drawPrimitive( TQStyle::PE_FocusRect, &painter, rect, colorGroup(),
TQStyle::Style_Default, colorGroup().base() );
}