diff options
Diffstat (limited to 'kicker/kicker/core')
28 files changed, 301 insertions, 258 deletions
diff --git a/kicker/kicker/core/applethandle.cpp b/kicker/kicker/core/applethandle.cpp index f5f398136..621038002 100644 --- a/kicker/kicker/core/applethandle.cpp +++ b/kicker/kicker/core/applethandle.cpp @@ -75,14 +75,14 @@ AppletHandle::AppletHandle(AppletContainer* parent) int AppletHandle::heightForWidth( int /* w */ ) const { - int size = style().pixelMetric(TQStyle::PM_DockWindowHandleExtent, this); + int size = tqstyle().tqpixelMetric(TQStyle::PM_DockWindowHandleExtent, this); return size; } int AppletHandle::widthForHeight( int /* h */ ) const { - int size = style().pixelMetric(TQStyle::PM_DockWindowHandleExtent, this); + int size = tqstyle().tqpixelMetric(TQStyle::PM_DockWindowHandleExtent, this); return size; } @@ -200,7 +200,7 @@ bool AppletHandle::eventFilter(TQObject *o, TQEvent *e) // a hack for applets that have out-of-process // elements (e.g the systray) so that the handle // doesn't flicker when moving over those elements - if (w->rect().contains(w->mapFromGlobal(TQCursor::pos()))) + if (TQT_TQRECT_OBJECT(w->rect()).tqcontains(w->mapFromGlobal(TQCursor::pos()))) { nowDrawIt = true; } @@ -220,12 +220,12 @@ bool AppletHandle::eventFilter(TQObject *o, TQEvent *e) return TQWidget::eventFilter( o, e ); } - else if (o == m_dragBar) + else if (TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(m_dragBar)) { if (e->type() == TQEvent::MouseButtonPress) { - TQMouseEvent* ev = static_cast<TQMouseEvent*>(e); - if (ev->button() == LeftButton || ev->button() == MidButton) + TQMouseEvent* ev = TQT_TQMOUSEEVENT(e); + if (ev->button() == Qt::LeftButton || ev->button() == Qt::MidButton) { emit moveApplet(m_applet->mapFromGlobal(ev->globalPos())); } @@ -234,8 +234,8 @@ bool AppletHandle::eventFilter(TQObject *o, TQEvent *e) if (m_menuButton && e->type() == TQEvent::MouseButtonPress) { - TQMouseEvent* ev = static_cast<TQMouseEvent*>(e); - if (ev->button() == RightButton) + TQMouseEvent* ev = TQT_TQMOUSEEVENT(e); + if (ev->button() == Qt::RightButton) { if (!m_menuButton->isDown()) { @@ -269,7 +269,7 @@ void AppletHandle::checkHandleHover() { if (!m_handleHoverTimer || (m_menuButton && m_menuButton->isOn()) || - m_applet->geometry().contains(m_applet->mapToParent( + m_applet->tqgeometry().tqcontains(m_applet->mapToParent( m_applet->mapFromGlobal(TQCursor::pos())))) { return; @@ -282,7 +282,7 @@ void AppletHandle::checkHandleHover() bool AppletHandle::onMenuButton(const TQPoint& point) const { - return m_menuButton && (childAt(mapFromGlobal(point)) == m_menuButton); + return m_menuButton && (tqchildAt(mapFromGlobal(point)) == m_menuButton); } void AppletHandle::toggleMenuButtonOff() @@ -308,11 +308,11 @@ AppletHandleDrag::AppletHandleDrag(AppletHandle* parent) setBackgroundOrigin( AncestorOrigin ); } -TQSize AppletHandleDrag::minimumSizeHint() const +TQSize AppletHandleDrag::tqminimumSizeHint() const { - int wh = style().pixelMetric(TQStyle::PM_DockWindowHandleExtent, this); + int wh = tqstyle().tqpixelMetric(TQStyle::PM_DockWindowHandleExtent, this); - if (m_parent->orientation() == Horizontal) + if (m_parent->orientation() == Qt::Horizontal) { return TQSize(wh, 0); } @@ -322,7 +322,7 @@ TQSize AppletHandleDrag::minimumSizeHint() const TQSizePolicy AppletHandleDrag::sizePolicy() const { - if (m_parent->orientation() == Horizontal) + if (m_parent->orientation() == Qt::Horizontal) { return TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Preferred ); } @@ -360,15 +360,15 @@ void AppletHandleDrag::paintEvent(TQPaintEvent *) TQStyle::SFlags flags = TQStyle::Style_Default; flags |= TQStyle::Style_Enabled; - if (m_parent->orientation() == Horizontal) + if (m_parent->orientation() == Qt::Horizontal) { flags |= TQStyle::Style_Horizontal; } TQRect r = rect(); - style().drawPrimitive(TQStyle::PE_DockWindowHandle, &p, r, - colorGroup(), flags); + tqstyle().tqdrawPrimitive(TQStyle::PE_DockWindowHandle, &p, r, + tqcolorGroup(), flags); } else { @@ -382,12 +382,12 @@ AppletHandleButton::AppletHandleButton(AppletHandle *parent) { } -TQSize AppletHandleButton::minimumSizeHint() const +TQSize AppletHandleButton::tqminimumSizeHint() const { - int height = style().pixelMetric(TQStyle::PM_DockWindowHandleExtent, this); + int height = tqstyle().tqpixelMetric(TQStyle::PM_DockWindowHandleExtent, this); int width = height; - if (m_parent->orientation() == Horizontal) + if (m_parent->orientation() == Qt::Horizontal) { return TQSize(width, height); } diff --git a/kicker/kicker/core/applethandle.h b/kicker/kicker/core/applethandle.h index 5eff46717..a49319dc6 100644 --- a/kicker/kicker/core/applethandle.h +++ b/kicker/kicker/core/applethandle.h @@ -35,7 +35,7 @@ class TQTimer; class AppletHandleDrag; class AppletHandleButton; -class AppletHandle : public QWidget +class AppletHandle : public TQWidget { Q_OBJECT @@ -85,16 +85,16 @@ class AppletHandle : public QWidget bool m_inside; }; -class AppletHandleDrag : public QWidget +class AppletHandleDrag : public TQWidget { Q_OBJECT public: AppletHandleDrag(AppletHandle* parent); - TQSize minimumSizeHint() const; - TQSize minimumSize() const { return minimumSizeHint(); } - TQSize sizeHint() const { return minimumSize(); } + TQSize tqminimumSizeHint() const; + TQSize tqminimumSize() const { return tqminimumSizeHint(); } + TQSize tqsizeHint() const { return tqminimumSize(); } TQSizePolicy sizePolicy() const; protected: @@ -113,9 +113,9 @@ class AppletHandleButton : public SimpleArrowButton public: AppletHandleButton(AppletHandle *parent); - TQSize minimumSizeHint() const; - TQSize minimumSize() const { return minimumSizeHint(); } - TQSize sizeHint() const { return minimumSize(); } + TQSize tqminimumSizeHint() const; + TQSize tqminimumSize() const { return tqminimumSizeHint(); } + TQSize tqsizeHint() const { return tqminimumSize(); } TQSizePolicy sizePolicy() const; private: diff --git a/kicker/kicker/core/container_applet.cpp b/kicker/kicker/core/container_applet.cpp index 77c6d1912..ad17182b0 100644 --- a/kicker/kicker/core/container_applet.cpp +++ b/kicker/kicker/core/container_applet.cpp @@ -79,7 +79,7 @@ AppletContainer::AppletContainer(const AppletInfo& info, _appletframe->setFrameStyle(TQFrame::NoFrame); _appletframe->installEventFilter(this); - if (orientation() == Horizontal) + if (orientation() == Qt::Horizontal) { _layout = new TQBoxLayout(this, TQBoxLayout::LeftToRight, 0, 0); } @@ -92,7 +92,7 @@ AppletContainer::AppletContainer(const AppletInfo& info, _layout->addSpacing(APPLET_MARGIN); _handle = new AppletHandle(this); - _layout->addWidget(_handle, 0); + _layout->addWidget(TQT_TQWIDGET(_handle), 0); connect(_handle, TQT_SIGNAL(moveApplet(const TQPoint&)), this, TQT_SLOT(moveApplet(const TQPoint&))); connect(_handle, TQT_SIGNAL(showAppletMenu()), this, TQT_SLOT(showAppletMenu())); @@ -117,7 +117,7 @@ AppletContainer::AppletContainer(const AppletInfo& info, _valid = true; _applet->setPosition((KPanelApplet::Position)KickerLib::directionToPosition(popupDirection())); - _applet->setAlignment((KPanelApplet::Alignment)alignment()); + _applet->tqsetAlignment((KPanelApplet::Alignment)tqalignment()); _actions = _applet->actions(); _type = _applet->type(); @@ -191,7 +191,7 @@ void AppletContainer::resetLayout() { _handle->resetLayout(); - if (orientation() == Horizontal) + if (orientation() == Qt::Horizontal) { _layout->setDirection( TQBoxLayout::LeftToRight ); } @@ -225,7 +225,7 @@ void AppletContainer::showAppletMenu() Kicker::the()->setInsertionPoint(_handle->mapToGlobal(_handle->rect().center())); - switch(menu->exec(KickerLib::popupPosition(popupDirection(), menu, _handle))) + switch(menu->exec(KickerLib::popupPosition(popupDirection(), menu, TQT_TQWIDGET(_handle)))) { case PanelAppletOpMenu::Move: moveApplet(_handle->mapToParent(_handle->rect().center())); @@ -275,14 +275,14 @@ void AppletContainer::slotRemoved(KConfig* config) void AppletContainer::activateWindow() { - KWin::forceActiveWindow(topLevelWidget()->winId()); + KWin::forceActiveWindow(tqtopLevelWidget()->winId()); } void AppletContainer::focusRequested(bool focus) { if (focus) { - KWin::forceActiveWindow(topLevelWidget()->winId()); + KWin::forceActiveWindow(tqtopLevelWidget()->winId()); } emit maintainFocus(focus); @@ -298,7 +298,7 @@ void AppletContainer::doSaveConfiguration( KConfigGroup& config, bool layoutOnly ) const { // immutability is checked by ContainerBase - if (orientation() == Horizontal) + if (orientation() == Qt::Horizontal) { config.writeEntry( "WidthForHeightHint", widthForHeight(height()) ); } @@ -354,14 +354,14 @@ void AppletContainer::slotDelayedDestruct() delete this; } -void AppletContainer::alignmentChange(KPanelExtension::Alignment a) +void AppletContainer::tqalignmentChange(KPanelExtension::Alignment a) { if (!_applet) { return; } - _applet->setAlignment( (KPanelApplet::Alignment)a ); + _applet->tqsetAlignment( (KPanelApplet::Alignment)a ); } int AppletContainer::widthForHeight(int h) const @@ -471,7 +471,7 @@ void AppletContainer::setImmutable(bool immutable) } else if (!_handle->isVisibleTo(this)) { - TQToolTip::add(_handle, _info.name()); + TQToolTip::add(TQT_TQWIDGET(_handle), _info.name()); _handle->show(); setBackground(); } diff --git a/kicker/kicker/core/container_applet.h b/kicker/kicker/core/container_applet.h index 019e52c96..fea4d92a1 100644 --- a/kicker/kicker/core/container_applet.h +++ b/kicker/kicker/core/container_applet.h @@ -84,7 +84,7 @@ public slots: protected: virtual void doLoadConfiguration( KConfigGroup& ); virtual void doSaveConfiguration( KConfigGroup&, bool layoutOnly ) const; - virtual void alignmentChange(KPanelExtension::Alignment a); + virtual void tqalignmentChange(KPanelExtension::Alignment a); virtual TQPopupMenu* createOpMenu(); diff --git a/kicker/kicker/core/container_base.cpp b/kicker/kicker/core/container_base.cpp index bb3d7d984..2747905cd 100644 --- a/kicker/kicker/core/container_base.cpp +++ b/kicker/kicker/core/container_base.cpp @@ -37,8 +37,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. BaseContainer::BaseContainer( TQPopupMenu* appletOpMenu, TQWidget* parent, const char * name ) : TQWidget( parent, name ) , _dir(KPanelApplet::Up) - , _orient(Horizontal) - , _alignment(KPanelExtension::LeftTop) + , _orient(Qt::Horizontal) + , _tqalignment(KPanelExtension::LeftTop) , _fspace(0) , _moveOffset(TQPoint(0,0)) , _aid(TQString::null) @@ -72,7 +72,7 @@ void BaseContainer::setImmutable(bool immutable) void BaseContainer::loadConfiguration( KConfigGroup& group ) { - setFreeSpace( QMIN( group.readDoubleNumEntry( "FreeSpace2", 0 ), 1 ) ); + setFreeSpace( TQMIN( group.readDoubleNumEntry( "FreeSpace2", 0 ), 1 ) ); doLoadConfiguration( group ); } @@ -110,15 +110,15 @@ void BaseContainer::slotRemoved(KConfig* config) config->sync(); } -void BaseContainer::setAlignment(KPanelExtension::Alignment a) +void BaseContainer::tqsetAlignment(KPanelExtension::Alignment a) { - if (_alignment == a) + if (_tqalignment == a) { return; } - _alignment = a; - alignmentChange(a); + _tqalignment = a; + tqalignmentChange(a); } TQPopupMenu* BaseContainer::opMenu() diff --git a/kicker/kicker/core/container_base.h b/kicker/kicker/core/container_base.h index 1c218b103..078926a07 100644 --- a/kicker/kicker/core/container_base.h +++ b/kicker/kicker/core/container_base.h @@ -34,7 +34,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. class KConfigGroup; class TQPopupMenu; -class BaseContainer : public QWidget +class BaseContainer : public TQWidget { Q_OBJECT @@ -73,7 +73,7 @@ public: KPanelApplet::Direction popupDirection() const { return _dir; } KPanelExtension::Orientation orientation() const { return _orient; } - KPanelExtension::Alignment alignment() const { return _alignment; } + KPanelExtension::Alignment tqalignment() const { return _tqalignment; } virtual void setBackground() {} @@ -97,7 +97,7 @@ public slots: virtual void setPopupDirection(KPanelApplet::Direction d) { _dir = d; } virtual void setOrientation(KPanelExtension::Orientation o) { _orient = o; } - void setAlignment(KPanelExtension::Alignment a); + void tqsetAlignment(KPanelExtension::Alignment a); signals: void removeme(BaseContainer*); @@ -111,14 +111,14 @@ protected: virtual void doLoadConfiguration( KConfigGroup& ) {} virtual void doSaveConfiguration( KConfigGroup&, bool /* layoutOnly */ ) const {} - virtual void alignmentChange(KPanelExtension::Alignment) {} + virtual void tqalignmentChange(KPanelExtension::Alignment) {} virtual TQPopupMenu* createOpMenu() = 0; TQPopupMenu *appletOpMenu() const { return _appletOpMnu; } KPanelApplet::Direction _dir; KPanelExtension::Orientation _orient; - KPanelExtension::Alignment _alignment; + KPanelExtension::Alignment _tqalignment; double _fspace; TQPoint _moveOffset; TQString _aid; diff --git a/kicker/kicker/core/container_button.cpp b/kicker/kicker/core/container_button.cpp index bb0249843..0cd7d6f19 100644 --- a/kicker/kicker/core/container_button.cpp +++ b/kicker/kicker/core/container_button.cpp @@ -215,7 +215,7 @@ void ButtonContainer::dragButton(const TQPixmap icon) bool ButtonContainer::eventFilter(TQObject *o, TQEvent *e) { - if (o == _button && e->type() == TQEvent::MouseButtonPress) + if (TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(_button) && e->type() == TQEvent::MouseButtonPress) { static bool sentinal = false; @@ -225,10 +225,10 @@ bool ButtonContainer::eventFilter(TQObject *o, TQEvent *e) } sentinal = true; - TQMouseEvent* me = static_cast<TQMouseEvent*>(e); + TQMouseEvent* me = TQT_TQMOUSEEVENT(e); switch (me->button()) { - case MidButton: + case Qt::MidButton: { if (isImmutable()) { @@ -242,7 +242,7 @@ bool ButtonContainer::eventFilter(TQObject *o, TQEvent *e) return true; } - case RightButton: + case Qt::RightButton: { if (!kapp->authorizeKAction("kicker_rmb") || isImmutable()) @@ -252,8 +252,8 @@ bool ButtonContainer::eventFilter(TQObject *o, TQEvent *e) TQPopupMenu* menu = opMenu(); connect( menu, TQT_SIGNAL( aboutToHide() ), this, TQT_SLOT( slotMenuClosed() ) ); - TQPoint pos = KickerLib::popupPosition(popupDirection(), menu, this, - (orientation() == Horizontal) ? + TQPoint pos = KickerLib::popupPosition(popupDirection(), menu, TQT_TQWIDGET(this), + (orientation() == Qt::Horizontal) ? TQPoint(0, 0) : me->pos()); Kicker::the()->setInsertionPoint(me->globalPos()); diff --git a/kicker/kicker/core/container_extension.cpp b/kicker/kicker/core/container_extension.cpp index 52e85bd7e..0c22245bc 100644 --- a/kicker/kicker/core/container_extension.cpp +++ b/kicker/kicker/core/container_extension.cpp @@ -70,7 +70,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ExtensionContainer::ExtensionContainer(const AppletInfo& info, const TQString& extensionId, TQWidget *parent) - : TQFrame(parent, ("ExtensionContainer#" + extensionId).latin1(), WStyle_Customize | WStyle_NoBorder), + : TQFrame(parent, ("ExtensionContainer#" + extensionId).latin1(), (WFlags)(WStyle_Customize | WStyle_NoBorder)), m_settings(KSharedConfig::openConfig(info.configFile())), m_hideMode(ManualHide), m_unhideTriggeredAt(UnhideTrigger::None), @@ -97,7 +97,7 @@ ExtensionContainer::ExtensionContainer(KPanelExtension* extension, const AppletInfo& info, const TQString& extensionId, TQWidget *parent) - : TQFrame(parent, ("ExtensionContainer#" + extensionId).latin1(), WStyle_Customize | WStyle_NoBorder), + : TQFrame(parent, ("ExtensionContainer#" + extensionId).latin1(), (WFlags)(WStyle_Customize | WStyle_NoBorder)), m_settings(KSharedConfig::openConfig(info.configFile())), _autoHidden(false), _userHidden(Unhidden), @@ -136,7 +136,7 @@ void ExtensionContainer::init() connect(UnhideTrigger::the(), TQT_SIGNAL(triggerUnhide(UnhideTrigger::Trigger,int)), this, TQT_SLOT(unhideTriggered(UnhideTrigger::Trigger,int))); - _popupWidgetFilter = new PopupWidgetFilter( this ); + _popupWidgetFilter = new PopupWidgetFilter( TQT_TQOBJECT(this) ); connect(_popupWidgetFilter, TQT_SIGNAL(popupWidgetHiding()), TQT_SLOT(maybeStartAutoHideTimer())); // layout @@ -212,7 +212,7 @@ ExtensionContainer::~ExtensionContainer() { } -TQSize ExtensionContainer::sizeHint(KPanelExtension::Position p, const TQSize &maxSize) const +TQSize ExtensionContainer::tqsizeHint(KPanelExtension::Position p, const TQSize &maxSize) const { int width = 0; int height = 0; @@ -262,7 +262,7 @@ TQSize ExtensionContainer::sizeHint(KPanelExtension::Position p, const TQSize &m if (m_extension) { - size = m_extension->sizeHint(p, maxSize - size) + size; + size = m_extension->tqsizeHint(p, maxSize - size) + size; } return size.boundedTo(maxSize); @@ -293,7 +293,7 @@ void ExtensionContainer::readConfig() } positionChange(position()); - alignmentChange(alignment()); + tqalignmentChange(tqalignment()); setSize(static_cast<KPanelExtension::Size>(m_settings.size()), m_settings.customSize()); @@ -471,7 +471,7 @@ void ExtensionContainer::moveMe() KPanelExtension::Right, KPanelExtension::Top, KPanelExtension::Bottom }; - KPanelExtension::Alignment alignments[] = { KPanelExtension::LeftTop, + KPanelExtension::Alignment tqalignments[] = { KPanelExtension::LeftTop, KPanelExtension::Center, KPanelExtension::RightBottom }; @@ -488,20 +488,20 @@ void ExtensionContainer::moveMe() // on other parameters this can lead to Bad Things(tm) // // we need to find a way to do this that doesn't result in - // sizeHint's getting called on the extension =/ + // tqsizeHint's getting called on the extension =/ // // or else we need to change the semantics for applets so that // they don't get their "you're changing position" signals through // heightForWidth/widthForHeight rects.append(UserRectSel::PanelStrut(initialGeometry(positions[i], - alignments[j], s), - s, positions[i], alignments[j])); + tqalignments[j], s), + s, positions[i], tqalignments[j])); } } } UserRectSel::PanelStrut newStrut = UserRectSel::select(rects, rect().center(), m_highlightColor); - arrange(newStrut.m_pos, newStrut.m_alignment, newStrut.m_screen); + arrange(newStrut.m_pos, newStrut.m_tqalignment, newStrut.m_screen); _is_lmb_down = false; @@ -556,12 +556,12 @@ void ExtensionContainer::enableMouseOverEffects() KickerTip::enableTipping(true); TQPoint globalPos = TQCursor::pos(); TQPoint localPos = mapFromGlobal(globalPos); - TQWidget* child = childAt(localPos); + TQWidget* child = tqchildAt(localPos); if (child) { TQMouseEvent* e = new TQMouseEvent(TQEvent::Enter, localPos, globalPos, 0, 0); - qApp->sendEvent(child, e); + tqApp->sendEvent(child, e); } } @@ -658,7 +658,7 @@ void ExtensionContainer::unhideTriggered(UnhideTrigger::Trigger tr, int Xinerama // Otherwise hide mode is automatic. The code below is slightly // complex so as to keep the same behavior as it has always had: // only unhide when the cursor position is within the widget geometry. - // We can't just do geometry().contains(TQCursor::pos()) because + // We can't just do geometry().tqcontains(TQCursor::pos()) because // now we hide the panel completely off screen. int x = TQCursor::pos().x(); @@ -702,7 +702,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 = TQApplication::activePopupWidget(); + TQWidget* popup = TQT_TQWIDGET(TQApplication::activePopupWidget()); if (popup) { @@ -732,7 +732,7 @@ void ExtensionContainer::autoHideTimeout() TQRect r = geometry(); TQPoint p = TQCursor::pos(); - if (!r.contains(p) && + if (!r.tqcontains(p) && (m_settings.unhideLocation() == UnhideTrigger::None || !shouldUnhideForTrigger(m_unhideTriggeredAt))) { @@ -766,7 +766,7 @@ void ExtensionContainer::autoHide(bool hide) blockUserInput(true); TQPoint oldpos = pos(); - TQRect newextent = initialGeometry( position(), alignment(), xineramaScreen(), hide, Unhidden ); + TQRect newextent = initialGeometry( position(), tqalignment(), xineramaScreen(), hide, Unhidden ); TQPoint newpos = newextent.topLeft(); if (hide) @@ -821,8 +821,8 @@ void ExtensionContainer::autoHide(bool hide) move(oldpos.x() - i, newpos.y()); } - qApp->syncX(); - qApp->processEvents(); + tqApp->syncX(); + tqApp->processEvents(); } } else @@ -839,8 +839,8 @@ void ExtensionContainer::autoHide(bool hide) move(newpos.x(), oldpos.y() - i); } - qApp->syncX(); - qApp->processEvents(); + tqApp->syncX(); + tqApp->processEvents(); } } } @@ -878,7 +878,7 @@ void ExtensionContainer::animatedHide(bool left) } TQPoint oldpos = pos(); - TQRect newextent = initialGeometry(position(), alignment(), xineramaScreen(), false, newState); + TQRect newextent = initialGeometry(position(), tqalignment(), xineramaScreen(), false, newState); TQPoint newpos(newextent.topLeft()); if (newState != Unhidden) @@ -920,8 +920,8 @@ void ExtensionContainer::animatedHide(bool left) { move(newpos.x(), oldpos.y() - i); } - qApp->syncX(); - qApp->processEvents(); + tqApp->syncX(); + tqApp->processEvents(); } } else @@ -937,8 +937,8 @@ void ExtensionContainer::animatedHide(bool left) { move(oldpos.x() - i, newpos.y()); } - qApp->syncX(); - qApp->processEvents(); + tqApp->syncX(); + tqApp->processEvents(); } } } @@ -948,8 +948,8 @@ void ExtensionContainer::animatedHide(bool left) _userHidden = newState; actuallyUpdateLayout(); - qApp->syncX(); - qApp->processEvents(); + tqApp->syncX(); + tqApp->processEvents(); // save our hidden status so that when kicker starts up again // we'll come back in the same state @@ -965,7 +965,7 @@ bool ExtensionContainer::reserveStrut() const return !m_extension || m_extension->reserveStrut(); } -KPanelExtension::Alignment ExtensionContainer::alignment() const +KPanelExtension::Alignment ExtensionContainer::tqalignment() const { // KConfigXT really needs to get support for vars that are enums that // are defined in other classes @@ -983,7 +983,7 @@ void ExtensionContainer::updateWindowManager() int w = 0; int h = 0; - TQRect geom = initialGeometry(position(), alignment(), xineramaScreen()); + TQRect geom = initialGeometry(position(), tqalignment(), xineramaScreen()); TQRect virtRect(TQApplication::desktop()->geometry()); TQRect screenRect(TQApplication::desktop()->screenGeometry(xineramaScreen())); @@ -1106,11 +1106,11 @@ void ExtensionContainer::blockUserInput( bool block ) // eventfilter discard those events. if ( block ) { - qApp->installEventFilter( this ); + tqApp->installEventFilter( this ); } else { - qApp->removeEventFilter( this ); + tqApp->removeEventFilter( this ); } _block_user_input = block; @@ -1177,7 +1177,7 @@ int ExtensionContainer::arrangeHideButtons() _layout->setEnabled(false); } - if (orientation() == Vertical) + if (orientation() == Qt::Vertical) { int maxWidth = width(); @@ -1221,11 +1221,11 @@ int ExtensionContainer::arrangeHideButtons() _layout->remove(_ltHB); if (kapp->reverseLayout()) { - _layout->addWidget(_ltHB, 1, 2, vertAlignment); + _layout->addWidget(_ltHB, 1, 2, (TQ_Alignment)vertAlignment); } else { - _layout->addWidget(_ltHB, 1, 0, leftAlignment | vertAlignment); + _layout->addWidget(_ltHB, 1, 0, (TQ_Alignment)(leftAlignment | vertAlignment)); } } @@ -1236,11 +1236,11 @@ int ExtensionContainer::arrangeHideButtons() _layout->remove(_rbHB); if (kapp->reverseLayout()) { - _layout->addWidget(_rbHB, 1, 0, leftAlignment | vertAlignment); + _layout->addWidget(_rbHB, 1, 0, (TQ_Alignment)(leftAlignment | vertAlignment)); } else { - _layout->addWidget(_rbHB, 1, 2, vertAlignment); + _layout->addWidget(_rbHB, 1, 2, (TQ_Alignment)vertAlignment); } } } @@ -1270,7 +1270,7 @@ int ExtensionContainer::setupBorderSpace() TQRect r = TQApplication::desktop()->screenGeometry(xineramaScreen()); TQRect h = geometry(); - if (orientation() == Vertical) + if (orientation() == Qt::Vertical) { if (h.top() > 0) { @@ -1342,7 +1342,7 @@ void ExtensionContainer::updateHighlightColor() { KConfig *config = KGlobal::config(); config->setGroup("WM"); - TQColor color = TQApplication::palette().active().highlight(); + TQColor color = TQApplication::tqpalette().active().highlight(); m_highlightColor = config->readColorEntry("activeBackground", &color); update(); } @@ -1368,14 +1368,14 @@ void ExtensionContainer::leaveEvent(TQEvent*) maybeStartAutoHideTimer(); } -void ExtensionContainer::alignmentChange(KPanelExtension::Alignment a) +void ExtensionContainer::tqalignmentChange(KPanelExtension::Alignment a) { if (!m_extension) { return; } - m_extension->setAlignment(a); + m_extension->tqsetAlignment(a); } void ExtensionContainer::setSize(KPanelExtension::Size size, int custom) @@ -1482,7 +1482,7 @@ void ExtensionContainer::arrange(KPanelExtension::Position p, if (a != m_settings.alignment()) { m_settings.setAlignment(a); - setAlignment(a); + tqsetAlignment(a); } if (XineramaScreen != xineramaScreen()) @@ -1504,11 +1504,11 @@ KPanelExtension::Orientation ExtensionContainer::orientation() const { if (position() == KPanelExtension::Top || position() == KPanelExtension::Bottom) { - return Horizontal; + return Qt::Horizontal; } else { - return Vertical; + return Qt::Vertical; } } @@ -1521,7 +1521,7 @@ KPanelExtension::Position ExtensionContainer::position() const void ExtensionContainer::resetLayout() { - TQRect g = initialGeometry(position(), alignment(), xineramaScreen(), + TQRect g = initialGeometry(position(), tqalignment(), xineramaScreen(), autoHidden(), userHidden()); // Disable the layout while we rearrange the panel. @@ -1553,7 +1553,7 @@ void ExtensionContainer::resetLayout() haveToArrangeButtons = true; } - if (orientation() == Horizontal) + if (orientation() == Qt::Horizontal) { _ltHB->setArrowType(Qt::LeftArrow); _ltHB->setFixedSize(m_settings.hideButtonSize(), height()); @@ -1584,7 +1584,7 @@ void ExtensionContainer::resetLayout() haveToArrangeButtons = true; } - if ( orientation() == Horizontal) + if ( orientation() == Qt::Horizontal) { _rbHB->setArrowType(Qt::RightArrow); _rbHB->setFixedSize(m_settings.hideButtonSize(), height()); @@ -1631,7 +1631,7 @@ void ExtensionContainer::resetLayout() updateGeometry(); int endBorderWidth = haveToArrangeButtons ? arrangeHideButtons() : setupBorderSpace(); - if (orientation() == Horizontal) + if (orientation() == Qt::Horizontal) { if (m_extension) { @@ -1700,7 +1700,7 @@ TQSize ExtensionContainer::initialSize(KPanelExtension::Position p, TQRect workA ", " << workArea.topLeft().y() << ") to (" << workArea.bottomRight().x() << ", " << workArea.bottomRight().y() << ")" << endl;*/ - TQSize hint = sizeHint(p, workArea.size()).boundedTo(workArea.size()); + TQSize hint = tqsizeHint(p, workArea.size()).boundedTo(workArea.size()); int width = 0; int height = 0; @@ -1920,12 +1920,12 @@ void ExtensionContainer::setXineramaScreen(int screen) return; } - arrange(position(),alignment(), screen); + arrange(position(),tqalignment(), screen); } TQRect ExtensionContainer::currentGeometry() const { - return initialGeometry(position(), alignment(), xineramaScreen(), + return initialGeometry(position(), tqalignment(), xineramaScreen(), autoHidden(), userHidden()); } @@ -1986,13 +1986,13 @@ bool ExtensionContainer::eventFilter( TQObject*, TQEvent * e) { case TQEvent::MouseButtonPress: { - TQMouseEvent* me = static_cast<TQMouseEvent*>(e); - if ( me->button() == LeftButton ) + TQMouseEvent* me = TQT_TQMOUSEEVENT(e); + if ( me->button() == Qt::LeftButton ) { _last_lmb_press = me->globalPos(); _is_lmb_down = true; } - else if (me->button() == RightButton) + else if (me->button() == Qt::RightButton) { showPanelMenu(me->globalPos()); return true; // don't crash! @@ -2002,8 +2002,8 @@ bool ExtensionContainer::eventFilter( TQObject*, TQEvent * e) case TQEvent::MouseButtonRelease: { - TQMouseEvent* me = static_cast<TQMouseEvent*>(e); - if ( me->button() == LeftButton ) + TQMouseEvent* me = TQT_TQMOUSEEVENT(e); + if ( me->button() == Qt::LeftButton ) { _is_lmb_down = false; } @@ -2014,7 +2014,7 @@ bool ExtensionContainer::eventFilter( TQObject*, TQEvent * e) { TQMouseEvent* me = (TQMouseEvent*) e; if (_is_lmb_down && - ((me->state() & LeftButton) == LeftButton) && + ((me->state() & Qt::LeftButton) == Qt::LeftButton) && !Kicker::the()->isImmutable() && !m_settings.config()->isImmutable() && !ExtensionManager::the()->isMenuBar(this)) diff --git a/kicker/kicker/core/container_extension.h b/kicker/kicker/core/container_extension.h index 8eedd4e6f..fdb3be989 100644 --- a/kicker/kicker/core/container_extension.h +++ b/kicker/kicker/core/container_extension.h @@ -49,7 +49,7 @@ class PopupWidgetFilter; class PanelExtensionOpMenu; class TQColor; -class ExtensionContainer : public QFrame +class ExtensionContainer : public TQFrame { Q_OBJECT @@ -66,7 +66,7 @@ public: TQWidget *parent = 0); virtual ~ExtensionContainer(); - virtual TQSize sizeHint(KPanelExtension::Position, const TQSize &maxSize) const; + virtual TQSize tqsizeHint(KPanelExtension::Position, const TQSize &maxSize) const; const AppletInfo& info() const { return _info; } @@ -86,7 +86,7 @@ public: KPanelExtension::Orientation orientation() const; KPanelExtension::Position position() const; - void setPosition(KPanelExtension::Position p) { arrange( p, alignment(), xineramaScreen() ); } + void setPosition(KPanelExtension::Position p) { arrange( p, tqalignment(), xineramaScreen() ); } int xineramaScreen() const; void setXineramaScreen(int screen); @@ -100,8 +100,8 @@ public: void unhideIfHidden(int showForHowManyMS = 0); bool reserveStrut() const; - KPanelExtension::Alignment alignment() const; - void setAlignment(KPanelExtension::Alignment a) { arrange( position(), a, xineramaScreen() ); } + KPanelExtension::Alignment tqalignment() const; + void tqsetAlignment(KPanelExtension::Alignment a) { arrange( position(), a, xineramaScreen() ); } TQRect currentGeometry() const; TQRect initialGeometry(KPanelExtension::Position p, KPanelExtension::Alignment a, @@ -159,7 +159,7 @@ private: int XineramaScreen, const TQSize &s, TQRect workArea, bool autohidden = false, UserHidden userHidden = Unhidden) const; void positionChange(KPanelExtension::Position p); - void alignmentChange(KPanelExtension::Alignment a); + void tqalignmentChange(KPanelExtension::Alignment a); void xineramaScreenChange(int /*XineramaScreen*/) {} int arrangeHideButtons(); int setupBorderSpace(); @@ -198,7 +198,7 @@ private: TQColor m_highlightColor; }; -class PopupWidgetFilter : public QObject +class PopupWidgetFilter : public TQObject { Q_OBJECT diff --git a/kicker/kicker/core/containerarea.cpp b/kicker/kicker/core/containerarea.cpp index 8fd839a20..38e0f844b 100644 --- a/kicker/kicker/core/containerarea.cpp +++ b/kicker/kicker/core/containerarea.cpp @@ -314,7 +314,7 @@ void ContainerArea::loadContainers(const TQStringList& containers) BaseContainer* a = 0; - int sep = appletId.findRev('_'); + int sep = appletId.tqfindRev('_'); Q_ASSERT(sep != -1); TQString appletType = appletId.left(sep); @@ -923,7 +923,7 @@ void ContainerArea::startContainerMove(BaseContainer *a) KickerTip::enableTipping(false); emit maintainFocus(true); setMouseTracking(true); - grabMouse(sizeAllCursor); + grabMouse(tqsizeAllCursor); 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(arrowCursor); + setCursor(tqarrowCursor); setMouseTracking(false); _moveAC->completeMoveOperation(); @@ -962,12 +962,12 @@ void ContainerArea::mouseMoveEvent(TQMouseEvent *ev) return; } - if (ev->state() == LeftButton && !rect().contains(ev->pos())) + if (ev->state() == Qt::LeftButton && !TQT_TQRECT_OBJECT(rect()).tqcontains(ev->pos())) { // leaveEvent() doesn't work, while grabbing the mouse _autoScrollTimer.stop(); releaseMouse(); - setCursor(arrowCursor); + setCursor(tqarrowCursor); setMouseTracking(false); _moveAC->completeMoveOperation(); @@ -986,7 +986,7 @@ void ContainerArea::mouseMoveEvent(TQMouseEvent *ev) return; } - if (orientation() == Horizontal) + if (orientation() == Qt::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() == Horizontal) + if (orientation() == Qt::Horizontal) { _dragIndicator->setPreferredSize(TQSize(preferedWidth, height())); } @@ -1103,9 +1103,9 @@ void ContainerArea::dragEnterEvent(TQDragEnterEvent *ev) --it; BaseContainer* a = *it; - if ((orientation() == Horizontal && + if ((orientation() == Qt::Horizontal && a->x() < (ev->pos().x() + contentsX()) - _dragMoveOffset.x()) || - (orientation() == Vertical && + (orientation() == Qt::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() == Horizontal) + if (orientation() == Qt::Horizontal) { moveDragIndicator(ev->pos().x() + contentsX() - _dragMoveOffset.x()); } @@ -1139,11 +1139,11 @@ void ContainerArea::dragMoveEvent(TQDragMoveEvent* ev) TQKeyEvent fakedKeyRelease(TQEvent::KeyRelease, Key_Escape, 0, 0); TQApplication::sendEvent(this, &fakedKeyPress); TQApplication::sendEvent(this, &fakedKeyRelease); - qApp->processEvents(); + tqApp->processEvents(); startContainerMove(_moveAC); // Align the container to the mouse position. - if (orientation() == Horizontal) + if (orientation() == Qt::Horizontal) { m_layout->moveContainerSwitch(_moveAC, ev->pos().x() + contentsX() - _moveAC->x()); } @@ -1159,7 +1159,7 @@ void ContainerArea::dragMoveEvent(TQDragMoveEvent* ev) return; } - if (orientation() == Horizontal) + if (orientation() == Qt::Horizontal) { moveDragIndicator(ev->pos().x() + contentsX() - _dragMoveOffset.x()); } @@ -1200,22 +1200,22 @@ void ContainerArea::dropEvent(TQDropEvent *ev) return; } - TQObject *parent = ev->source() ? ev->source()->parent() : 0; - while (parent && (parent != this)) + TQObject *parent = ev->source() ? ev->source()->tqparent() : 0; + while (parent && (TQT_BASE_OBJECT(parent) != TQT_BASE_OBJECT(this))) { - parent = parent->parent(); + parent = parent->tqparent(); } if (parent) { // Move container a - if (orientation() == Horizontal) + if (orientation() == Qt::Horizontal) { int oldX = a->x(); int x = _dragIndicator->x(); m_layout->moveContainerSwitch(a, x - oldX); } - else if (orientation() == Vertical) + else if (orientation() == Qt::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 (o == m_contents) + if (TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(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() == Horizontal) + if (orientation() == Qt::Horizontal) { m_contents->resize(kMax(widthForHeight(ev->size().height()), ev->size().width()), @@ -1430,7 +1430,7 @@ void ContainerArea::setBackground() if (KickerSettings::transparent() && (KickerSettings::menubarPanelTransparent() || - !ExtensionManager::the()->isMenuBar(topLevelWidget()))) + !ExtensionManager::the()->isMenuBar(tqtopLevelWidget()))) { if (!_rootPixmap) { @@ -1441,7 +1441,7 @@ void ContainerArea::setBackground() } else { - _rootPixmap->repaint(true); + _rootPixmap->tqrepaint(true); } double tint = double(KickerSettings::tintValue()) / 100; @@ -1481,7 +1481,7 @@ void ContainerArea::setBackground() { TQImage bgImage = srcImage; - if (orientation() == Vertical) + if (orientation() == Qt::Vertical) { if (KickerSettings::rotateBackground()) { @@ -1542,7 +1542,7 @@ TQRect ContainerArea::availableSpaceFollowing(BaseContainer* a) if (a) { - BaseContainer::Iterator it = m_containers.find(a); + BaseContainer::Iterator it = m_containers.tqfind(a); if (it != m_containers.end() && ++it != m_containers.end()) { @@ -1559,7 +1559,7 @@ TQRect ContainerArea::availableSpaceFollowing(BaseContainer* a) } } - if (orientation() == Horizontal) + if (orientation() == Qt::Horizontal) { if (a) { @@ -1593,7 +1593,7 @@ void ContainerArea::moveDragIndicator(int pos) // Move _dragIndicator to position pos, restricted by availableSpace. // Resize _dragIndicator if necessary. - if (orientation() == Horizontal) + if (orientation() == Qt::Horizontal) { if (availableSpace.size().width() < _dragIndicator->preferredSize().width()) @@ -1633,7 +1633,7 @@ void ContainerArea::moveDragIndicator(int pos) void ContainerArea::updateBackground( const TQPixmap& pm ) { - TQBrush bgBrush(colorGroup().background(), pm); + TQBrush bgBrush(tqcolorGroup().background(), pm); TQPalette pal = kapp->palette(); pal.setBrush(TQColorGroup::Background, bgBrush); setPalette(pal); @@ -1690,7 +1690,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 == Horizontal) + if (o == Qt::Horizontal) { resizeContents(0, height()); } @@ -1718,17 +1718,17 @@ void ContainerArea::setPosition(KPanelExtension::Position p) m_contents->move(0, 0); setBackground(); - // container extension repaints for us! - //repaint(); + // container extension tqrepaints for us! + //tqrepaint(); } -void ContainerArea::setAlignment(KPanelExtension::Alignment a) +void ContainerArea::tqsetAlignment(KPanelExtension::Alignment a) { for (BaseContainer::ConstIterator it = m_containers.begin(); it != m_containers.end(); ++it) { - (*it)->setAlignment(a); + (*it)->tqsetAlignment(a); } } @@ -1736,7 +1736,7 @@ void ContainerArea::autoScroll() { if(!_moveAC) return; - if(orientation() == Horizontal) { + if(orientation() == Qt::Horizontal) { if(_moveAC->pos().x() <= 80) scrollBy(-10, 0); else if(_moveAC->pos().x() >= width() - _moveAC->width() - 80) @@ -1784,7 +1784,7 @@ void ContainerArea::updateContainersBackground() // properly, so just cache the geometry and update background only when // the geometry changes or when the background really changes (in which // case the cached is cleared). - if( !m_cachedGeometry.contains( *it )) + if( !m_cachedGeometry.tqcontains( *it )) { m_cachedGeometry[ *it ] = TQRect(); connect( *it, TQT_SIGNAL( destroyed()), TQT_SLOT( destroyCachedGeometry())); @@ -1894,9 +1894,9 @@ TQStringList ContainerArea::listContainers() const return m_layout->listItems(); } -void ContainerArea::repaint() +void ContainerArea::tqrepaint() { - Panner::repaint(); + Panner::tqrepaint(); } void ContainerArea::showAddAppletDialog() @@ -1952,8 +1952,8 @@ void DragIndicator::paintEvent(TQPaintEvent*) { TQPainter painter(this); TQRect rect(0, 0, width(), height()); - style().drawPrimitive( TQStyle::PE_FocusRect, &painter, rect, colorGroup(), - TQStyle::Style_Default, colorGroup().base() ); + tqstyle().tqdrawPrimitive( TQStyle::PE_FocusRect, &painter, rect, tqcolorGroup(), + TQStyle::Style_Default, tqcolorGroup().base() ); } void DragIndicator::mousePressEvent(TQMouseEvent*) diff --git a/kicker/kicker/core/containerarea.h b/kicker/kicker/core/containerarea.h index a43cd8c9c..f8532b511 100644 --- a/kicker/kicker/core/containerarea.h +++ b/kicker/kicker/core/containerarea.h @@ -101,9 +101,9 @@ public slots: void removeContainers(BaseContainer::List containers); void takeContainer(BaseContainer* a); void setPosition(KPanelExtension::Position p); - void setAlignment(KPanelExtension::Alignment a); + void tqsetAlignment(KPanelExtension::Alignment a); void slotSaveContainerConfig(); - void repaint(); + void tqrepaint(); void showAddAppletDialog(); void addAppletDialogDone(); @@ -172,7 +172,7 @@ private: }; -class DragIndicator : public QWidget +class DragIndicator : public TQWidget { Q_OBJECT diff --git a/kicker/kicker/core/containerarealayout.cpp b/kicker/kicker/core/containerarealayout.cpp index 4ae63077e..301011688 100644 --- a/kicker/kicker/core/containerarealayout.cpp +++ b/kicker/kicker/core/containerarealayout.cpp @@ -33,7 +33,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "container_applet.h" #include "container_button.h" -class ContainerAreaLayoutIterator : public QGLayoutIterator +class ContainerAreaLayoutIterator : public TQGLayoutIterator { public: ContainerAreaLayoutIterator(ContainerAreaLayout::ItemList *l) @@ -72,7 +72,6 @@ class ContainerAreaLayoutIterator : public QGLayoutIterator ContainerAreaLayout::ItemList* m_list; }; - int ContainerAreaLayoutItem::heightForWidth(int w) const { BaseContainer* container = dynamic_cast<BaseContainer*>(item->widget()); @@ -82,7 +81,7 @@ int ContainerAreaLayoutItem::heightForWidth(int w) const } else { - return item->sizeHint().height(); + return item->tqsizeHint().height(); } } @@ -95,7 +94,7 @@ int ContainerAreaLayoutItem::widthForHeight(int h) const } else { - return item->sizeHint().width(); + return item->tqsizeHint().width(); } } @@ -140,7 +139,7 @@ void ContainerAreaLayoutItem::setGeometryR(const TQRect& r) int ContainerAreaLayoutItem::widthForHeightR(int h) const { - if (orientation() == Horizontal) + if (orientation() == Qt::Horizontal) { return widthForHeight(h); } @@ -152,7 +151,7 @@ int ContainerAreaLayoutItem::widthForHeightR(int h) const int ContainerAreaLayoutItem::widthR() const { - if (orientation() == Horizontal) + if (orientation() == Qt::Horizontal) { return geometry().width(); } @@ -164,7 +163,7 @@ int ContainerAreaLayoutItem::widthR() const int ContainerAreaLayoutItem::heightR() const { - if (orientation() == Horizontal) + if (orientation() == Qt::Horizontal) { return geometry().height(); } @@ -176,7 +175,7 @@ int ContainerAreaLayoutItem::heightR() const int ContainerAreaLayoutItem::leftR() const { - if (orientation() == Horizontal) + if (orientation() == Qt::Horizontal) { if (TQApplication::reverseLayout()) return m_layout->geometry().right() - geometry().right(); @@ -191,7 +190,7 @@ int ContainerAreaLayoutItem::leftR() const int ContainerAreaLayoutItem::rightR() const { - if (orientation() == Horizontal) + if (orientation() == Qt::Horizontal) { if (TQApplication::reverseLayout()) return m_layout->geometry().right() - geometry().left(); @@ -207,14 +206,46 @@ int ContainerAreaLayoutItem::rightR() const ContainerAreaLayout::ContainerAreaLayout(TQWidget* parent) : TQLayout(parent), - m_orientation(Horizontal), + m_orientation(Qt::Horizontal), m_stretchEnabled(true) { } -void ContainerAreaLayout::addItem(TQLayoutItem* item) +#ifdef USE_QT4 +/*! + \reimp +*/ +int ContainerAreaLayout::count() const { + return m_items.count(); +} + +/*! + \reimp +*/ +TQLayoutItem* ContainerAreaLayout::itemAt(int index) const { + return index >= 0 && index < m_items.count() ? (*m_items.at(index))->item : 0; +} + +/*! + \reimp +*/ +TQLayoutItem* ContainerAreaLayout::takeAt(int index) { + if (index < 0 || index >= m_items.count()) + return 0; + ContainerAreaLayoutItem *b = *m_items.at(index); + m_items.remove(m_items.at(index)); + TQLayoutItem *item = b->item; + b->item = 0; + delete b; + + invalidate(); + return item; +} +#endif // USE_QT4 + +void ContainerAreaLayout::addItem(QLayoutItem* item) { - m_items.append(new ContainerAreaLayoutItem(item, this)); + m_items.append(new ContainerAreaLayoutItem(static_cast<TQLayoutItem*>(item), this)); } void ContainerAreaLayout::insertIntoFreeSpace(TQWidget* widget, TQPoint insertionPoint) @@ -252,7 +283,7 @@ void ContainerAreaLayout::insertIntoFreeSpace(TQWidget* widget, TQPoint insertio return; } - int insPos = (orientation() == Horizontal) ? insertionPoint.x(): insertionPoint.y(); + int insPos = (orientation() == Qt::Horizontal) ? insertionPoint.x(): insertionPoint.y(); Item* current = *currentIt; Item* next = *nextIt; @@ -319,7 +350,7 @@ void ContainerAreaLayout::insertIntoFreeSpace(TQWidget* widget, TQPoint insertio if (current) { m_items.erase(m_items.fromLast()); - ItemList::iterator insertIt = m_items.find(current); + ItemList::iterator insertIt = m_items.tqfind(current); if (insertIt == m_items.begin()) { @@ -384,11 +415,11 @@ TQWidget* ContainerAreaLayout::widgetAt(int index) const return m_items[index]->item->widget(); } -TQSize ContainerAreaLayout::sizeHint() const +TQSize ContainerAreaLayout::tqsizeHint() const { const int size = KickerLib::sizeValue(KPanelExtension::SizeSmall); - if (orientation() == Horizontal) + if (orientation() == Qt::Horizontal) { return TQSize(widthForHeight(size), size); } @@ -398,11 +429,11 @@ TQSize ContainerAreaLayout::sizeHint() const } } -TQSize ContainerAreaLayout::minimumSize() const +TQSize ContainerAreaLayout::tqminimumSize() const { const int size = KickerLib::sizeValue(KPanelExtension::SizeTiny); - if (orientation() == Horizontal) + if (orientation() == Qt::Horizontal) { return TQSize(widthForHeight(size), size); } @@ -414,12 +445,18 @@ TQSize ContainerAreaLayout::minimumSize() const TQLayoutIterator ContainerAreaLayout::iterator() { + // [FIXME] +#ifdef USE_QT4 + #warning [FIXME] ContainerAreaLayout iterators may not function correctly under Qt4 + return TQLayoutIterator(this); // [FIXME] +#else // USE_QT4 return TQLayoutIterator(new ContainerAreaLayoutIterator(&m_items)); +#endif // USE_QT4 } void ContainerAreaLayout::setGeometry(const TQRect& rect) { - //RESEARCH: when can we short curcuit this? + //RESEARCH: when can we short circuit this? // maybe a dirty flag to be set when we have containers // that needs laying out? @@ -522,7 +559,7 @@ int ContainerAreaLayout::distanceToPreviousItem(ItemList::const_iterator it) con void ContainerAreaLayout::moveContainerSwitch(TQWidget* container, int distance) { - const bool horizontal = orientation() == Horizontal; + const bool horizontal = orientation() == Qt::Horizontal; const bool reverseLayout = TQApplication::reverseLayout(); if (horizontal && reverseLayout) @@ -588,7 +625,7 @@ void ContainerAreaLayout::moveContainerSwitch(TQWidget* container, int distance) : kMin(newPos, last->leftR() - moving->widthR()); // Move 'moving' to its new position in the container list. - ItemList::iterator itMoving = m_items.find(moving); + ItemList::iterator itMoving = m_items.tqfind(moving); if (itMoving != m_items.end()) { @@ -659,7 +696,7 @@ void ContainerAreaLayout::moveContainerSwitch(TQWidget* container, int distance) int ContainerAreaLayout::moveContainerPush(TQWidget* a, int distance) { - const bool horizontal = orientation() == Horizontal; + const bool horizontal = orientation() == Qt::Horizontal; const bool reverseLayout = TQApplication::reverseLayout(); // Get the iterator 'it' pointing to the layoutitem representing 'a'. @@ -730,7 +767,7 @@ int ContainerAreaLayout::moveContainerPushRecursive(ItemList::const_iterator it, TQRect ContainerAreaLayout::transform(const TQRect& r) const { - if (orientation() == Horizontal) + if (orientation() == Qt::Horizontal) { if (TQApplication::reverseLayout()) { @@ -751,7 +788,7 @@ TQRect ContainerAreaLayout::transform(const TQRect& r) const int ContainerAreaLayout::widthForHeightR(int h) const { - if (orientation() == Horizontal) + if (orientation() == Qt::Horizontal) { return widthForHeight(h); } @@ -763,7 +800,7 @@ int ContainerAreaLayout::widthForHeightR(int h) const int ContainerAreaLayout::widthR() const { - if (orientation() == Horizontal) + if (orientation() == Qt::Horizontal) { return geometry().width(); } @@ -775,7 +812,7 @@ int ContainerAreaLayout::widthR() const int ContainerAreaLayout::heightR() const { - if (orientation() == Horizontal) + if (orientation() == Qt::Horizontal) { return geometry().height(); } @@ -787,7 +824,7 @@ int ContainerAreaLayout::heightR() const int ContainerAreaLayout::leftR() const { - if (orientation() == Horizontal) + if (orientation() == Qt::Horizontal) return geometry().left(); else return geometry().top(); @@ -795,7 +832,7 @@ int ContainerAreaLayout::leftR() const int ContainerAreaLayout::rightR() const { - if (orientation() == Horizontal) + if (orientation() == Qt::Horizontal) return geometry().right(); else return geometry().bottom(); diff --git a/kicker/kicker/core/containerarealayout.h b/kicker/kicker/core/containerarealayout.h index 995497268..d91113660 100644 --- a/kicker/kicker/core/containerarealayout.h +++ b/kicker/kicker/core/containerarealayout.h @@ -28,7 +28,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. class ContainerAreaLayout; -class ContainerAreaLayoutItem : public Qt +class ContainerAreaLayoutItem : public TQt { public: ContainerAreaLayoutItem(TQLayoutItem* i, ContainerAreaLayout* layout) @@ -71,7 +71,7 @@ class ContainerAreaLayoutItem : public Qt ContainerAreaLayout* m_layout; }; -class ContainerAreaLayout : public QLayout +class ContainerAreaLayout : public TQLayout { public: typedef ContainerAreaLayoutItem Item; @@ -79,12 +79,12 @@ class ContainerAreaLayout : public QLayout ContainerAreaLayout(TQWidget* parent); - void addItem(TQLayoutItem* item); + void addItem(QLayoutItem* item); void insertIntoFreeSpace(TQWidget* item, TQPoint insertionPoint); TQStringList listItems() const; TQWidget* widgetAt(int index) const; - TQSize sizeHint() const; - TQSize minimumSize() const; + TQSize tqsizeHint() const; + TQSize tqminimumSize() const; TQLayoutIterator iterator(); void setGeometry(const TQRect& rect); @@ -108,6 +108,12 @@ class ContainerAreaLayout : public QLayout int leftR() const; int rightR() const; +#ifdef USE_QT4 + + QLAYOUT_REQUIRED_METHOD_DECLARATIONS + +#endif // USE_QT4 + private: int moveContainerPushRecursive(ItemList::const_iterator it, int distance); int distanceToPreviousItem(ItemList::const_iterator it) const; diff --git a/kicker/kicker/core/extensionmanager.cpp b/kicker/kicker/core/extensionmanager.cpp index e0f68ce8a..7921c636d 100644 --- a/kicker/kicker/core/extensionmanager.cpp +++ b/kicker/kicker/core/extensionmanager.cpp @@ -140,7 +140,7 @@ void ExtensionManager::initialize() TQString extensionId(*it); // create a matching applet container - if (extensionId.find("Extension") == -1) + if (extensionId.tqfind("Extension") == -1) { continue; } @@ -259,7 +259,7 @@ void ExtensionManager::migrateMenubar() { TQString extensionId(*it); - if (extensionId.find("Extension") == -1) + if (extensionId.tqfind("Extension") == -1) { continue; } @@ -291,12 +291,12 @@ void ExtensionManager::migrateMenubar() } KConfigGroup group(&extensionConfig, appletId.latin1()); - TQString appletType = appletId.left(appletId.findRev('_')); + TQString appletType = appletId.left(appletId.tqfindRev('_')); if (appletType == "Applet") { TQString appletFile = group.readPathEntry("DesktopFile"); - if (appletFile.find("menuapplet.desktop") != -1) + if (appletFile.tqfind("menuapplet.desktop") != -1) { TQString menubarConfig = locate("config", extension); KIO::NetAccess::copy(menubarConfig, @@ -371,7 +371,7 @@ void ExtensionManager::updateMenubar() KMenuBar tmpmenu; tmpmenu.insertItem("KDE Rocks!"); m_menubarPanel->setSize(KPanelExtension::SizeCustom, - tmpmenu.sizeHint().height()); + tmpmenu.tqsizeHint().height()); m_menubarPanel->writeConfig(); emit desktopIconsAreaChanged(desktopIconsArea(m_menubarPanel->xineramaScreen()), @@ -702,7 +702,7 @@ void ExtensionManager::reduceArea(TQRect &area, const ExtensionContainer *extens return; } - TQRect geom = extension->initialGeometry(extension->position(), extension->alignment(), + TQRect geom = extension->initialGeometry(extension->position(), extension->tqalignment(), extension->xineramaScreen()); // reduce given area (TQRect) to the space not covered by the given extension diff --git a/kicker/kicker/core/extensionmanager.h b/kicker/kicker/core/extensionmanager.h index 6de7b35e1..47db7006e 100644 --- a/kicker/kicker/core/extensionmanager.h +++ b/kicker/kicker/core/extensionmanager.h @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. const int XineramaAllScreens = -2; -class ExtensionManager : public QObject +class ExtensionManager : public TQObject { Q_OBJECT diff --git a/kicker/kicker/core/kicker.cpp b/kicker/kicker/core/kicker.cpp index d91e1eaf9..ce7de00c0 100644 --- a/kicker/kicker/core/kicker.cpp +++ b/kicker/kicker/core/kicker.cpp @@ -115,7 +115,7 @@ Kicker::Kicker() // initialize our keys // note that this creates the KMenu by calling MenuManager::the() - keys = new KGlobalAccel( this ); + keys = new KGlobalAccel( TQT_TQOBJECT(this) ); #define KICKER_ALL_BINDINGS #include "kickerbindings.cpp" keys->readSettings(); @@ -199,7 +199,7 @@ void Kicker::paletteChanged() { KConfigGroup c(KGlobal::config(), "General"); KickerSettings::setTintColor(c.readColorEntry("TintColor", - &palette().active().mid())); + &tqpalette().active().mid())); KickerSettings::self()->writeConfig(); } diff --git a/kicker/kicker/core/kickerbindings.cpp b/kicker/kicker/core/kickerbindings.cpp index bc62df231..46cfa432d 100644 --- a/kicker/kicker/core/kickerbindings.cpp +++ b/kicker/kicker/core/kickerbindings.cpp @@ -23,10 +23,10 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #ifndef NOSLOTS # define DEF( name, key3, key4, target, fnSlot ) \ - keys->insert( name, i18n(name), TQString::null, key3, key4, target, TQT_SLOT(fnSlot) ) + keys->insert( name, i18n(name), TQString(), key3, key4, TQT_TQOBJECT(target), TQT_SLOT(fnSlot) ) #else # define DEF( name, key3, key4, target, fnSlot ) \ - keys->insert( name, i18n(name), TQString::null, key3, key4 ) + keys->insert( name, i18n(name), TQString(), key3, key4 ) #endif #define WIN KKey::QtWIN diff --git a/kicker/kicker/core/kmenubase.ui b/kicker/kicker/core/kmenubase.ui index 1adb59b38..8a86f366d 100644 --- a/kicker/kicker/core/kmenubase.ui +++ b/kicker/kicker/core/kmenubase.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KMenuBase</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>KMenu</cstring> </property> @@ -21,7 +21,7 @@ <property name="frameShape" stdset="0"> <string>MShape</string> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>m_search</cstring> </property> @@ -43,7 +43,7 @@ <property name="spacing"> <number>0</number> </property> - <widget class="QFrame"> + <widget class="TQFrame"> <property name="name"> <cstring>m_searchFrame</cstring> </property> @@ -55,13 +55,13 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>52</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>32767</width> <height>52</height> @@ -80,7 +80,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout18</cstring> </property> @@ -88,7 +88,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_searchLabel</cstring> </property> @@ -117,7 +117,7 @@ </sizepolicy> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_searchPixmap</cstring> </property> @@ -129,13 +129,13 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>32</width> <height>32</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>32</width> <height>32</height> @@ -165,7 +165,7 @@ <property name="sizeType"> <enum>Preferred</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>20</height> @@ -174,7 +174,7 @@ </spacer> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>m_footer</cstring> </property> @@ -196,7 +196,7 @@ <property name="spacing"> <number>4</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_userInfo</cstring> </property> @@ -222,14 +222,14 @@ <property name="sizeType"> <enum>MinimumExpanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>10</width> <height>20</height> </size> </property> </spacer> - <widget class="QToolButton"> + <widget class="TQToolButton"> <property name="name"> <cstring>m_branding</cstring> </property> @@ -241,7 +241,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>90</width> <height>24</height> @@ -270,7 +270,7 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>14</width> <height>20</height> diff --git a/kicker/kicker/core/kmenubase.ui.h b/kicker/kicker/core/kmenubase.ui.h index e1ed1ac25..492ae4aab 100644 --- a/kicker/kicker/core/kmenubase.ui.h +++ b/kicker/kicker/core/kmenubase.ui.h @@ -5,5 +5,5 @@ void KMenuBase::init() XSetWindowAttributes attrs; attrs.override_redirect = True; XChangeWindowAttributes( qt_xdisplay(), winId(), CWOverrideRedirect, &attrs ); - setWFlags( Qt::WType_Popup ); + setWFlags( (WFlags)TQt::WType_Popup ); } diff --git a/kicker/kicker/core/main.cpp b/kicker/kicker/core/main.cpp index 76e94a0e3..44d891f1e 100644 --- a/kicker/kicker/core/main.cpp +++ b/kicker/kicker/core/main.cpp @@ -73,7 +73,7 @@ extern "C" KDE_EXPORT int kdemain( int argc, char ** argv ) XCloseDisplay(dpy); dpy = 0; - if ((pos = display_name.findRev('.')) != -1) + if ((pos = display_name.tqfindRev('.')) != -1) display_name.remove(pos, 10); TQCString env; diff --git a/kicker/kicker/core/menumanager.cpp b/kicker/kicker/core/menumanager.cpp index 61110de14..776056647 100644 --- a/kicker/kicker/core/menumanager.cpp +++ b/kicker/kicker/core/menumanager.cpp @@ -156,8 +156,8 @@ void MenuManager::kmenuAccelActivated() r = desktop->geometry(); else r = desktop->screenGeometry(desktop->screenNumber(TQCursor::pos())); - // kMenu->rect() is not valid before showing, use sizeHint() - p = r.center() - TQRect( TQPoint( 0, 0 ), m_kmenu->sizeHint()).center(); + // kMenu->rect() is not valid before showing, use tqsizeHint() + p = r.center() - TQRect( TQPoint( 0, 0 ), m_kmenu->tqsizeHint()).center(); m_kmenu->popup(p); // when the cursor is in the area where the menu pops up, @@ -170,15 +170,15 @@ void MenuManager::kmenuAccelActivated() { // We need the kmenu's size to place it at the right position. // We cannot rely on the popup menu's current size(), if it wasn't - // shown before, so we resize it here according to its sizeHint(). - const TQSize size = m_kmenu->sizeHint(); + // shown before, so we resize it here according to its tqsizeHint(). + const TQSize size = m_kmenu->tqsizeHint(); m_kmenu->resize(size.width(),size.height()); PanelPopupButton* button = findKButtonFor(m_kmenu->widget()); // let's unhide the panel while we're at it. traverse the widget // hierarchy until we find the panel, if any - TQObject* menuParent = button->parent(); + TQObject* menuParent = button->tqparent(); while (menuParent) { ExtensionContainer* ext = dynamic_cast<ExtensionContainer*>(menuParent); @@ -188,11 +188,11 @@ void MenuManager::kmenuAccelActivated() ext->unhideIfHidden(); // make sure it's unhidden before we use it to figure out // where to popup - qApp->processEvents(); + tqApp->processEvents(); break; } - menuParent = menuParent->parent(); + menuParent = menuParent->tqparent(); } button->showMenu(); } diff --git a/kicker/kicker/core/panelextension.cpp b/kicker/kicker/core/panelextension.cpp index 2bd70c82b..d11c14c28 100644 --- a/kicker/kicker/core/panelextension.cpp +++ b/kicker/kicker/core/panelextension.cpp @@ -100,7 +100,7 @@ void PanelExtension::populateContainerArea() { _containerArea->show(); - if (ExtensionManager::the()->isMainPanel(topLevelWidget())) + if (ExtensionManager::the()->isMainPanel(tqtopLevelWidget())) { setObjId("Panel"); _containerArea->initialize(true); @@ -139,7 +139,7 @@ void PanelExtension::positionChange(Position p) _containerArea->setPosition(p); } -TQSize PanelExtension::sizeHint(Position p, TQSize maxSize) const +TQSize PanelExtension::tqsizeHint(Position p, TQSize maxSize) const { TQSize size; @@ -162,7 +162,7 @@ bool PanelExtension::eventFilter(TQObject*, TQEvent * e) if ( e->type() == TQEvent::MouseButtonPress ) { TQMouseEvent* me = (TQMouseEvent*) e; - if ( me->button() == RightButton && kapp->authorize("action/kicker_rmb")) + if ( me->button() == Qt::RightButton && kapp->authorize("action/kicker_rmb")) { Kicker::the()->setInsertionPoint(me->globalPos()); opMenu()->exec(me->globalPos()); diff --git a/kicker/kicker/core/panelextension.h b/kicker/kicker/core/panelextension.h index c7882291f..61e6c229c 100644 --- a/kicker/kicker/core/panelextension.h +++ b/kicker/kicker/core/panelextension.h @@ -80,7 +80,7 @@ k_dcop: void configure(); // KDE4: remove, moved to Kikcker public: - TQSize sizeHint(Position, TQSize maxSize) const; + TQSize tqsizeHint(Position, TQSize maxSize) const; Position preferedPosition() const { return Bottom; } bool eventFilter( TQObject *, TQEvent * ); diff --git a/kicker/kicker/core/pluginmanager.cpp b/kicker/kicker/core/pluginmanager.cpp index 81975ccae..86270db62 100644 --- a/kicker/kicker/core/pluginmanager.cpp +++ b/kicker/kicker/core/pluginmanager.cpp @@ -159,7 +159,7 @@ KPanelApplet* PluginManager::loadApplet(const AppletInfo& info, if (applet) { - _dict.insert( applet, new AppletInfo( info ) ); + _dict.insert( TQT_TQOBJECT(applet), new AppletInfo( info ) ); connect( applet, TQT_SIGNAL( destroyed( TQObject* ) ), TQT_SLOT( slotPluginDestroyed( TQObject* ) ) ); } @@ -197,7 +197,7 @@ KPanelExtension* PluginManager::loadExtension( KPanelExtension* extension = init_ptr( parent, info.configFile() ); if( extension ) { - _dict.insert( extension, new AppletInfo( info ) ); + _dict.insert( TQT_TQOBJECT(extension), new AppletInfo( info ) ); connect( extension, TQT_SIGNAL( destroyed( TQObject* ) ), TQT_SLOT( slotPluginDestroyed( TQObject* ) ) ); } @@ -272,7 +272,7 @@ AppletContainer* PluginManager::createAppletContainer( return 0; } - bool untrusted = m_untrustedApplets.find(desktopFile) != m_untrustedApplets.end(); + bool untrusted = m_untrustedApplets.tqfind(desktopFile) != m_untrustedApplets.end(); if (isStartup && untrusted) { // don't load extensions that bombed on us previously! @@ -325,7 +325,7 @@ ExtensionContainer* PluginManager::createExtensionContainer(const TQString& desk if (!internal) { - bool untrusted = m_untrustedExtensions.find(desktopFile) != m_untrustedExtensions.end(); + bool untrusted = m_untrustedExtensions.tqfind(desktopFile) != m_untrustedExtensions.end(); if (isStartup && untrusted) { // don't load extensions that bombed on us previously! @@ -365,7 +365,7 @@ LibUnloader::LibUnloader( const TQString &libName, TQObject *parent ) void LibUnloader::unload( const TQString &libName ) { - (void)new LibUnloader( libName, kapp ); + (void)new LibUnloader( libName, TQT_TQOBJECT(kapp) ); } void LibUnloader::unload() diff --git a/kicker/kicker/core/pluginmanager.h b/kicker/kicker/core/pluginmanager.h index cb5e0a89f..f67c13490 100644 --- a/kicker/kicker/core/pluginmanager.h +++ b/kicker/kicker/core/pluginmanager.h @@ -38,7 +38,7 @@ class KPanelApplet; class KPanelExtension; class TQPopupMenu; -class KDE_EXPORT PluginManager : public QObject +class KDE_EXPORT PluginManager : public TQObject { Q_OBJECT @@ -88,7 +88,7 @@ private: TQStringList m_untrustedExtensions; }; -class LibUnloader : public QObject +class LibUnloader : public TQObject { Q_OBJECT public: diff --git a/kicker/kicker/core/showdesktop.h b/kicker/kicker/core/showdesktop.h index 8d4d2546c..88cc7d7c7 100644 --- a/kicker/kicker/core/showdesktop.h +++ b/kicker/kicker/core/showdesktop.h @@ -31,7 +31,7 @@ class KWinModule; /** * Singleton class that handles desktop access (minimizing all windows) */ -class ShowDesktop : public QObject +class ShowDesktop : public TQObject { Q_OBJECT diff --git a/kicker/kicker/core/userrectsel.cpp b/kicker/kicker/core/userrectsel.cpp index d4b54f04a..d48c43aad 100644 --- a/kicker/kicker/core/userrectsel.cpp +++ b/kicker/kicker/core/userrectsel.cpp @@ -28,7 +28,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "userrectsel.moc" UserRectSel::UserRectSel(const RectList& rects, const TQPoint& _offset, const TQColor& color) - : TQWidget(0, 0, WStyle_Customize | WX11BypassWM), + : TQWidget(0, 0, (WFlags)(WStyle_Customize | WX11BypassWM)), rectangles(rects), offset(_offset) { @@ -46,9 +46,9 @@ UserRectSel::~UserRectSel() void UserRectSel::mouseReleaseEvent(TQMouseEvent * e) { - if (e->button() == LeftButton) + if (e->button() == Qt::LeftButton) { - qApp->exit_loop(); + tqApp->exit_loop(); } } @@ -88,12 +88,12 @@ void UserRectSel::paintCurrent() { for (i = 0; i < 4; i++) { - _frame[i] = new TQWidget(0, 0, Qt::WStyle_Customize | Qt::WStyle_NoBorder | Qt::WX11BypassWM); + _frame[i] = new TQWidget(0, 0, (WFlags)(WStyle_Customize | WStyle_NoBorder | WX11BypassWM)); _frame[i]->setPaletteBackgroundColor(Qt::black); } for (i = 4; i < 8; i++) { - _frame[i] = new TQWidget(0, 0, Qt::WStyle_Customize | Qt::WStyle_NoBorder | Qt::WX11BypassWM); + _frame[i] = new TQWidget(0, 0, (WFlags)(WStyle_Customize | WStyle_NoBorder | WX11BypassWM)); _frame[i]->setPaletteBackgroundColor(_color); } } @@ -138,10 +138,10 @@ UserRectSel::PanelStrut UserRectSel::select(const RectList& rects, const TQPoint sel.show(); sel.grabMouse(); sel.paintCurrent(); - qApp->enter_loop(); + tqApp->enter_loop(); sel.paintCurrent(); sel.releaseMouse(); - qApp->syncX(); + tqApp->syncX(); return sel.current; } diff --git a/kicker/kicker/core/userrectsel.h b/kicker/kicker/core/userrectsel.h index 63ba47fd5..0e9533e08 100644 --- a/kicker/kicker/core/userrectsel.h +++ b/kicker/kicker/core/userrectsel.h @@ -32,7 +32,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. class ShutUpCompiler; -class UserRectSel : public QWidget +class UserRectSel : public TQWidget { Q_OBJECT @@ -43,17 +43,17 @@ class UserRectSel : public QWidget PanelStrut() : m_screen(-1), m_pos(KPanelExtension::Bottom), - m_alignment(KPanelExtension::LeftTop) + m_tqalignment(KPanelExtension::LeftTop) { } PanelStrut(const TQRect& rect, int XineramaScreen, KPanelExtension::Position pos, - KPanelExtension::Alignment alignment) + KPanelExtension::Alignment tqalignment) : m_rect(rect), m_screen(XineramaScreen), m_pos(pos), - m_alignment(alignment) + m_tqalignment(tqalignment) { } @@ -61,7 +61,7 @@ class UserRectSel : public QWidget { return m_screen == rhs.m_screen && m_pos == rhs.m_pos && - m_alignment == rhs.m_alignment; + m_tqalignment == rhs.m_tqalignment; } bool operator!=(const PanelStrut& rhs) @@ -72,7 +72,7 @@ class UserRectSel : public QWidget TQRect m_rect; int m_screen; KPanelExtension::Position m_pos; - KPanelExtension::Alignment m_alignment; + KPanelExtension::Alignment m_tqalignment; }; typedef TQValueVector<PanelStrut> RectList; |