diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-19 01:42:14 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-19 01:42:14 +0000 |
commit | 8155225c9be993acc0512956416d195edfef4eb9 (patch) | |
tree | de4f3cd17614fc67e47eefabcdbe2fbe170c9be7 /kicker/kicker | |
parent | 364641b8e0279758d236af39abd138d379328a19 (diff) | |
download | tdebase-8155225c9be993acc0512956416d195edfef4eb9.tar.gz tdebase-8155225c9be993acc0512956416d195edfef4eb9.zip |
Enable compilation with TQt for Qt4 3.4.0 TP2
This should not break compatibility with TQt for Qt3; if it does please fix it ASAP!
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1215552 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kicker/kicker')
79 files changed, 741 insertions, 698 deletions
diff --git a/kicker/kicker/buttons/browserbutton.cpp b/kicker/kicker/buttons/browserbutton.cpp index 2e2cb5a2d..4a8c9a7af 100644 --- a/kicker/kicker/buttons/browserbutton.cpp +++ b/kicker/kicker/buttons/browserbutton.cpp @@ -103,7 +103,7 @@ void BrowserButton::dropEvent( TQDropEvent *ev ) { KURL path ( topMenu->path() ); _menuTimer->stop(); - KFileItem item( path, TQString::fromLatin1( "inode/directory" ), KFileItem::Unknown ); + KFileItem item( path, TQString::tqfromLatin1( "inode/directory" ), KFileItem::Unknown ); KonqOperations::doDrop( &item, path, ev, this ); PanelButton::dropEvent(ev); } diff --git a/kicker/kicker/buttons/desktopbutton.cpp b/kicker/kicker/buttons/desktopbutton.cpp index 9f23741e5..71bcaa2e5 100644 --- a/kicker/kicker/buttons/desktopbutton.cpp +++ b/kicker/kicker/buttons/desktopbutton.cpp @@ -77,7 +77,7 @@ void DesktopButton::dragEnterEvent( TQDragEnterEvent *ev ) void DesktopButton::dropEvent( TQDropEvent *ev ) { KURL dPath ( KGlobalSettings::desktopPath() ); - KFileItem item( dPath, TQString::fromLatin1( "inode/directory" ), KFileItem::Unknown ); + KFileItem item( dPath, TQString::tqfromLatin1( "inode/directory" ), KFileItem::Unknown ); KonqOperations::doDrop( &item, dPath, ev, this ); PanelButton::dropEvent(ev); } diff --git a/kicker/kicker/buttons/knewbutton.cpp b/kicker/kicker/buttons/knewbutton.cpp index 9c9f438ac..b8144d735 100644 --- a/kicker/kicker/buttons/knewbutton.cpp +++ b/kicker/kicker/buttons/knewbutton.cpp @@ -29,7 +29,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <tqtooltip.h> #include <tqpainter.h> #include <tqcursor.h> -#include <private/qeffects_p.h> +#include <tqeffects_p.h> #include <klocale.h> #include <kapplication.h> @@ -63,14 +63,14 @@ KNewButton::KNewButton( TQWidget* parent ) m_mouseInside = false; m_drag = false; - setIconAlignment((Qt::AlignmentFlags)(AlignTop|AlignRight)); + setIconAlignment((TQ_Alignment)(AlignTop|AlignRight)); setAcceptDrops(true); setIcon("kmenu-suse"); setDrawArrow(false); m_movie = new TQMovie(locate("data", "kicker/pics/kmenu_basic.mng")); m_movie->connectUpdate(this, TQT_SLOT(updateMovie())); - m_movie->connectStatus(this, TQT_SLOT(slotStatus(int))); + m_movie->connectStatus(TQT_TQOBJECT(this), TQT_SLOT(slotStatus(int))); m_movie->connectResize(this, TQT_SLOT(slotSetSize(const TQSize&))); TQApplication::desktop()->screen()->installEventFilter(this); @@ -99,7 +99,7 @@ TQColor KNewButton::borderColor() const QRgb rgb = img.pixel(orientation() == Qt::Horizontal ? img.width() - i - 1 : i, 2); - if (qGreen(rgb) > 0x50) + if (tqGreen(rgb) > 0x50) return rgb; } @@ -134,24 +134,24 @@ void KNewButton::setPopupDirection(KPanelApplet::Direction d) switch (d) { case KPanelApplet::Left: - setIconAlignment((Qt::AlignmentFlags)(AlignTop|AlignLeft)); + setIconAlignment((TQ_Alignment)(AlignTop|AlignLeft)); m_movie = new TQMovie(locate("data", "kicker/pics/kmenu_vertical.mng")); break; case KPanelApplet::Right: - setIconAlignment((Qt::AlignmentFlags)(AlignTop|AlignRight)); + setIconAlignment((TQ_Alignment)(AlignTop|AlignRight)); m_movie = new TQMovie(locate("data", "kicker/pics/kmenu_vertical.mng")); break; case KPanelApplet::Up: - setIconAlignment((Qt::AlignmentFlags)(AlignTop|AlignHCenter)); + setIconAlignment((TQ_Alignment)(AlignTop|AlignHCenter)); m_movie = new TQMovie(locate("data", "kicker/pics/kmenu_basic.mng")); break; case KPanelApplet::Down: - setIconAlignment((Qt::AlignmentFlags)(AlignBottom|AlignHCenter)); + setIconAlignment((TQ_Alignment)(AlignBottom|AlignHCenter)); m_movie = new TQMovie(locate("data", "kicker/pics/kmenu_flipped.mng")); } m_movie->connectUpdate(this, TQT_SLOT(updateMovie())); - m_movie->connectStatus(this, TQT_SLOT(slotStatus(int))); + m_movie->connectStatus(TQT_TQOBJECT(this), TQT_SLOT(slotStatus(int))); m_movie->connectResize(this, TQT_SLOT(slotSetSize(const TQSize&))); } @@ -214,8 +214,8 @@ bool KNewButton::eventFilter(TQObject *o, TQEvent *e) e->type() == TQEvent::MouseButtonPress || e->type() == TQEvent::MouseButtonDblClick ) { - TQMouseEvent *me = static_cast<TQMouseEvent *>(e); - if (rect().contains(mapFromGlobal(me->globalPos()))) + TQMouseEvent *me = TQT_TQMOUSEEVENT(e); + if (TQT_TQRECT_OBJECT(rect()).tqcontains(mapFromGlobal(me->globalPos()))) { if (m_pressedDuringPopup && m_popup && m_openTimer != -1 && (me->button() & Qt::LeftButton) ) @@ -225,8 +225,8 @@ bool KNewButton::eventFilter(TQObject *o, TQEvent *e) if (KickerSettings::kickoffDrawGeekoEye() && e->type() == TQEvent::MouseMove) { - TQMouseEvent *me = static_cast<TQMouseEvent *>(e); - if ((me->state() & MouseButtonMask) == NoButton) + TQMouseEvent *me = TQT_TQMOUSEEVENT(e); + if ((me->state() & Qt::MouseButtonMask) == Qt::NoButton) drawEye(); } @@ -286,7 +286,7 @@ void KNewButton::drawEye() } m_active_pixmap = pixmap.xForm(matrix); - repaint(false); + tqrepaint(false); } #undef eye_x #undef eye_y @@ -355,9 +355,9 @@ void KNewButton::mouseMoveEvent(TQMouseEvent* e) { KButton::mouseMoveEvent(e); - m_mouseInside = m_sloppyRegion.contains(e->pos()); + m_mouseInside = m_sloppyRegion.tqcontains(e->pos()); - if ( m_sloppyRegion.contains(e->pos())) + if ( m_sloppyRegion.tqcontains(e->pos())) { if (m_hoverTimer == -1 && KickerSettings::openOnHover()) m_hoverTimer = startTimer(kMax(200,TQApplication::doubleClickInterval()/2)); @@ -420,16 +420,16 @@ void KNewButton::slotExecMenu() { switch (popupDirection()) { case KPanelApplet::Left: - qScrollEffect(m_popup, QEffects::LeftScroll); + qScrollEffect(m_popup, TQEffects::LeftScroll); break; case KPanelApplet::Up: - qScrollEffect(m_popup, QEffects::UpScroll); + qScrollEffect(m_popup, TQEffects::UpScroll); break; case KPanelApplet::Right: - qScrollEffect(m_popup, QEffects::RightScroll); + qScrollEffect(m_popup, TQEffects::RightScroll); break; case KPanelApplet::Down: - qScrollEffect(m_popup, QEffects::DownScroll); + qScrollEffect(m_popup, TQEffects::DownScroll); break; } } diff --git a/kicker/kicker/buttons/nonkdeappbutton.cpp b/kicker/kicker/buttons/nonkdeappbutton.cpp index 29b7ddb2e..e91a06f37 100644 --- a/kicker/kicker/buttons/nonkdeappbutton.cpp +++ b/kicker/kicker/buttons/nonkdeappbutton.cpp @@ -41,7 +41,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // our own definition #include "nonkdeappbutton.h" -// we include the "moc" file so that the KDE build system knows to create it +// we include the "tqmoc" file so that the KDE build system knows to create it #include "nonkdeappbutton.moc" // this is one of the two constructors. gets called when creating a new button 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; diff --git a/kicker/kicker/interfaces/kickoff-search-plugin.cpp b/kicker/kicker/interfaces/kickoff-search-plugin.cpp index c229c85b0..dc887d5e8 100644 --- a/kicker/kicker/interfaces/kickoff-search-plugin.cpp +++ b/kicker/kicker/interfaces/kickoff-search-plugin.cpp @@ -31,7 +31,7 @@ KickoffSearch::Plugin::~Plugin() KickoffSearch::KickoffSearchInterface* KickoffSearch::Plugin::kickoffSearchInterface() { - return static_cast<KickoffSearchInterface*>( parent()->child( 0, "KickoffSearch::KickoffSearchInterface" ) ); + return static_cast<KickoffSearchInterface*>( tqparent()->child( 0, "KickoffSearch::KickoffSearchInterface" ) ); } #include "kickoff-search-plugin.moc" diff --git a/kicker/kicker/kicker-3.4-reverseLayout.cpp b/kicker/kicker/kicker-3.4-reverseLayout.cpp index 97a35aff6..bc3baa9e1 100644 --- a/kicker/kicker/kicker-3.4-reverseLayout.cpp +++ b/kicker/kicker/kicker-3.4-reverseLayout.cpp @@ -88,7 +88,7 @@ int main(int argc, char** argv) applets[*it].freeSpace = 1 - applets[*it].freeSpace; // Take care of stretchable applets. - if (stretchableApplets.contains(applets[*it].desktopFile)) + if (stretchableApplets.tqcontains(applets[*it].desktopFile)) { if (it != appletIds.begin()) { diff --git a/kicker/kicker/plugins/beaglesearch.cpp b/kicker/kicker/plugins/beaglesearch.cpp index 9f86c8fbd..f75f719ab 100644 --- a/kicker/kicker/plugins/beaglesearch.cpp +++ b/kicker/kicker/plugins/beaglesearch.cpp @@ -347,7 +347,7 @@ BeagleUtil::timestringToBeagleTimestamp(TQString timestring) //kdDebug () << "datetime string:" << timestring << endl; // FIXME: error check timestring format if (timestring.isNull () || timestring.stripWhiteSpace () == "" || timestring.length() != 8 ) - return beagle_timestamp_new_from_unix_time (TQDateTime::currentDateTime ().toTime_t ()); + return beagle_timestamp_new_from_unix_time (TQDateTime::tqcurrentDateTime ().toTime_t ()); //TQDateTime dt = TQDateTime::fromString (timestring, Qt::ISODate); struct tm tm_time; time_t timet_time; diff --git a/kicker/kicker/plugins/kickoff-beagle-plugin.cpp b/kicker/kicker/plugins/kickoff-beagle-plugin.cpp index 3cad77ca4..a506bcd5d 100644 --- a/kicker/kicker/plugins/kickoff-beagle-plugin.cpp +++ b/kicker/kicker/plugins/kickoff-beagle-plugin.cpp @@ -315,7 +315,7 @@ HitMenuItem *KickoffBeaglePlugin::hitToHitMenuItem (int category, Hit *hit) case WEBHIST: uri = hit->getUri (); title = (*hit) [dc_title]; - title = title.replace(TQRegExp("\n")," "); + title = title.tqreplace(TQRegExp("\n")," "); mimetype = "text/html"; if (title.isEmpty () || title.stripWhiteSpace ().isEmpty ()) { title = uri.prettyURL (); @@ -375,15 +375,15 @@ HitMenuItem *KickoffBeaglePlugin::hitToHitMenuItem (int category, Hit *hit) TQString command = desktopfile.readEntry("Exec"); if (command==input) score = 100; - else if (command.find(input)==0) + else if (command.tqfind(input)==0) score = 50; - else if (command.find(input)!=-1) + else if (command.tqfind(input)!=-1) score = 10; else if (title==input) score = 100; - else if (title.find(input)==0) + else if (title.tqfind(input)==0) score = 50; - else if (title.find(input)!=-1) + else if (title.tqfind(input)!=-1) score = 10; break; } diff --git a/kicker/kicker/ui/addapplet.cpp b/kicker/kicker/ui/addapplet.cpp index 796920ed4..47a2c5835 100644 --- a/kicker/kicker/ui/addapplet.cpp +++ b/kicker/kicker/ui/addapplet.cpp @@ -61,7 +61,7 @@ AppletWidget::AppletWidget(const AppletInfo& info, bool odd, TQWidget *parent) m_odd(odd), m_selected(false) { - setFocusPolicy(TQWidget::StrongFocus); + setFocusPolicy(TQ_StrongFocus); setSelected(m_selected); itemTitle->setText("<h3>" + info.name() + "</h3>"); @@ -84,8 +84,8 @@ bool AppletWidget::eventFilter(TQObject*, TQEvent* e) { if (e->type() == TQEvent::MouseButtonPress) { - TQMouseEvent* me = static_cast<TQMouseEvent*>(e); - if (me->button() & LeftButton) + TQMouseEvent* me = TQT_TQMOUSEEVENT(e); + if (me->button() & Qt::LeftButton) { m_dragStart = me->pos(); } @@ -97,7 +97,7 @@ bool AppletWidget::eventFilter(TQObject*, TQEvent* e) if (e->type() == TQEvent::MouseMove) { - TQMouseEvent* me = static_cast<TQMouseEvent*>(e); + TQMouseEvent* me = TQT_TQMOUSEEVENT(e); if ((me->pos() - m_dragStart).manhattanLength() > KGlobalSettings::dndEventDelay()) { @@ -130,7 +130,7 @@ void AppletWidget::keyPressEvent(TQKeyEvent *e) } else if (e->key() == Qt::Key_Up) { - TQKeyEvent fakedKeyPress(TQEvent::KeyPress, Qt::Key_BackTab, 0, 0); + TQKeyEvent fakedKeyPress(TQEvent::KeyPress, TQt::Key_BackTab, 0, 0); TQKeyEvent fakedKeyRelease(TQEvent::KeyRelease, Key_BackTab, 0, 0); TQApplication::sendEvent(this, &fakedKeyPress); TQApplication::sendEvent(this, &fakedKeyRelease); @@ -150,7 +150,7 @@ void AppletWidget::keyPressEvent(TQKeyEvent *e) void AppletWidget::mousePressEvent(TQMouseEvent *e) { - if (e->button() == TQMouseEvent::LeftButton) + if (e->button() == Qt::LeftButton) { emit clicked(this); m_dragStart = e->pos(); @@ -162,7 +162,7 @@ void AppletWidget::mousePressEvent(TQMouseEvent *e) void AppletWidget::mouseMoveEvent(TQMouseEvent *e) { - if (e->button() == TQMouseEvent::LeftButton && + if (e->button() == Qt::LeftButton && !m_dragStart.isNull() && (e->pos() - m_dragStart).manhattanLength() > KGlobalSettings::dndEventDelay()) @@ -186,7 +186,7 @@ void AppletWidget::mouseReleaseEvent(TQMouseEvent *e) void AppletWidget::mouseDoubleClickEvent(TQMouseEvent *e) { - if (!e->button() == TQMouseEvent::LeftButton) + if (!e->button() == Qt::LeftButton) { AppletItem::mouseDoubleClickEvent(e); return; @@ -291,7 +291,7 @@ void AddAppletDialog::resizeAppletView() { m_appletBox->layout()->activate(); w = v->visibleWidth(); - h = m_appletBox->layout()->minimumSize().height(); + h = m_appletBox->tqlayout()->tqminimumSize().height(); v->resizeContents(w, QMAX(h, v->visibleHeight())); if (w == m_appletBox->width() && h == m_appletBox->height()) break; @@ -305,7 +305,7 @@ bool AddAppletDialog::eventFilter(TQObject *o, TQEvent *e) if (e->type() == TQEvent::Resize) TQTimer::singleShot(0, this, TQT_SLOT(resizeAppletView())); - return TQObject::eventFilter(o, e); + return TQT_TQOBJECT(this)->TQObject::eventFilter(o, e); } void AddAppletDialog::populateApplets() @@ -435,7 +435,7 @@ void AddAppletDialog::addApplet(AppletWidget* applet) // reset the odd/even colouring from this item on down in the list bool odd = applet->odd(); - AppletWidget::List::const_iterator it = m_appletWidgetList.find(applet); + AppletWidget::List::const_iterator it = m_appletWidgetList.tqfind(applet); for (; it != m_appletWidgetList.constEnd(); ++it) { if ((*it)->isHidden()) @@ -456,7 +456,7 @@ void AddAppletDialog::addApplet(AppletWidget* applet) if (appletContainer) { ExtensionContainer* ec = - dynamic_cast<ExtensionContainer*>(m_containerArea->topLevelWidget()); + dynamic_cast<ExtensionContainer*>(m_containerArea->tqtopLevelWidget()); if (ec) { @@ -484,8 +484,8 @@ bool AddAppletDialog::appletMatchesSearch(const AppletWidget* w, return (m_selectedType == AppletInfo::Undefined || w->info().type() & m_selectedType) && - (w->info().name().contains(s, false) || - w->info().comment().contains(s, false)); + (w->info().name().tqcontains(s, false) || + w->info().comment().tqcontains(s, false)); } void AddAppletDialog::delayedSearch() diff --git a/kicker/kicker/ui/addapplet_mnu.cpp b/kicker/kicker/ui/addapplet_mnu.cpp index 6d5c4482f..19bbf0f11 100644 --- a/kicker/kicker/ui/addapplet_mnu.cpp +++ b/kicker/kicker/ui/addapplet_mnu.cpp @@ -54,11 +54,11 @@ void PanelAddAppletMenu::slotAboutToShow() if (ai.icon().isEmpty() || ai.icon() == "unknown") { - insertItem(ai.name().replace( "&", "&&" ), i); + insertItem(ai.name().tqreplace( "&", "&&" ), i); } else { - insertItem(SmallIconSet(ai.icon()), ai.name().replace( "&", "&&" ), i); + insertItem(SmallIconSet(ai.icon()), ai.name().tqreplace( "&", "&&" ), i); } if (ai.isUniqueApplet() && PluginManager::the()->hasInstance(ai)) diff --git a/kicker/kicker/ui/addapplet_mnu.h b/kicker/kicker/ui/addapplet_mnu.h index caedb4fdb..79c539687 100644 --- a/kicker/kicker/ui/addapplet_mnu.h +++ b/kicker/kicker/ui/addapplet_mnu.h @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. class ContainerArea; -class PanelAddAppletMenu : public QPopupMenu +class PanelAddAppletMenu : public TQPopupMenu { Q_OBJECT diff --git a/kicker/kicker/ui/addappletvisualfeedback.cpp b/kicker/kicker/ui/addappletvisualfeedback.cpp index acd82a066..7f4f90676 100644 --- a/kicker/kicker/ui/addappletvisualfeedback.cpp +++ b/kicker/kicker/ui/addappletvisualfeedback.cpp @@ -54,7 +54,7 @@ AddAppletVisualFeedback::AddAppletVisualFeedback(AppletWidget* widget, m_moveTimer(0, "m_moveTimer"), m_dirty(false) { - setFocusPolicy(NoFocus); + setFocusPolicy(TQ_NoFocus); setBackgroundMode(NoBackground); connect(&m_moveTimer, TQT_SIGNAL(timeout()), TQT_SLOT(swoopCloser())); @@ -157,7 +157,7 @@ void AddAppletVisualFeedback::displayInternal() // draw background TQPainter bufferPainter(&m_pixmap); bufferPainter.setPen(Qt::black); - bufferPainter.setBrush(colorGroup().background()); + bufferPainter.setBrush(tqcolorGroup().background()); bufferPainter.drawRoundRect(0, 0, width, height, 1600 / width, 1600 / height); @@ -175,14 +175,14 @@ void AddAppletVisualFeedback::displayInternal() int textY = (height - textRect.height()) / 2; // draw text shadow - TQColorGroup cg = colorGroup(); + TQColorGroup cg = tqcolorGroup(); cg.setColor(TQColorGroup::Text, cg.background().dark(115)); int shadowOffset = TQApplication::reverseLayout() ? -1 : 1; m_richText->draw(&bufferPainter, 5 + textX + shadowOffset, textY + 1, TQRect(), cg); // draw text - cg = colorGroup(); + cg = tqcolorGroup(); m_richText->draw(&bufferPainter, 5 + textX, textY, rect(), cg); } } @@ -225,7 +225,7 @@ void AddAppletVisualFeedback::swoopCloser() void AddAppletVisualFeedback::internalUpdate() { m_dirty = true; - repaint(false); + tqrepaint(false); } #include "addappletvisualfeedback.moc" diff --git a/kicker/kicker/ui/addappletvisualfeedback.h b/kicker/kicker/ui/addappletvisualfeedback.h index 02899ee36..dc660bff1 100644 --- a/kicker/kicker/ui/addappletvisualfeedback.h +++ b/kicker/kicker/ui/addappletvisualfeedback.h @@ -38,7 +38,7 @@ class TQPaintEvent; class TQSimpleRichText; class TQTimer; -class AddAppletVisualFeedback : QWidget +class AddAppletVisualFeedback : TQWidget { Q_OBJECT diff --git a/kicker/kicker/ui/addbutton_mnu.cpp b/kicker/kicker/ui/addbutton_mnu.cpp index 02c4718d4..c04a832e6 100644 --- a/kicker/kicker/ui/addbutton_mnu.cpp +++ b/kicker/kicker/ui/addbutton_mnu.cpp @@ -46,7 +46,7 @@ PanelAddButtonMenu::PanelAddButtonMenu(ContainerArea* cArea, TQWidget * parent, void PanelAddButtonMenu::slotExec(int id) { - if (!entryMap_.contains(id)) + if (!entryMap_.tqcontains(id)) return; KSycocaEntry * e = entryMap_[id]; diff --git a/kicker/kicker/ui/addextension_mnu.cpp b/kicker/kicker/ui/addextension_mnu.cpp index b22187443..325897a8c 100644 --- a/kicker/kicker/ui/addextension_mnu.cpp +++ b/kicker/kicker/ui/addextension_mnu.cpp @@ -44,7 +44,7 @@ void PanelAddExtensionMenu::slotAboutToShow() AppletInfo::List::const_iterator it = extensions.constBegin(); for( int i = 0; it != extensions.constEnd(); ++it, ++i ) { const AppletInfo& ai = (*it); - insertItem( ai.name().replace( "&", "&&" ), i ); + insertItem( ai.name().tqreplace( "&", "&&" ), i ); if ( ai.isUniqueApplet() && PluginManager::the()->hasInstance(ai) ) { setItemEnabled( i, false ); setItemChecked( i, true ); diff --git a/kicker/kicker/ui/addextension_mnu.h b/kicker/kicker/ui/addextension_mnu.h index a91986e19..76163250f 100644 --- a/kicker/kicker/ui/addextension_mnu.h +++ b/kicker/kicker/ui/addextension_mnu.h @@ -29,7 +29,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "appletinfo.h" -class PanelAddExtensionMenu : public QPopupMenu +class PanelAddExtensionMenu : public TQPopupMenu { Q_OBJECT diff --git a/kicker/kicker/ui/appletitem.ui b/kicker/kicker/ui/appletitem.ui index d9cc2d9b0..dc6faab50 100644 --- a/kicker/kicker/ui/appletitem.ui +++ b/kicker/kicker/ui/appletitem.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>AppletItem</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>AppletItem</cstring> </property> @@ -20,13 +20,13 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>0</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>32767</width> <height>80</height> @@ -39,7 +39,7 @@ <property name="margin"> <number>2</number> </property> - <widget class="QLayoutWidget" row="0" column="1"> + <widget class="TQLayoutWidget" row="0" column="1"> <property name="name"> <cstring>layout11</cstring> </property> @@ -47,7 +47,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>itemTitle</cstring> </property> @@ -65,11 +65,11 @@ <property name="textFormat"> <enum>RichText</enum> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>itemDescription</cstring> </property> @@ -87,13 +87,13 @@ <property name="textFormat"> <enum>RichText</enum> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> </vbox> </widget> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> <cstring>layout4</cstring> </property> @@ -101,11 +101,11 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>itemPixmap</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>64</width> <height>64</height> @@ -117,7 +117,7 @@ <property name="text"> <string></string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop</set> </property> </widget> diff --git a/kicker/kicker/ui/appletop_mnu.cpp b/kicker/kicker/ui/appletop_mnu.cpp index e0e162d33..2bd8f7bd0 100644 --- a/kicker/kicker/ui/appletop_mnu.cpp +++ b/kicker/kicker/ui/appletop_mnu.cpp @@ -41,7 +41,7 @@ PanelAppletOpMenu::PanelAppletOpMenu(int actions, TQPopupMenu *opMenu, const TQP bool isButton = (parent && parent->inherits("ButtonContainer")); bool isMenu = false; TQString titleText = title; - titleText = titleText.replace('&', "&&"); + titleText = titleText.tqreplace('&', "&&"); if (isButton) { isMenu = static_cast<ButtonContainer*>(parent)->isAMenu(); @@ -52,13 +52,13 @@ PanelAppletOpMenu::PanelAppletOpMenu(int actions, TQPopupMenu *opMenu, const TQP TQString text = isButton ? (isMenu ? i18n("&Move %1 Menu") : i18n("&Move %1 Button")) : i18n("&Move %1"); - insertItem(SmallIcon("move"), text.arg(titleText), Move); + insertItem(SmallIcon("move"), text.tqarg(titleText), Move); // we look for a container area to see if we can add containers // this is part of the kiosk support in kicker, allowing // one to block users from adding new containers ContainerArea* area = 0; - TQObject* findTheArea = parent ? parent->parent() : 0; + TQObject* findTheArea = parent ? parent->tqparent() : 0; while (findTheArea) { area = dynamic_cast<ContainerArea*>(findTheArea); @@ -68,7 +68,7 @@ PanelAppletOpMenu::PanelAppletOpMenu(int actions, TQPopupMenu *opMenu, const TQP break; } - findTheArea = findTheArea->parent(); + findTheArea = findTheArea->tqparent(); } if (!area || area->canAddContainers()) @@ -76,7 +76,7 @@ PanelAppletOpMenu::PanelAppletOpMenu(int actions, TQPopupMenu *opMenu, const TQP text = isButton ? (isMenu ? i18n("&Remove %1 Menu") : i18n("&Remove %1 Button")) : i18n("&Remove %1"); - insertItem(SmallIcon("remove"), text.arg(titleText), Remove); + insertItem(SmallIcon("remove"), text.tqarg(titleText), Remove); needSeparator = true; } } @@ -103,7 +103,7 @@ PanelAppletOpMenu::PanelAppletOpMenu(int actions, TQPopupMenu *opMenu, const TQP KIcon::Small, 0, KIcon::DefaultState, 0, true)); - insertItem(iconPix, i18n("&About %1").arg( titleText ), About); + insertItem(iconPix, i18n("&About %1").tqarg( titleText ), About); needSeparator = !(actions & KPanelApplet::Help); } @@ -123,12 +123,12 @@ PanelAppletOpMenu::PanelAppletOpMenu(int actions, TQPopupMenu *opMenu, const TQP if (isButton) { insertItem(SmallIcon("configure"), - i18n("&Configure %1 Button...").arg(titleText), Preferences); + i18n("&Configure %1 Button...").tqarg(titleText), Preferences); } else { insertItem(SmallIcon("configure"), - i18n("&Configure %1...").arg(titleText), Preferences); + i18n("&Configure %1...").tqarg(titleText), Preferences); } needSeparator = true; } diff --git a/kicker/kicker/ui/appletop_mnu.h b/kicker/kicker/ui/appletop_mnu.h index 4b396a83d..35e10be3c 100644 --- a/kicker/kicker/ui/appletop_mnu.h +++ b/kicker/kicker/ui/appletop_mnu.h @@ -29,7 +29,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. class AppletInfo; // The button operations menu (usually right click) -class PanelAppletOpMenu : public QPopupMenu +class PanelAppletOpMenu : public TQPopupMenu { Q_OBJECT diff --git a/kicker/kicker/ui/appletview.ui b/kicker/kicker/ui/appletview.ui index a2fa1e91b..4ba0f38e8 100644 --- a/kicker/kicker/ui/appletview.ui +++ b/kicker/kicker/ui/appletview.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>AppletView</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>AppletView</cstring> </property> @@ -19,7 +19,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout8</cstring> </property> @@ -27,7 +27,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel8</cstring> </property> @@ -38,7 +38,7 @@ <cstring>appletSearch</cstring> </property> </widget> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>appletSearch</cstring> </property> @@ -54,7 +54,7 @@ <string><qt>Type here some text to filter on the applet names and comments</qt></string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -65,7 +65,7 @@ <cstring>appletFilter</cstring> </property> </widget> - <widget class="QComboBox"> + <widget class="TQComboBox"> <item> <property name="text"> <string>All</string> @@ -98,7 +98,7 @@ </widget> </hbox> </widget> - <widget class="QScrollView"> + <widget class="TQScrollView"> <property name="name"> <cstring>appletScrollView</cstring> </property> @@ -110,7 +110,7 @@ <verstretch>1</verstretch> </sizepolicy> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>32767</width> <height>32767</height> @@ -123,7 +123,7 @@ <string><qt>This is the applet list. Select an applet and click on <b>Add to panel</b> to add it</qt></string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout3</cstring> </property> @@ -141,7 +141,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>284</width> <height>20</height> @@ -171,7 +171,7 @@ <customwidgets> <customwidget> <class>QScrollView</class> - <header location="global">qscrollview.h</header> + <header location="global">tqscrollview.h</header> <sizehint> <width>-1</width> <height>-1</height> @@ -197,7 +197,7 @@ </tabstops> <layoutdefaults spacing="6" margin="11"/> <includehints> - <includehint>qscrollview.h</includehint> + <includehint>tqscrollview.h</includehint> <includehint>kpushbutton.h</includehint> <includehint>kpushbutton.h</includehint> </includehints> diff --git a/kicker/kicker/ui/browser_mnu.cpp b/kicker/kicker/ui/browser_mnu.cpp index 2250475b4..46f79db2b 100644 --- a/kicker/kicker/ui/browser_mnu.cpp +++ b/kicker/kicker/ui/browser_mnu.cpp @@ -129,7 +129,7 @@ void PanelBrowserMenu::initialize() } // get entry list - const QFileInfoList *list = dir.entryInfoList(); + const TQFileInfoList *list = dir.entryInfoList(); // no list -> read error if (!list) { @@ -163,7 +163,7 @@ void PanelBrowserMenu::initialize() int run_id = _startid; // get list iterator - QFileInfoListIterator it(*list); + TQFileInfoListIterator it(*list); // jump to startid it += _startid; @@ -244,7 +244,7 @@ void PanelBrowserMenu::initialize() title = c.readEntry("Name", title); TQString s = c.readEntry("Icon"); - if(!_icons->contains(s)) { + if(!_icons->tqcontains(s)) { icon = KGlobal::iconLoader()->loadIcon(s, KIcon::Small, KIcon::SizeSmall, KIcon::DefaultState, 0, true); @@ -344,7 +344,7 @@ void PanelBrowserMenu::append(const TQPixmap &pixmap, const TQString &title, con // avoid &'s being converted to accelerators TQString newTitle = title; newTitle = KStringHandler::cEmSqueeze( newTitle, fontMetrics(), 20 ); - newTitle.replace("&", "&&"); + newTitle.tqreplace("&", "&&"); // insert menu item int id = insertItem(pixmap, newTitle); @@ -362,7 +362,7 @@ void PanelBrowserMenu::append(const TQPixmap &pixmap, const TQString &title, Pan // avoid &'s being converted to accelerators TQString newTitle = title; newTitle = KStringHandler::cEmSqueeze( newTitle, fontMetrics(), 20 ); - newTitle.replace("&", "&&"); + newTitle.tqreplace("&", "&&"); // insert submenu insertItem(pixmap, newTitle, subMenu); @@ -380,7 +380,7 @@ void PanelBrowserMenu::mouseMoveEvent(TQMouseEvent *e) { TQPopupMenu::mouseMoveEvent(e); - if (!(e->state() & LeftButton)) return; + if (!(e->state() & Qt::LeftButton)) return; if(_lastpress == TQPoint(-1, -1)) return; // DND delay @@ -388,7 +388,7 @@ void PanelBrowserMenu::mouseMoveEvent(TQMouseEvent *e) // get id int id = idAt(_lastpress); - if(!_filemap.contains(id)) return; + if(!_filemap.tqcontains(id)) return; // reset _lastpress _lastpress = TQPoint(-1, -1); @@ -429,7 +429,7 @@ void PanelBrowserMenu::dragMoveEvent(TQDragMoveEvent *ev) void PanelBrowserMenu::dropEvent( TQDropEvent *ev ) { KURL u( path() ); - KFileItem item( u, TQString::fromLatin1( "inode/directory" ), KFileItem::Unknown ); + KFileItem item( u, TQString::tqfromLatin1( "inode/directory" ), KFileItem::Unknown ); KonqOperations::doDrop( &item, u, ev, this ); KPanelMenu::dropEvent(ev); // ### TODO: Update list @@ -439,7 +439,7 @@ void PanelBrowserMenu::slotExec(int id) { kapp->propagateSessionManager(); - if(!_filemap.contains(id)) return; + if(!_filemap.tqcontains(id)) return; KURL url; url.setPath(path() + "/" + _filemap[id]); @@ -494,9 +494,9 @@ void PanelBrowserMenu::slotMimeCheck() // kdDebug() << url.url() << ": " << icon << endl; file = KStringHandler::cEmSqueeze( file, fontMetrics(), 20 ); - file.replace("&", "&&"); + file.tqreplace("&", "&&"); - if(!_icons->contains(icon)) { + if(!_icons->tqcontains(icon)) { TQPixmap pm = SmallIcon(icon); if( pm.height() > 16 ) { diff --git a/kicker/kicker/ui/clicklineedit.cpp b/kicker/kicker/ui/clicklineedit.cpp index 52cb8776d..debe91d3e 100644 --- a/kicker/kicker/ui/clicklineedit.cpp +++ b/kicker/kicker/ui/clicklineedit.cpp @@ -22,7 +22,7 @@ #include "clicklineedit.h" -#include "qpainter.h" +#include "tqpainter.h" using namespace KPIM; @@ -39,13 +39,13 @@ ClickLineEdit::~ClickLineEdit() {} void ClickLineEdit::setClickMessage( const TQString &msg ) { mClickMessage = msg; - repaint(); + tqrepaint(); } void ClickLineEdit::setText( const TQString &txt ) { mDrawClickMsg = txt.isEmpty(); - repaint(); + tqrepaint(); KLineEdit::setText( txt ); } @@ -67,7 +67,7 @@ void ClickLineEdit::focusInEvent( TQFocusEvent *ev ) if ( mDrawClickMsg == true ) { mDrawClickMsg = false; - repaint(); + tqrepaint(); } TQLineEdit::focusInEvent( ev ); } @@ -77,7 +77,7 @@ void ClickLineEdit::focusOutEvent( TQFocusEvent *ev ) if ( text().isEmpty() ) { mDrawClickMsg = true; - repaint(); + tqrepaint(); } TQLineEdit::focusOutEvent( ev ); } diff --git a/kicker/kicker/ui/client_mnu.cpp b/kicker/kicker/ui/client_mnu.cpp index 9736351e1..deaae70b9 100644 --- a/kicker/kicker/ui/client_mnu.cpp +++ b/kicker/kicker/ui/client_mnu.cpp @@ -59,7 +59,7 @@ void KickerClientMenu::insertItem( TQString text, int id ) TQCString KickerClientMenu::insertMenu( TQPixmap icon, TQString text, int id ) { TQString subname("%1-submenu%2"); - TQCString subid = subname.arg(objId()).arg(id).local8Bit(); + TQCString subid = subname.tqarg(static_cast<const char *>(objId())).tqarg(id).local8Bit(); KickerClientMenu *sub = new KickerClientMenu(this, subid); int globalid = TQPopupMenu::insertItem( icon, text, sub, id); setItemParameter( globalid, id ); diff --git a/kicker/kicker/ui/dirdrop_mnu.h b/kicker/kicker/ui/dirdrop_mnu.h index d05187400..ffa157c85 100644 --- a/kicker/kicker/ui/dirdrop_mnu.h +++ b/kicker/kicker/ui/dirdrop_mnu.h @@ -27,7 +27,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <tqpopupmenu.h> // The directory dropped menu -class PanelDirDropMenu : public QPopupMenu +class PanelDirDropMenu : public TQPopupMenu { public: enum OpButton{Url=1, Browser}; diff --git a/kicker/kicker/ui/exe_dlg.cpp b/kicker/kicker/ui/exe_dlg.cpp index cb0d42c56..0829f6ccb 100644 --- a/kicker/kicker/ui/exe_dlg.cpp +++ b/kicker/kicker/ui/exe_dlg.cpp @@ -78,8 +78,8 @@ PanelExeDialog::PanelExeDialog(const TQString& title, const TQString& descriptio this, TQT_SLOT(slotIconChanged(TQString))); // leave decent space for the commandline - resize(sizeHint().width() > 300 ? sizeHint().width() : 300, - sizeHint().height()); + resize(tqsizeHint().width() > 300 ? tqsizeHint().width() : 300, + tqsizeHint().height()); } void PanelExeDialog::slotOk() @@ -135,11 +135,11 @@ void PanelExeDialog::fillCompletion() TQDir d( (*it) ); d.setFilter( TQDir::Files | TQDir::Executable ); - const QFileInfoList *list = d.entryInfoList(); + const TQFileInfoList *list = d.entryInfoList(); if (!list) continue; - QFileInfoListIterator it2( *list ); + TQFileInfoListIterator it2( *list ); TQFileInfo *fi; while ( (fi = it2.current()) != 0 ) { @@ -164,7 +164,7 @@ void PanelExeDialog::slotTextChanged(const TQString &str) } TQString exeLocation = str; - TQMap<TQString, TQString>::iterator it = m_partialPath2full.find(str); + TQMap<TQString, TQString>::iterator it = m_partialPath2full.tqfind(str); if (it != m_partialPath2full.end()) exeLocation = it.data(); @@ -174,7 +174,7 @@ void PanelExeDialog::slotTextChanged(const TQString &str) void PanelExeDialog::slotReturnPressed() { - if (m_partialPath2full.contains(ui->m_exec->url())) + if (m_partialPath2full.tqcontains(ui->m_exec->url())) ui->m_exec->setURL(m_partialPath2full[ui->m_exec->url()]); } diff --git a/kicker/kicker/ui/extensionop_mnu.cpp b/kicker/kicker/ui/extensionop_mnu.cpp index a30434a48..582c44b46 100644 --- a/kicker/kicker/ui/extensionop_mnu.cpp +++ b/kicker/kicker/ui/extensionop_mnu.cpp @@ -59,7 +59,7 @@ PanelExtensionOpMenu::PanelExtensionOpMenu(const TQString& extension, int action if (!Kicker::the()->isImmutable() && (actions & KPanelExtension::Preferences)) { insertSeparator(); - insertItem(SmallIcon("configure"), i18n("&Configure %1...").arg(extension), Preferences); + insertItem(SmallIcon("configure"), i18n("&Configure %1...").tqarg(extension), Preferences); } adjustSize(); diff --git a/kicker/kicker/ui/extensionop_mnu.h b/kicker/kicker/ui/extensionop_mnu.h index 01bda4340..a1fa63cd6 100644 --- a/kicker/kicker/ui/extensionop_mnu.h +++ b/kicker/kicker/ui/extensionop_mnu.h @@ -26,7 +26,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <tqpopupmenu.h> -class PanelExtensionOpMenu : public QPopupMenu +class PanelExtensionOpMenu : public TQPopupMenu { public: enum OpButton{Move = 9900, Remove = 9901, Help = 9902, About = 9903, Preferences = 9904, ReportBug = 9905, Shade = 9906 }; diff --git a/kicker/kicker/ui/flipscrollview.cpp b/kicker/kicker/ui/flipscrollview.cpp index ae96ebcaa..fb5cfd422 100644 --- a/kicker/kicker/ui/flipscrollview.cpp +++ b/kicker/kicker/ui/flipscrollview.cpp @@ -57,7 +57,7 @@ void BackFrame::drawContents( TQPainter *p ) { TQColor gray( 230, 230, 230 ); if ( mouse_inside ) - p->fillRect( 3, 3, width() - 6, height() - 6, colorGroup().color( TQColorGroup::Highlight ) ); + p->fillRect( 3, 3, width() - 6, height() - 6, tqcolorGroup().color( TQColorGroup::Highlight ) ); else p->fillRect( 3, 3, width() - 6, height() - 6, gray ); p->setPen( gray.dark(110) ); @@ -270,7 +270,7 @@ void FlipScrollView::slotScrollTimer() if (!mSelectMenuPath.isEmpty()) { if (mSelectMenuPath=="kicker:/goup/") { currentView()->setSelected(currentView()->firstChild(),true); - currentView()->firstChild()->repaint(); + currentView()->firstChild()->tqrepaint(); } else { TQListViewItem * child = currentView()->firstChild(); @@ -278,8 +278,8 @@ void FlipScrollView::slotScrollTimer() KMenuItem* kitem = dynamic_cast<KMenuItem*>(child); if (kitem && kitem->menuPath()==mSelectMenuPath) { currentView()->setSelected(child,true); - kdDebug() << "child repaint\n"; - child->repaint(); + kdDebug() << "child tqrepaint\n"; + child->tqrepaint(); break; } child = child->nextSibling(); diff --git a/kicker/kicker/ui/hidebutton.cpp b/kicker/kicker/ui/hidebutton.cpp index a73e0a48d..58bde0457 100644 --- a/kicker/kicker/ui/hidebutton.cpp +++ b/kicker/kicker/ui/hidebutton.cpp @@ -51,22 +51,22 @@ void HideButton::drawButton(TQPainter *p) { if (m_arrow == Qt::LeftArrow) { - p->setPen(colorGroup().mid()); + p->setPen(tqcolorGroup().mid()); p->drawLine(width()-1, 0, width()-1, height()); } else if (m_arrow == Qt::RightArrow) { - p->setPen(colorGroup().mid()); + p->setPen(tqcolorGroup().mid()); p->drawLine(0, 0, 0, height()); } else if (m_arrow == Qt::UpArrow) { - p->setPen(colorGroup().mid()); + p->setPen(tqcolorGroup().mid()); p->drawLine(0, height()-1, width(), height()-1); } else if (m_arrow == Qt::DownArrow) { - p->setPen(colorGroup().mid()); + p->setPen(tqcolorGroup().mid()); p->drawLine(0, 0, width(), 0); } @@ -138,7 +138,7 @@ void HideButton::generateIcons() } TQImage image = pixmap()->convertToImage(); - image = image.smoothScale(size() - TQSize(4, 4), TQImage::ScaleMin); + image = image.smoothScale(size() - TQSize(4, 4), TQ_ScaleMin); KIconEffect effect; @@ -173,14 +173,14 @@ void HideButton::slotIconChanged(int group) } generateIcons(); - repaint(false); + tqrepaint(false); } void HideButton::enterEvent(TQEvent *e) { m_highlight = true; - repaint(false); + tqrepaint(false); TQButton::enterEvent(e); } @@ -188,7 +188,7 @@ void HideButton::leaveEvent(TQEvent *e) { m_highlight = false; - repaint(false); + tqrepaint(false); TQButton::enterEvent(e); } diff --git a/kicker/kicker/ui/hidebutton.h b/kicker/kicker/ui/hidebutton.h index 9a6c4612e..bb68929a1 100644 --- a/kicker/kicker/ui/hidebutton.h +++ b/kicker/kicker/ui/hidebutton.h @@ -23,7 +23,7 @@ #include <tqbutton.h> #include <tqpixmap.h> -class HideButton : public QButton +class HideButton : public TQButton { Q_OBJECT diff --git a/kicker/kicker/ui/itemview.cpp b/kicker/kicker/ui/itemview.cpp index dcb4760c1..d7df05170 100644 --- a/kicker/kicker/ui/itemview.cpp +++ b/kicker/kicker/ui/itemview.cpp @@ -99,16 +99,16 @@ static double pointSize( double pixelSize, TQPaintDevice *w ) static int pixelSize( double pixelSize, TQPaintDevice *w ) { - return qRound( pixelSize * TQPaintDevice::x11AppDpiY( w->x11Screen () ) / 72. ); + return tqRound( pixelSize * TQPaintDevice::x11AppDpiY( w->x11Screen () ) / 72. ); } void KMenuItem::init() { setMultiLinesEnabled(true); m_s = 0; - m_path = TQString::null; - m_icon = TQString::null; - m_menuPath = TQString::null; + m_path = TQString(); + m_icon = TQString(); + m_menuPath = TQString(); setDragEnabled(true); m_has_children = false; m_old_width = -1; @@ -145,28 +145,28 @@ void KMenuItem::setIcon(const TQString& icon, int size) void KMenuItem::setHasChildren( bool flag ) { m_has_children = flag; - repaint(); + tqrepaint(); } void KMenuItem::setup() { // if someone configured a larger generalFont than 10pt, he might have a _real_ problem with 7pt // the 7pt could be read out of konquerorrc I guess - float min_font_size = 7. * QMAX(1., KGlobalSettings::generalFont().pointSizeFloat() / 10.); + float min_font_size = 7. * TQMAX(1., KGlobalSettings::generalFont().pointSizeFloat() / 10.); const int expected_height = 38; - description_font_size = QMAX( pointSize( expected_height * .3, listView() ) + KickerSettings::kickoffFontPointSizeOffset(), min_font_size ) ; - title_font_size = QMAX( pointSize( expected_height * .25, listView() ) + KickerSettings::kickoffFontPointSizeOffset(), min_font_size + 1 ); + description_font_size = TQMAX( pointSize( expected_height * .3, TQT_TQPAINTDEVICE(listView()) ) + KickerSettings::kickoffFontPointSizeOffset(), min_font_size ) ; + title_font_size = TQMAX( pointSize( expected_height * .25, TQT_TQPAINTDEVICE(listView()) ) + KickerSettings::kickoffFontPointSizeOffset(), min_font_size + 1 ); //kdDebug() << description_font_size << " " << title_font_size << " " << pointSize( expected_height * .25, listView() ) << endl; TQListViewItem::setup(); - setHeight( (int)QMAX( expected_height, pixelSize( title_font_size + description_font_size * 2.3, listView()))); + setHeight( (int)TQMAX( expected_height, pixelSize( title_font_size + description_font_size * 2.3, TQT_TQPAINTDEVICE(listView())))); } void KMenuItem::paintCell(TQPainter* p, const TQColorGroup & cg, int column, int width, int align) { ItemView *listview = static_cast<ItemView*>( listView() ); - int bottom = listView()->itemRect( this ).bottom(); + int bottom = listView()->tqitemRect( this ).bottom(); int diff = bottom - listView()->viewport()->height(); KPixmap pm; @@ -197,7 +197,7 @@ void KMenuItem::paintCell(TQPainter* p, const TQColorGroup & cg, int column, int else listview->m_lastOne = static_cast<KMenuItem*>( itemBelow() ); listview->m_old_contentY = -1; - repaint(); + tqrepaint(); } } } @@ -275,7 +275,7 @@ void KMenuItem::paintCellInter(TQPainter* p, const TQColorGroup & cg, int column if ( m_description.isEmpty() ) spacing = ( height() - f1h ) / 2; - int right_triangle_size = pixelSize( 7, listView() ); + int right_triangle_size = pixelSize( 7, TQT_TQPAINTDEVICE(listView()) ); int right_margin = listView()->verticalScrollBar()->width(); if ( m_has_children ) @@ -315,7 +315,7 @@ void KMenuItem::paintCellInter(TQPainter* p, const TQColorGroup & cg, int column pp.fillRect( 0, 0, off.width(), off.height(), backg ); TQColor myColor = cg.color( TQColorGroup::Text ).light( 200 ); - if ( qGray( myColor.rgb() ) == 0 ) + if ( tqGray( myColor.rgb() ) == 0 ) myColor = TQColor( 100, 100, 110 ); pp.setPen( myColor ); pp.setPen( isSelected() ? cg.color( TQColorGroup::Mid ) : myColor ); @@ -350,7 +350,7 @@ void KMenuItem::paintCellInter(TQPainter* p, const TQColorGroup & cg, int column { // the listview caches paint events m_old_width = width; - repaint(); + tqrepaint(); } } @@ -371,9 +371,9 @@ void KMenuItemSeparator::setup() TQFontMetrics fm(f); f.setPointSize( 8 + KickerSettings::kickoffFontPointSizeOffset() ); if ( itemAbove() && !text( 0 ).isEmpty() ) - setHeight( (int)QMAX( 34., fm.height() * 1.4) ); + setHeight( (int)TQMAX( 34., fm.height() * 1.4) ); else - setHeight( (int)QMAX( 26., fm.height() * 1.4 ) ); + setHeight( (int)TQMAX( 26., fm.height() * 1.4 ) ); } void KMenuItemSeparator::setLink( const TQString &text, const TQString &url ) @@ -385,7 +385,7 @@ void KMenuItemSeparator::setLink( const TQString &text, const TQString &url ) bool KMenuItemSeparator::hitsLink( const TQPoint &pos ) { - return m_link_rect.contains( pos ); + return m_link_rect.tqcontains( pos ); } void KMenuItemSeparator::preparePixmap( int width ) @@ -424,7 +424,7 @@ void KMenuItemSeparator::paintCell(TQPainter* p, const TQColorGroup & cg, int co f.setPointSize( 8 + KickerSettings::kickoffFontPointSizeOffset() ); p->setFont( f ); TQColor myColor = cg.color( TQColorGroup::Text ).light( 200 ); - if ( qGray( myColor.rgb() ) == 0 ) + if ( tqGray( myColor.rgb() ) == 0 ) myColor = TQColor( 100, 100, 110 ); p->setPen( myColor ); int twidth = p->fontMetrics().width(text(0)); @@ -501,7 +501,7 @@ void KMenuItemHeader::setup() KMenuItem::setup(); TQFontMetrics fm( listView()->font() ); - setHeight( QMAX( int( texts.count() * fm.height() + ( texts.count() + 1 ) * 2 + 10 ), height()) ); + setHeight( TQMAX( int( texts.count() * fm.height() + ( texts.count() + 1 ) * 2 + 10 ), height()) ); // nada } @@ -528,7 +528,7 @@ void KMenuItemHeader::paintCell(TQPainter* p, const TQColorGroup & cg, int , int int r = left_margin + margin * 2; const int min_font_size = 7; - int title_font_pixelSize = qRound( pixelSize( QMAX( pointSize( 12, listView() ) + KickerSettings::kickoffFontPointSizeOffset(), min_font_size + 1 ), listView() ) ); + int title_font_pixelSize = tqRound( pixelSize( TQMAX( pointSize( 12, TQT_TQPAINTDEVICE(listView()) ) + KickerSettings::kickoffFontPointSizeOffset(), min_font_size + 1 ), TQT_TQPAINTDEVICE(listView()) ) ); TQFont f1 = p->font(); f1.setPixelSize( title_font_pixelSize ); @@ -538,7 +538,7 @@ void KMenuItemHeader::paintCell(TQPainter* p, const TQColorGroup & cg, int , int p->setPen( cg.color( TQColorGroup::Text ) ); const int text_margin = 2; - int spacing = ( height() - texts.count() * f1h - QMAX( texts.count() - 1, 0 ) * text_margin ) / 2; + int spacing = ( height() - texts.count() * f1h - TQMAX( texts.count() - 1, 0 ) * text_margin ) / 2; for ( uint i = 0; i < texts.count(); ++i ) { @@ -608,7 +608,7 @@ void ItemViewTip::maybeTip( const TQPoint &pos ) if ( item->toolTip().isNull() ) return; - TQRect r = view->itemRect( item ); + TQRect r = view->tqitemRect( item ); int headerPos = view->header()->sectionPos( 0 ); r.setLeft( headerPos ); r.setRight( headerPos + view->header()->sectionSize( 0 ) ); @@ -632,7 +632,7 @@ ItemView::ItemView(TQWidget* parent, const char* name) setItemMargin(0); setSorting(-1); setTreeStepSize(38); - setFocusPolicy(TQWidget::NoFocus); + setFocusPolicy(TQ_NoFocus); m_lastOne = 0; m_old_contentY = -1; @@ -715,7 +715,7 @@ KMenuItem* ItemView::insertItem( const TQString& icon, const TQString& text, con KMenuItem* ItemView::insertItem( const TQString& icon, const TQString& text, const TQString& description, int nId, int nIndex, KMenuItem *parent) { - return insertItem( icon, text, description, TQString::null, nId, nIndex, parent); + return insertItem( icon, text, description, TQString(), nId, nIndex, parent); } int ItemView::setItemEnabled(int id, bool enabled) @@ -761,8 +761,8 @@ void ItemView::slotMoveContent() int item_height = 0; TQListViewItemIterator it( this ); while ( it.current() ) { - if ( !dynamic_cast<KMenuSpacer*>( it.current() ) && !it.current()->parent() && it.current()->isVisible() ) { - it.current()->invalidateHeight(); + if ( !dynamic_cast<KMenuSpacer*>( it.current() ) && !it.current()->tqparent() && it.current()->isVisible() ) { + it.current()->tqinvalidateHeight(); item_height += it.current()->totalHeight(); } ++it; @@ -915,7 +915,7 @@ void ItemView::contentsMousePressEvent ( TQMouseEvent * e ) KMenuItemSeparator *si = dynamic_cast<KMenuItemSeparator*>( itemAt( vp ) ); if ( si ) { - if ( si->hitsLink( vp - itemRect(si).topLeft() ) ) + if ( si->hitsLink( vp - tqitemRect(si).topLeft() ) ) emit startURL( si->linkUrl() ); } } @@ -928,7 +928,7 @@ void ItemView::contentsMouseMoveEvent(TQMouseEvent *e) bool link_cursor = false; KMenuItemSeparator *si = dynamic_cast<KMenuItemSeparator*>( i ); if ( si ) - link_cursor = si->hitsLink( vp - itemRect(si).topLeft() ); + link_cursor = si->hitsLink( vp - tqitemRect(si).topLeft() ); if (i && !i->isSelectable() && !link_cursor) { unsetCursor(); @@ -941,7 +941,7 @@ void ItemView::contentsMouseMoveEvent(TQMouseEvent *e) if (m_mouseMoveSelects) { if(i && i->isEnabled() && !i->isSelected() && // FIXME: This is wrong if you drag over the items. - (e->state() & (LeftButton|MidButton|RightButton)) == 0) + (e->state() & (Qt::LeftButton|Qt::MidButton|Qt::RightButton)) == 0) KListView::setSelected(i, true); else if (!i && selectedItem()) KListView::setSelected(selectedItem(), false); @@ -965,7 +965,7 @@ void ItemView::resizeEvent ( TQResizeEvent * e ) { KListView::resizeEvent( e ); // if ( m_lastOne ) -// int diff = itemRect( m_lastOne ).bottom() - viewport()->height(); +// int diff = tqitemRect( m_lastOne ).bottom() - viewport()->height(); } void ItemView::viewportPaintEvent ( TQPaintEvent * pe ) @@ -975,7 +975,7 @@ void ItemView::viewportPaintEvent ( TQPaintEvent * pe ) if ( m_lastOne && m_old_contentY != contentsY() ) { m_old_contentY = contentsY(); - m_lastOne->repaint(); + m_lastOne->tqrepaint(); } } @@ -984,7 +984,7 @@ void ItemView::clear() KListView::clear(); m_lastOne = 0; m_old_contentY = -1; - m_back_url = TQString::null; + m_back_url = TQString(); } void ItemView::contentsWheelEvent(TQWheelEvent *e) @@ -996,7 +996,7 @@ void ItemView::contentsWheelEvent(TQWheelEvent *e) if(i && i->isEnabled() && !i->isSelected() && // FIXME: This is wrong if you drag over the items. - (e->state() & (LeftButton|MidButton|RightButton)) == 0) + (e->state() & (Qt::LeftButton|Qt::MidButton|Qt::RightButton)) == 0) KListView::setSelected(i, true); else if (!i && selectedItem()) KListView::setSelected(selectedItem(), false); @@ -1022,14 +1022,14 @@ TQDragObject * ItemView::dragObject() TQBitmap mask; - if (pix.mask()) - mask = *pix.mask(); + if (pix.tqmask()) + mask = *pix.tqmask(); else { mask.resize(pix.size()); mask.fill(Qt::color1); } - bitBlt( &mask, pix.width()-add.width(), pix.height()-add.height(), add.mask(), 0, 0, add.width(), add.height(), OrROP ); + bitBlt( &mask, pix.width()-add.width(), pix.height()-add.height(), add.tqmask(), 0, 0, add.width(), add.height(), OrROP ); pix.setMask( mask ); o->setPixmap(pix); @@ -1052,7 +1052,7 @@ TQDragObject * ItemView::dragObject() else if(!kitem->path().isEmpty() && !kitem->path().startsWith("kicker:/") && !kitem->path().startsWith("kaddressbook:/")) { TQString uri = kitem->path(); - if (uri.startsWith(locateLocal("data", TQString::fromLatin1("RecentDocuments/")))) { + if (uri.startsWith(locateLocal("data", TQString::tqfromLatin1("RecentDocuments/")))) { KDesktopFile df(uri,true); uri=df.readURL(); } @@ -1070,7 +1070,7 @@ int ItemView::goodHeight() int item_height = 0; TQListViewItemIterator it( this ); while ( it.current() ) { - if ( !dynamic_cast<KMenuSpacer*>( it.current() ) && !it.current()->parent() && it.current()->isVisible() ) { + if ( !dynamic_cast<KMenuSpacer*>( it.current() ) && !it.current()->tqparent() && it.current()->isVisible() ) { item_height += it.current()->height(); } ++it; @@ -1087,7 +1087,7 @@ KMenuItemDrag::KMenuItemDrag(KMenuItem& item, TQWidget *dragSource) buff.open(IO_WriteOnly); TQDataStream s(&buff); - s << item.id() << (item.service() ? item.service()->storageId() : TQString::null) + s << item.id() << (item.service() ? item.service()->storageId() : TQString()) << item.title() << item.description() << item.icon() << item.path(); } @@ -1103,7 +1103,7 @@ const char * KMenuItemDrag::format(int i) const return 0; } -TQByteArray KMenuItemDrag::encodedData(const char* mimeType) const +TQByteArray KMenuItemDrag::tqencodedData(const char* mimeType) const { if (TQString("application/kmenuitem") == mimeType) return a; @@ -1138,7 +1138,7 @@ bool ItemView::acceptDrag (TQDropEvent* event) const bool KMenuItemDrag::decode(const TQMimeSource* e, KMenuItemInfo& item) { - TQByteArray a = e->encodedData("application/kmenuitem"); + TQByteArray a = e->tqencodedData("application/kmenuitem"); if (a.isEmpty()) { TQStringList l; @@ -1162,7 +1162,7 @@ bool KMenuItemDrag::decode(const TQMimeSource* e, KMenuItemInfo& item) item.m_title = item.m_path; item.m_icon = KMimeType::iconForURL( url ); item.m_title = item.m_path.section( '/', -1, -1 ); - int last_slash = url.findRev ('/', -1); + int last_slash = url.tqfindRev ('/', -1); if (last_slash == 0) item.m_description = i18n("Directory: /)"); else @@ -1205,13 +1205,13 @@ bool FavoritesItemView::acceptDrag (TQDropEvent* event) const TQStringList favs = KickerSettings::favorites(); if (item.m_s) - return favs.find(item.m_s->storageId())==favs.end(); + return favs.tqfind(item.m_s->storageId())==favs.end(); else { TQStringList::Iterator it; TQString uri = item.m_path; - if (uri.startsWith(locateLocal("data", TQString::fromLatin1("RecentDocuments/")))) { + if (uri.startsWith(locateLocal("data", TQString::tqfromLatin1("RecentDocuments/")))) { KDesktopFile df(uri,true); uri=df.readURL(); } @@ -1219,7 +1219,7 @@ bool FavoritesItemView::acceptDrag (TQDropEvent* event) const for (it = favs.begin(); it != favs.end(); ++it) { if ((*it)[0]=='/') { KDesktopFile df((*it),true); - if (df.readURL().replace("file://",TQString::null)==uri) + if (df.readURL().tqreplace("file://",TQString())==uri) break; } } @@ -1233,15 +1233,15 @@ bool FavoritesItemView::acceptDrag (TQDropEvent* event) const TQStringList favs = KickerSettings::favorites(); if (text.endsWith(".desktop")) { - KService::Ptr p = KService::serviceByDesktopPath(text.replace("file://",TQString::null)); - return (p && favs.find(p->storageId())==favs.end()); + KService::Ptr p = KService::serviceByDesktopPath(text.tqreplace("file://",TQString())); + return (p && favs.tqfind(p->storageId())==favs.end()); } else { TQStringList::Iterator it; for (it = favs.begin(); it != favs.end(); ++it) { if ((*it)[0]=='/') { KDesktopFile df((*it),true); - if (df.readURL().replace("file://",TQString::null)==text) + if (df.readURL().tqreplace("file://",TQString())==text) break; } } diff --git a/kicker/kicker/ui/itemview.h b/kicker/kicker/ui/itemview.h index c8b95ee42..2a6b7e68b 100644 --- a/kicker/kicker/ui/itemview.h +++ b/kicker/kicker/ui/itemview.h @@ -248,7 +248,7 @@ class KMenuItemDrag : public TQDragObject ~KMenuItemDrag(); virtual const char * format(int i = 0) const; - virtual TQByteArray encodedData(const char *) const; + virtual TQByteArray tqencodedData(const char *) const; static bool canDecode(const TQMimeSource * e); static bool decode(const TQMimeSource* e, KMenuItemInfo& item); diff --git a/kicker/kicker/ui/k_mnu.cpp b/kicker/kicker/ui/k_mnu.cpp index 0506201f5..d2952d93a 100644 --- a/kicker/kicker/ui/k_mnu.cpp +++ b/kicker/kicker/ui/k_mnu.cpp @@ -94,7 +94,7 @@ PanelKMenu::PanelKMenu() "slotServiceStartedByStorageId(TQString,TQString)", false); displayRepairTimer = new TQTimer( this ); - connect( displayRepairTimer, SIGNAL(timeout()), this, SLOT(repairDisplay()) ); + connect( displayRepairTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(repairDisplay()) ); } PanelKMenu::~PanelKMenu() @@ -125,7 +125,7 @@ void PanelKMenu::hideMenu() while (isShown() == true) kapp->eventLoop()->processEvents(1000); TQTimer *windowtimer = new TQTimer( this ); - connect( windowtimer, SIGNAL(timeout()), this, SLOT(windowClearTimeout()) ); + connect( windowtimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(windowClearTimeout()) ); windowTimerTimedOut = false; windowtimer->start( 0, TRUE ); // Wait for all window system events to be processed while (windowTimerTimedOut == false) @@ -138,7 +138,7 @@ void PanelKMenu::hideMenu() // thereby removing a bad shutdown screen artifact while still providing // a somewhat snappy user interface. TQTimer *delaytimer = new TQTimer( this ); - connect( delaytimer, SIGNAL(timeout()), this, SLOT(windowClearTimeout()) ); + connect( delaytimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(windowClearTimeout()) ); windowTimerTimedOut = false; delaytimer->start( 100, TRUE ); // Wait for 100 milliseconds while (windowTimerTimedOut == false) @@ -207,7 +207,7 @@ void PanelKMenu::paletteChanged() if (!loadSidePixmap()) { sidePixmap = sideTilePixmap = TQPixmap(); - setMinimumSize( sizeHint() ); + setMinimumSize( tqsizeHint() ); } } @@ -261,7 +261,7 @@ void PanelKMenu::initialize() TQHBox* hbox = new TQHBox( this ); KToolBarButton *clearButton = new KToolBarButton( "locationbar_erase", 0, hbox ); searchEdit = new KPIM::ClickLineEdit(hbox, " "+i18n("Press '/' to search...")); - hbox->setFocusPolicy(TQWidget::StrongFocus); + hbox->setFocusPolicy(TQ_StrongFocus); hbox->setFocusProxy(searchEdit); hbox->setSpacing( 3 ); connect(clearButton, TQT_SIGNAL(clicked()), searchEdit, TQT_SLOT(clear())); @@ -415,10 +415,10 @@ void PanelKMenu::repairDisplay(void) { displayRepairTimer->stop(); // Now do a nasty hack to prevent search bar merging into the side image - // This forces a layout/repaint of the qpopupmenu - repaint(); // This ensures that the side bar image was applied - styleChange(style()); // This forces a call to the private function updateSize(TRUE) inside the qpopupmenu. - update(); // This repaints the entire popup menu to apply the widget size/alignment changes made above + // This forces a layout/tqrepaint of the qpopupmenu + tqrepaint(); // This ensures that the side bar image was applied + styleChange(tqstyle()); // This forces a call to the private function updateSize(TRUE) inside the qpopupmenu. + update(); // This tqrepaints the entire popup menu to apply the widget size/tqalignment changes made above } } @@ -444,7 +444,7 @@ void PanelKMenu::slotLock() TQCString appname( "kdesktop" ); if ( kicker_screen_number ) appname.sprintf("kdesktop-screen-%d", kicker_screen_number); - kapp->dcopClient()->send(appname, "KScreensaverIface", "lock()", ""); + kapp->dcopClient()->send(appname, "KScreensaverIface", "lock()", TQString("")); } void PanelKMenu::slotLogout() @@ -493,7 +493,7 @@ void PanelKMenu::slotSessionActivated( int ent ) void PanelKMenu::doNewSession( bool lock ) { int result = KMessageBox::warningContinueCancel( - kapp->desktop()->screen(kapp->desktop()->screenNumber(this)), + TQT_TQWIDGET(kapp->desktop()->screen(kapp->desktop()->screenNumber(this))), i18n("<p>You have chosen to open another desktop session.<br>" "The current session will be hidden " "and a new login screen will be displayed.<br>" @@ -579,7 +579,7 @@ void PanelKMenu::showMenu() TQRect PanelKMenu::sideImageRect() { - return TQStyle::visualRect( TQRect( frameWidth(), frameWidth(), sidePixmap.width(), + return TQStyle::tqvisualRect( TQRect( frameWidth(), frameWidth(), sidePixmap.width(), height() - 2*frameWidth() ), this ); } @@ -590,21 +590,21 @@ void PanelKMenu::resizeEvent(TQResizeEvent * e) PanelServiceMenu::resizeEvent(e); - setFrameRect( TQStyle::visualRect( TQRect( sidePixmap.width(), 0, + setFrameRect( TQStyle::tqvisualRect( TQRect( sidePixmap.width(), 0, width() - sidePixmap.width(), height() ), this ) ); } //Workaround Qt3.3.x sizing bug, by ensuring we're always wide enough. void PanelKMenu::resize(int width, int height) { - width = kMax(width, maximumSize().width()); + width = kMax(width, tqmaximumSize().width()); PanelServiceMenu::resize(width, height); } -TQSize PanelKMenu::sizeHint() const +TQSize PanelKMenu::tqsizeHint() const { - TQSize s = PanelServiceMenu::sizeHint(); -// kdDebug(1210) << "PanelKMenu::sizeHint()" << endl; + TQSize s = PanelServiceMenu::tqsizeHint(); +// kdDebug(1210) << "PanelKMenu::tqsizeHint()" << endl; // kdDebug(1210) << s.width() << ", " << s.height() << endl; return s; } @@ -619,9 +619,9 @@ void PanelKMenu::paintEvent(TQPaintEvent * e) TQPainter p(this); p.setClipRegion(e->region()); - style().drawPrimitive( TQStyle::PE_PanelPopup, &p, + tqstyle().tqdrawPrimitive( TQStyle::PE_PanelPopup, &p, TQRect( 0, 0, width(), height() ), - colorGroup(), TQStyle::Style_Default, + tqcolorGroup(), TQStyle::Style_Default, TQStyleOption( frameWidth(), 0 ) ); TQRect r = sideImageRect(); @@ -648,7 +648,7 @@ TQMouseEvent PanelKMenu::translateMouseEvent( TQMouseEvent* e ) { TQRect side = sideImageRect(); - if ( !side.contains( e->pos() ) ) + if ( !side.tqcontains( e->pos() ) ) return *e; TQPoint newpos( e->pos() ); diff --git a/kicker/kicker/ui/k_mnu.h b/kicker/kicker/ui/k_mnu.h index 16655bdd6..d91ddf032 100644 --- a/kicker/kicker/ui/k_mnu.h +++ b/kicker/kicker/ui/k_mnu.h @@ -59,7 +59,7 @@ public: int insertClientMenu(KickerClientMenu *p); void removeClientMenu(int id); - virtual TQSize sizeHint() const; + virtual TQSize tqsizeHint() const; virtual void setMinimumSize(const TQSize &); virtual void setMaximumSize(const TQSize &); virtual void setMinimumSize(int, int); diff --git a/kicker/kicker/ui/k_mnu_stub.cpp b/kicker/kicker/ui/k_mnu_stub.cpp index b02d2bcbf..16e755d48 100644 --- a/kicker/kicker/ui/k_mnu_stub.cpp +++ b/kicker/kicker/ui/k_mnu_stub.cpp @@ -97,11 +97,11 @@ void KMenuStub::resize(int w, int h) return m_w.panelkmenu->resize(w, h); } -TQSize KMenuStub::sizeHint() const +TQSize KMenuStub::tqsizeHint() const { if(m_type == t_KMenu) - return m_w.kmenu->sizeHint(); - return m_w.panelkmenu->sizeHint(); + return m_w.kmenu->tqsizeHint(); + return m_w.panelkmenu->tqsizeHint(); } bool KMenuStub::highlightMenuItem( const TQString &menuId ) diff --git a/kicker/kicker/ui/k_mnu_stub.h b/kicker/kicker/ui/k_mnu_stub.h index 362d132b2..17fe92b7c 100644 --- a/kicker/kicker/ui/k_mnu_stub.h +++ b/kicker/kicker/ui/k_mnu_stub.h @@ -53,7 +53,7 @@ public: void popup(const TQPoint &pos, int indexAtPoint = -1); void selectFirstItem(); void resize(int, int); - TQSize sizeHint() const; + TQSize tqsizeHint() const; bool highlightMenuItem( const TQString &menuId ); void clearRecentMenuItems(); void initialize(); diff --git a/kicker/kicker/ui/k_new_mnu.cpp b/kicker/kicker/ui/k_new_mnu.cpp index a2a8cb2fc..3fa259189 100644 --- a/kicker/kicker/ui/k_new_mnu.cpp +++ b/kicker/kicker/ui/k_new_mnu.cpp @@ -141,12 +141,12 @@ static TQString workaroundStringFreeze(const TQString& str) { TQString s = str; - s.replace("<u>","&"); + s.tqreplace("<u>","&"); TQRegExp re("<[^>]+>"); re.setMinimal(true); re.setCaseSensitive(false); - s.replace(re, ""); + s.tqreplace(re, ""); s = s.simplifyWhiteSpace(); return s; @@ -168,7 +168,7 @@ static int used_size( TQLabel *label, int oldsize ) KMenu::KMenu() : KMenuBase(0, "SUSE::Kickoff::KMenu") , m_sloppyTimer(0, "KNewMenu::sloppyTimer"), m_mediaFreeTimer(0, "KNewMenu::mediaFreeTimer"), - m_iconName(TQString::null), m_orientation(UnDetermined), m_search_plugin( 0 ) + m_iconName(TQString()), m_orientation(UnDetermined), m_search_plugin( 0 ) { setMouseTracking(true); connect(&m_sloppyTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotSloppyTimeout())); @@ -194,7 +194,7 @@ KMenu::KMenu() m_userInfo->setBackgroundMode( PaletteBase ); TQColor userInfoColor = TQApplication::palette().color( TQPalette::Normal, TQColorGroup::Mid ); - if ( qGray( userInfoColor.rgb() ) > 120 ) + if ( tqGray( userInfoColor.rgb() ) > 120 ) userInfoColor = userInfoColor.dark( 200 ); else userInfoColor = userInfoColor.light( 200 ); @@ -296,13 +296,13 @@ KMenu::KMenu() m_searchResultsWidget->setItemMargin(4); m_searchResultsWidget->setIconSize(16); m_searchActions = new ItemView (m_searchWidget, "m_searchActions"); - m_searchActions->setFocusPolicy(TQWidget::NoFocus); + m_searchActions->setFocusPolicy(TQ_NoFocus); m_searchActions->setItemMargin(4); m_searchInternet = new TQListViewItem(m_searchActions, i18n("Search Internet")); m_searchInternet->setPixmap(0,icon); setTabOrder(m_kcommand, m_searchResultsWidget); - m_kerryInstalled = !KStandardDirs::findExe(TQString::fromLatin1("kerry")).isEmpty(); + m_kerryInstalled = !KStandardDirs::findExe(TQString::tqfromLatin1("kerry")).isEmpty(); m_isShowing = false; if (!m_kerryInstalled) { @@ -421,11 +421,11 @@ void KMenu::setupUi() { m_stacker = new TQWidgetStack( this, "m_stacker" ); m_stacker->setGeometry( TQRect( 90, 260, 320, 220 ) ); - m_stacker->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)3, 1, 1, m_stacker->sizePolicy().hasHeightForWidth() ) ); + m_stacker->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)3, 1, 1, m_stacker->sizePolicy().hasHeightForWidth() ) ); m_stacker->setPaletteBackgroundColor( TQColor( 255, 255, 255 ) ); - // m_stacker->setFocusPolicy( TQWidget::StrongFocus ); + // m_stacker->setFocusPolicy( TQ_StrongFocus ); m_stacker->setLineWidth( 0 ); - m_stacker->setFocusPolicy(TQWidget::NoFocus); + m_stacker->setFocusPolicy(TQ_NoFocus); connect(m_stacker, TQT_SIGNAL(aboutToShow(TQWidget*)), TQT_SLOT(stackWidgetRaised(TQWidget*))); m_kcommand->setName("m_kcommand"); @@ -453,16 +453,16 @@ bool KMenu::eventFilter ( TQObject * receiver, TQEvent* e) TQPoint p; if (e->type() == TQEvent::MouseMove || e->type() == TQEvent::MouseButtonPress) { - TQMouseEvent* me = static_cast<TQMouseEvent*>(e); + TQMouseEvent* me = TQT_TQMOUSEEVENT(e); p = me->globalPos(); } else if (e->type() == TQEvent::Wheel) { - TQWheelEvent* we = static_cast<TQWheelEvent*>(e); + TQWheelEvent* we = TQT_TQWHEELEVENT(e); p = we->globalPos(); } while (receiver) { - if (receiver == m_tabBar && (e->type()!=TQEvent::MouseMove || KickerSettings::kickoffSwitchTabsOnHover() ) ) { + if (TQT_BASE_OBJECT(receiver) == TQT_BASE_OBJECT(m_tabBar) && (e->type()!=TQEvent::MouseMove || KickerSettings::kickoffSwitchTabsOnHover() ) ) { TQTab* s = m_tabBar->selectTab(m_tabBar->mapFromGlobal(p)); if (s && s->identifier() == ApplicationsTab) raiseWidget = m_browserView; @@ -482,8 +482,8 @@ bool KMenu::eventFilter ( TQObject * receiver, TQEvent* e) /* we do not want hover activation for the search line edit as this can be * pretty disturbing */ - if ( (receiver == m_searchPixmap || - ( ( receiver == m_searchLabel || receiver==m_kcommand->lineEdit() ) && + if ( (TQT_BASE_OBJECT(receiver) == TQT_BASE_OBJECT(m_searchPixmap) || + ( ( TQT_BASE_OBJECT(receiver) == TQT_BASE_OBJECT(m_searchLabel) || TQT_BASE_OBJECT(receiver)==TQT_BASE_OBJECT(m_kcommand->lineEdit()) ) && ( e->type() == TQEvent::KeyPress || e->type() == TQEvent::Wheel || e->type() == TQEvent::MouseButtonPress ) ) ) && !m_isShowing) { @@ -495,34 +495,34 @@ bool KMenu::eventFilter ( TQObject * receiver, TQEvent* e) if(raiseWidget) break; if(receiver->isWidgetType()) - receiver = static_cast<TQWidget*>(receiver)->parentWidget(true); + receiver = TQT_TQOBJECT(TQT_TQWIDGET(receiver)->tqparentWidget(true)); else break; } if (e->type() == TQEvent::FocusIn && receiver && raiseWidget) { - m_searchResultsWidget->setFocusPolicy(TQWidget::StrongFocus); + m_searchResultsWidget->setFocusPolicy(TQ_StrongFocus); m_searchActions->setFocusPolicy(raiseWidget == m_searchWidget ? - TQWidget::StrongFocus : TQWidget::NoFocus); + TQ_StrongFocus : TQ_NoFocus); setTabOrder(raiseWidget, m_searchResultsWidget); if (raiseWidget != m_stacker->visibleWidget() - && static_cast<TQWidget*>(receiver)->focusPolicy() == TQWidget::NoFocus + && TQT_TQWIDGET(receiver)->focusPolicy() == TQ_NoFocus && m_stacker->id(raiseWidget) >= 0) { m_stacker->raiseWidget(raiseWidget); return true; } - if (raiseWidget->focusPolicy() != TQWidget::NoFocus) + if (raiseWidget->focusPolicy() != TQ_NoFocus) return false; } - if (m_sloppyRegion.contains(p)) { + if (m_sloppyRegion.tqcontains(p)) { if (e->type() == TQEvent::MouseButtonPress /*&& m_sloppyTimer.isActive()*/) m_sloppySourceClicked = true; if (!m_sloppyTimer.isActive() || m_sloppySource != raiseRect) { - int timeout= style().styleHint(TQStyle::SH_PopupMenu_SubMenuPopupDelay); + int timeout= tqstyle().tqstyleHint(TQStyle::SH_PopupMenu_SubMenuPopupDelay); if (m_sloppySourceClicked) timeout = 3000; m_sloppyTimer.start(timeout); @@ -535,7 +535,7 @@ bool KMenu::eventFilter ( TQObject * receiver, TQEvent* e) } if(e->type() == TQEvent::Enter && receiver->isWidgetType()) { - static_cast<TQWidget*>(receiver)->setMouseTracking(true); + TQT_TQWIDGET(receiver)->setMouseTracking(true); TQToolTip::hide(); } @@ -562,7 +562,7 @@ bool KMenu::eventFilter ( TQObject * receiver, TQEvent* e) if (view) { bool handled = true; - switch (static_cast<TQKeyEvent*>(e)->key()) { + switch (TQT_TQKEYEVENT(e)->key()) { case Key_Up: if (view->selectedItem()) { view->setSelected(view->selectedItem()->itemAbove(),true); @@ -639,7 +639,7 @@ bool KMenu::eventFilter ( TQObject * receiver, TQEvent* e) r = true; } - if (e->type() == TQEvent::Enter && receiver == m_stacker) + if (e->type() == TQEvent::Enter && TQT_BASE_OBJECT(receiver) == TQT_BASE_OBJECT(m_stacker)) { TQRect r(m_stacker->mapToGlobal(TQPoint(-8,-32)), m_stacker->size()); r.setSize(r.size()+TQSize(16,128)); @@ -682,9 +682,9 @@ bool KMenu::eventFilter ( TQObject * receiver, TQEvent* e) void KMenu::slotSloppyTimeout() { - if (m_sloppyRegion.contains(TQCursor::pos()) && !m_sloppySource.isNull()) + if (m_sloppyRegion.tqcontains(TQCursor::pos()) && !m_sloppySource.isNull()) { - if ( m_sloppySource.contains(TQCursor::pos())) + if ( m_sloppySource.tqcontains(TQCursor::pos())) { m_stacker->raiseWidget(m_sloppyWidget); @@ -753,12 +753,12 @@ void KMenu::stackWidgetRaised(TQWidget* raiseWidget) if (raiseWidget == m_browserView) { if ( m_tabBar->currentTab() == ApplicationsTab) - slotGoSubMenu(TQString::null); + slotGoSubMenu(TQString()); if (m_browserDirty ) { createNewProgramList(); m_browserView->prepareRightMove(); m_browserView->currentView()->clear(); - fillSubMenu(TQString::null, m_browserView->currentView()); + fillSubMenu(TQString(), m_browserView->currentView()); m_browserDirty = false; } } @@ -828,7 +828,7 @@ void KMenu::paletteChanged() void KMenu::tabClicked(TQTab* t) { if (t==m_tabs[ApplicationsTab]) - slotGoSubMenu(TQString::null); + slotGoSubMenu(TQString()); else if (t==m_tabs[LeaveTab]) slotGoExitMainMenu(); } @@ -843,7 +843,7 @@ void KMenu::slotGoExitMainMenu() if (m_exitView->currentView()==m_exitView->rightView()) { m_exitView->prepareLeftMove(false); m_exitView->showBackButton(false); - m_exitView->flipScroll(TQString::null); + m_exitView->flipScroll(TQString()); } } @@ -882,13 +882,13 @@ void KMenu::slotGoExitSubMenu(const TQString& url) m_exitView->rightView()->insertItem( "switchuser", i18n( "Start New Session" ), i18n( "Start a parallel session" ), "kicker:/switchuser", nId++, index++ ); - m_exitView->rightView()->insertItem( "lock", i18n( "Lock Current && Start New Session").replace("&&","&"), + m_exitView->rightView()->insertItem( "lock", i18n( "Lock Current && Start New Session").tqreplace("&&","&"), i18n( "Lock screen and start a parallel session" ), "kicker:/switchuserafterlock", nId++, index++ ); SessList sess; if (DM().localSessions( sess )) { if (sess.count()>1) - m_exitView->rightView()->insertSeparator( nId++, TQString::null, index++ ); + m_exitView->rightView()->insertSeparator( nId++, TQString(), index++ ); for (SessList::ConstIterator it = sess.begin(); it != sess.end(); ++it) { if ((*it).vt && !(*it).self) { TQString user, loc; @@ -902,7 +902,7 @@ void KMenu::slotGoExitSubMenu(const TQString& url) m_exitView->rightView()->insertHeader( nId++, "kicker:/switchuser/" ); } - m_exitView->flipScroll(TQString::null); + m_exitView->flipScroll(TQString()); } void KMenu::slotGoSubMenu(const TQString& relPath) @@ -918,16 +918,16 @@ void KMenu::goSubMenu(const TQString& relPath, bool keyboard) int index = rel.length() - 1; if ( rel.endsWith( "/" ) ) index--; - index = rel.findRev( '/', index ); + index = rel.tqfindRev( '/', index ); kdDebug() << "goup, rel '" << rel << "' " << index << endl; TQString currel = rel; rel = rel.left( index + 1 ); if ( rel == "/" ) - rel = TQString::null; + rel = TQString(); kdDebug() << "goup, rel '" << rel << "' " << rel.isEmpty() << endl; fillSubMenu( rel, m_browserView->prepareLeftMove() ); - m_browserView->flipScroll(keyboard ? currel : TQString::null); + m_browserView->flipScroll(keyboard ? currel : TQString()); return; } else if (relPath.isEmpty()) { @@ -952,7 +952,7 @@ void KMenu::goSubMenu(const TQString& relPath, bool keyboard) //m_browserView->clear(); fillSubMenu(relPath, m_browserView->prepareRightMove()); } - m_browserView->flipScroll(keyboard ? "kicker:/goup/": TQString::null); + m_browserView->flipScroll(keyboard ? "kicker:/goup/": TQString()); } void KMenu::fillSubMenu(const TQString& relPath, ItemView *view) @@ -973,9 +973,9 @@ void KMenu::fillSubMenu(const TQString& relPath, ItemView *view) } else if ( m_newInstalledPrograms.count() ) { KMenuItem *item = view->insertItem( "clock", i18n( "New Applications" ), - TQString::null, "kicker:/new/", nId++, -1 ); + TQString(), "kicker:/new/", nId++, -1 ); item->setHasChildren( true ); - view->insertSeparator( nId++, TQString::null, -1 ); + view->insertSeparator( nId++, TQString(), -1 ); } view->path = relPath; @@ -1136,7 +1136,7 @@ void KMenu::fillMenu(KServiceGroup::Ptr& continue; } - KMenuItem *item = view->insertItem(g->icon(), groupCaption, TQString::null, g->relPath(), id++, -1); + KMenuItem *item = view->insertItem(g->icon(), groupCaption, TQString(), g->relPath(), id++, -1); item->setMenuPath(g->relPath()); item->setHasChildren( true ); @@ -1165,11 +1165,11 @@ void KMenu::fillMenu(KServiceGroup::Ptr& KService::Ptr s(static_cast<KService *>(e)); if (_relPath.isEmpty()) { TQStringList favs = KickerSettings::favorites(); - if (favs.find(s->storageId())!=favs.end()) + if (favs.tqfind(s->storageId())!=favs.end()) continue; } #ifdef KDELIBS_SUSE - KMenuItem *item = view->insertMenuItem(s, id++, -1, 0, TQString::null, specialTitle[s->name()], categoryIcon[s->name()] ); + KMenuItem *item = view->insertMenuItem(s, id++, -1, 0, TQString(), specialTitle[s->name()], categoryIcon[s->name()] ); if (shortenedMenuPath[s->name()].isEmpty()) item->setMenuPath(_relPath+s->menuId()); else @@ -1259,7 +1259,7 @@ void KMenu::initialize() if ((*it)[0]=='/') { KDesktopFile df((*it),true); TQString url = df.readURL(); - if (!KURL(url).isLocalFile() || TQFile::exists(url.replace("file://",TQString::null))) + if (!KURL(url).isLocalFile() || TQFile::exists(url.tqreplace("file://",TQString()))) m_favoriteView->insertItem(df.readIcon(),df.readName(),df.readGenericName(), url, nId++, index++); } else { @@ -1268,7 +1268,7 @@ void KMenu::initialize() } } - //nId = m_favoriteView->insertSeparator( nId, TQString::null, index++ ); + //nId = m_favoriteView->insertSeparator( nId, TQString(), index++ ); // m_favoriteView->insertDocument(KURL("help:/khelpcenter/userguide/index.html"), nId++); insertStaticItems(); @@ -1314,7 +1314,7 @@ void KMenu::insertStaticExitItems() m_exitView->leftView()->insertItem( "exit", i18n( "Shutdown Computer" ), i18n( "Turn off computer" ), "kicker:/shutdown", nId++, index++ ); - m_exitView->leftView()->insertItem( "reload", i18n( "&Restart Computer" ).replace("&",""), + m_exitView->leftView()->insertItem( "reload", i18n( "&Restart Computer" ).tqreplace("&",""), i18n( "Restart and boot the default system" ), "kicker:/restart", nId++, index++ ); @@ -1365,7 +1365,7 @@ void KMenu::insertStaticItems() m_systemView->insertItem( "network", i18n( "Network Folders" ), "remote:/", "remote:/", nId++, index++ ); - m_mediaWatcher = new MediaWatcher( this ); + m_mediaWatcher = new MediaWatcher( TQT_TQOBJECT(this) ); connect( m_mediaWatcher, TQT_SIGNAL( mediumChanged() ), TQT_SLOT( updateMedia() ) ); m_media_id = 0; @@ -1399,7 +1399,7 @@ void KMenu::slotLock() TQCString appname( "kdesktop" ); if ( kicker_screen_number ) appname.sprintf("kdesktop-screen-%d", kicker_screen_number); - kapp->dcopClient()->send(appname, "KScreensaverIface", "lock()", ""); + kapp->dcopClient()->send(appname, "KScreensaverIface", "lock()", TQString("")); } void KMenu::slotOpenHomepage() @@ -1454,7 +1454,7 @@ void KMenu::slotSessionActivated( int ent ) void KMenu::doNewSession( bool lock ) { int result = KMessageBox::warningContinueCancel( - kapp->desktop()->screen(kapp->desktop()->screenNumber(this)), + TQT_TQWIDGET(kapp->desktop()->screen(kapp->desktop()->screenNumber(this))), i18n("<p>You have chosen to open another desktop session.<br>" "The current session will be hidden " "and a new login screen will be displayed.<br>" @@ -1512,7 +1512,7 @@ void KMenu::searchAccept() int kicker_screen_number = qt_xscreen(); if ( kicker_screen_number ) appname.sprintf("kdesktop-screen-%d", kicker_screen_number); - kapp->dcopClient()->send(appname, "KScreensaverIface", "lock()", ""); + kapp->dcopClient()->send(appname, "KScreensaverIface", "lock()", TQString("")); } } @@ -1556,7 +1556,7 @@ bool KMenu::runCommand() case KURIFilterData::HELP: { // No need for kfmclient, KRun does it all (David) - (void) new KRun( m_filterData->uri(), parentWidget()); + (void) new KRun( m_filterData->uri(), tqparentWidget()); return false; } case KURIFilterData::EXECUTABLE: @@ -1672,7 +1672,7 @@ void KMenu::setOrientation(MenuOrientation orientation) m_orientation=orientation; - m_resizeHandle->setCursor(m_orientation == BottomUp ? Qt::sizeBDiagCursor : Qt::sizeFDiagCursor); + m_resizeHandle->setCursor(m_orientation == BottomUp ? tqsizeBDiagCursor : tqsizeFDiagCursor); TQPixmap pix; if ( m_orientation == BottomUp ) @@ -1699,14 +1699,14 @@ void KMenu::setOrientation(MenuOrientation orientation) TQWidget *footer = m_footer->mainWidget(); TQPixmap pix( 64, footer->height() ); TQPainter p( &pix ); - p.fillRect( 0, 0, 64, footer->height(), m_branding->colorGroup().brush( TQColorGroup::Base ) ); + p.fillRect( 0, 0, 64, footer->height(), m_branding->tqcolorGroup().brush( TQColorGroup::Base ) ); p.fillRect( 0, m_orientation == BottomUp ? footer->height() - 2 : 0, 64, 3, KNewButton::self()->borderColor() ); p.end(); footer->setPaletteBackgroundPixmap( pix ); } - resizeEvent(new TQResizeEvent(sizeHint(), sizeHint())); + resizeEvent(new TQResizeEvent(tqsizeHint(), tqsizeHint())); } void KMenu::showMenu() @@ -1762,7 +1762,7 @@ void KMenu::paintEvent(TQPaintEvent * e) const BackgroundMode bgmode = backgroundMode(); const TQColorGroup::ColorRole crole = TQPalette::backgroundRoleFromMode( bgmode ); - p.setBrush( colorGroup().brush( crole ) ); + p.setBrush( tqcolorGroup().brush( crole ) ); p.drawRect( 0, 0, width(), height() ); int ypos = m_search->mainWidget()->geometry().bottom(); @@ -1906,13 +1906,13 @@ bool KMenu::dontQueryNow (const TQString& str) if (str == current_query.get()) return true; int length = str.length (); - int last_whitespace = str.findRev (' ', -1); + int last_whitespace = str.tqfindRev (' ', -1); if (last_whitespace == length-1) return false; // if the user typed a space, search if (last_whitespace >= length-2) return true; // dont search if the user only typed one character TQChar lastchar = str[length-1]; - if (lastchar == ":" || lastchar == "=") + if (lastchar == ':' || lastchar == '=') return true; return false; } @@ -1923,11 +1923,11 @@ void KMenu::createNewProgramList() m_seenPrograms = KickerSettings::firstSeenApps(); m_newInstalledPrograms.clear(); - m_currentDate = TQDate::currentDate().toString(Qt::ISODate); + m_tqcurrentDate = TQDate::currentDate().toString(Qt::ISODate); bool initialize = (m_seenPrograms.count() == 0); - createNewProgramList(TQString::null); + createNewProgramList(TQString()); if (initialize) { for (TQStringList::Iterator it = m_seenPrograms.begin(); it != m_seenPrograms.end(); ++it) @@ -1964,7 +1964,7 @@ void KMenu::createNewProgramList(TQString relPath) } else if(e->isType(KST_KService)) { KService::Ptr s(static_cast<KService *>(e)); if(s->type() == "Application" && !s->noDisplay() ) { - TQString shortStorageId = s->storageId().replace(".desktop",TQString::null); + TQString shortStorageId = s->storageId().tqreplace(".desktop",TQString()); TQStringList::Iterator it_find = m_seenPrograms.begin(); TQStringList::Iterator it_end = m_seenPrograms.end(); bool found = false; @@ -1978,8 +1978,8 @@ void KMenu::createNewProgramList(TQString relPath) if (!found) { m_seenProgramsChanged=true; m_seenPrograms+=shortStorageId; - m_seenPrograms+=m_currentDate; - if (m_newInstalledPrograms.find(s->storageId())==m_newInstalledPrograms.end()) + m_seenPrograms+=m_tqcurrentDate; + if (m_newInstalledPrograms.tqfind(s->storageId())==m_newInstalledPrograms.end()) m_newInstalledPrograms+=s->storageId(); } else { @@ -1987,7 +1987,7 @@ void KMenu::createNewProgramList(TQString relPath) if (*(it_find)!="-") { TQDate date = TQDate::fromString(*(it_find),Qt::ISODate); if (date.daysTo(TQDate::currentDate())<3) { - if (m_newInstalledPrograms.find(s->storageId())==m_newInstalledPrograms.end()) + if (m_newInstalledPrograms.tqfind(s->storageId())==m_newInstalledPrograms.end()) m_newInstalledPrograms+=s->storageId(); } else { @@ -2033,24 +2033,24 @@ void KMenu::searchProgramList(TQString relPath) int score = 0; if (s->exec()==input) score = 100; - else if (s->exec().find(input)==0) + else if (s->exec().tqfind(input)==0) score = 50; - else if (s->exec().find(input)!=-1) + else if (s->exec().tqfind(input)!=-1) score = 10; else if (s->name().lower()==input) score = 100; else if (s->genericName().lower()==input) score = 100; - else if (s->name().lower().find(input)==0) + else if (s->name().lower().tqfind(input)==0) score = 50; - else if (s->genericName().lower().find(input)==0) + else if (s->genericName().lower().tqfind(input)==0) score = 50; - else if (s->name().lower().find(input)!=-1) + else if (s->name().lower().tqfind(input)!=-1) score = 10; - else if (s->genericName().lower().find(input)!=-1) + else if (s->genericName().lower().tqfind(input)!=-1) score = 10; - if (s->exec().find(' ')==-1) + if (s->exec().tqfind(' ')==-1) score+=1; if (s->substituteUid()) @@ -2074,7 +2074,7 @@ void KMenu::searchProgramList(TQString relPath) } HitMenuItem *hit_item = new HitMenuItem (firstLine, secondLine, - s->desktopEntryPath(), TQString::null, 0, APPS, s->icon(), score); + s->desktopEntryPath(), TQString(), 0, APPS, s->icon(), score); if (hit_item == NULL) continue; @@ -2082,7 +2082,7 @@ void KMenu::searchProgramList(TQString relPath) insertSearchResult(hit_item); TQString exe = s->exec(); - int pos = exe.find(' '); + int pos = exe.tqfind(' '); if (pos>0) exe=exe.left(pos); m_programsInMenu+=KGlobal::dirs()->findExe(exe); @@ -2105,7 +2105,7 @@ void KMenu::searchBookmarks(KBookmarkGroup group) } HitMenuItem *hit_item = new HitMenuItem (bookmark.fullText(), bookmark.fullText(), - bookmark.url(), TQString::null, 0, BOOKMARKS, bookmark.icon()); + bookmark.url(), TQString(), 0, BOOKMARKS, bookmark.icon()); insertSearchResult(hit_item); } @@ -2162,7 +2162,7 @@ void KMenu::searchAddressbook() } hit_item = new HitMenuItem (i18n("Send Email to %1").arg(realName), (*it).preferredEmail(), - "mailto:"+(*it).preferredEmail(), TQString::null, 0, ACTIONS, "mail_new"); + "mailto:"+(*it).preferredEmail(), TQString(), 0, ACTIONS, "mail_new"); insertSearchResult(hit_item); } @@ -2173,7 +2173,7 @@ void KMenu::searchAddressbook() } hit_item = new HitMenuItem (i18n("Open Addressbook at %1").arg(realName), (*it).preferredEmail(), - "kaddressbook:/"+(*it).uid(), TQString::null, 0, ACTIONS, "kaddressbook"); + "kaddressbook:/"+(*it).uid(), TQString(), 0, ACTIONS, "kaddressbook"); insertSearchResult(hit_item); @@ -2205,7 +2205,7 @@ TQString KMenu::insertBreaks(const TQString& text, TQFontMetrics fm, int width, void KMenu::clearSearchResults(bool showHelp) { m_searchResultsWidget->clear(); - m_searchResultsWidget->setFocusPolicy(showHelp ? TQWidget::NoFocus : TQWidget::StrongFocus); + m_searchResultsWidget->setFocusPolicy(showHelp ? TQ_NoFocus : TQ_StrongFocus); setTabOrder(m_kcommand, m_searchResultsWidget); if (showHelp) { @@ -2280,8 +2280,8 @@ void KMenu::doQuery (bool return_pressed) if (!result.isEmpty()) { categorised_hit_total[ACTIONS] ++; - HitMenuItem *hit_item = new HitMenuItem (i18n("%1 = %2").arg(query_str, result), TQString::null, - "kcalc", TQString::null, (++max_category_id [ACTIONS]), ACTIONS, "kcalc"); + HitMenuItem *hit_item = new HitMenuItem (i18n("%1 = %2").arg(query_str, result), TQString(), + "kcalc", TQString(), (++max_category_id [ACTIONS]), ACTIONS, "kcalc"); int index = getHitMenuItemPosition (hit_item); m_searchResultsWidget->insertItem(iconForHitMenuItem(hit_item), hit_item->display_name, hit_item->display_info, KGlobal::dirs()->findExe("kcalc"), max_category_id [ACTIONS], index); @@ -2291,15 +2291,15 @@ void KMenu::doQuery (bool return_pressed) // detect email address if (emailRegExp.exactMatch(query_str)) { categorised_hit_total[ACTIONS] ++; - HitMenuItem *hit_item = new HitMenuItem (i18n("Send Email to %1").arg(query_str), TQString::null, - "mailto:"+query_str, TQString::null, (++max_category_id [ACTIONS]), ACTIONS, "mail_new"); + HitMenuItem *hit_item = new HitMenuItem (i18n("Send Email to %1").arg(query_str), TQString(), + "mailto:"+query_str, TQString(), (++max_category_id [ACTIONS]), ACTIONS, "mail_new"); int index = getHitMenuItemPosition (hit_item); m_searchResultsWidget->insertItem(iconForHitMenuItem(hit_item), hit_item->display_name, hit_item->display_info, "mailto:"+query_str, max_category_id [ACTIONS], index); } // quick own application search m_programsInMenu.clear(); - searchProgramList(TQString::null); + searchProgramList(TQString()); KURIFilterData filterData; filterData.setData(query_str); @@ -2329,18 +2329,18 @@ void KMenu::doQuery (bool return_pressed) if (exe.endsWith("/bin/gimp")) { TQStringList::ConstIterator it = m_programsInMenu.begin(); for (; it != m_programsInMenu.end(); ++it) - if ((*it).find("bin/gimp-remote-")!=-1) { + if ((*it).tqfind("bin/gimp-remote-")!=-1) { gimp_hack = true; break; } } #endif - if (m_programsInMenu.find(exe)!=m_programsInMenu.end() + if (m_programsInMenu.tqfind(exe)!=m_programsInMenu.end() #ifdef KDELIBS_SUSE || gimp_hack #endif ) - exe = TQString::null; + exe = TQString(); else if (kapp->authorize("shell_access")) { if( filterData.hasArgsAndOptions() ) @@ -2356,8 +2356,8 @@ void KMenu::doQuery (bool return_pressed) if (!description.isEmpty()) { categorised_hit_total[ACTIONS] ++; - HitMenuItem *hit_item = new HitMenuItem (description, TQString::null, - exe.isEmpty() ? filterData.uri() : exe, TQString::null, + HitMenuItem *hit_item = new HitMenuItem (description, TQString(), + exe.isEmpty() ? filterData.uri() : exe, TQString(), (++max_category_id [ACTIONS]), ACTIONS, exe.isEmpty() ? "fileopen": "run"); int index = getHitMenuItemPosition (hit_item); m_searchResultsWidget->insertItem(iconForHitMenuItem(hit_item), hit_item->display_name, @@ -2521,7 +2521,7 @@ void KMenu::updateCategoryTitles() sep->setText( 0, i18n( "%1 (top %2 of %3)" ).arg( i18n(categories [i].utf8()) ).arg( max ).arg( categorised_hit_total [i] ) ); } else { - sep->setLink( TQString::null ); + sep->setLink( TQString() ); } } delete[] already_added; @@ -2540,15 +2540,15 @@ TQString KMenu::iconForHitMenuItem(HitMenuItem *hit_item) return favicon; } - if (mimetype_iconstore.contains (hit_item->mimetype)) + if (mimetype_iconstore.tqcontains (hit_item->mimetype)) return (mimetype_iconstore [hit_item->mimetype]); else { KMimeType::Ptr mimetype_ptr = KMimeType::mimeType (hit_item->mimetype); - TQString mimetype_icon = mimetype_ptr->icon(TQString::null, FALSE); + TQString mimetype_icon = mimetype_ptr->icon(TQString(), FALSE); mimetype_iconstore [hit_item->mimetype] = mimetype_icon; return mimetype_icon; } - return TQString::null; + return TQString(); } void KMenu::slotStartService(KService::Ptr ptr) @@ -2621,7 +2621,7 @@ void KMenu::slotStartURL(const TQString& u) #ifdef KDELIBS_SUSE TQByteArray params; TQDataStream stream(params, IO_WriteOnly); - stream << 1 << -1 << TQString::null; + stream << 1 << -1 << TQString(); kapp->dcopClient()->send("ksmserver", "default", "logoutTimed(int,int,TQString)", params); #else @@ -2715,13 +2715,13 @@ void KMenu::slotStartURL(const TQString& u) } kapp->propagateSessionManager(); - (void) new KRun( u, parentWidget()); + (void) new KRun( u, tqparentWidget()); } } void KMenu::slotContextMenuRequested( TQListViewItem * item, const TQPoint & pos, int /*col*/ ) { - const TQObject* source = sender(); + const TQObject* source = TQT_TQOBJECT_CONST(sender()); if (!item) return; @@ -2744,7 +2744,7 @@ void KMenu::slotContextMenuRequested( TQListViewItem * item, const TQPoint & pos m_popupPath.path = kitem->path(); m_popupPath.icon = kitem->icon(); - if (m_popupPath.path.startsWith(locateLocal("data", TQString::fromLatin1("RecentDocuments/")))) { + if (m_popupPath.path.startsWith(locateLocal("data", TQString::tqfromLatin1("RecentDocuments/")))) { KDesktopFile df(m_popupPath.path,true); m_popupPath.path=df.readURL(); } @@ -2756,7 +2756,7 @@ void KMenu::slotContextMenuRequested( TQListViewItem * item, const TQPoint & pos m_popupMenu->insertTitle(SmallIcon(kitem->icon()),kitem->title()); - if (source==m_favoriteView) + if (TQT_BASE_OBJECT_CONST(source)==TQT_BASE_OBJECT(m_favoriteView)) { hasEntries = true; m_popupMenu->insertItem(SmallIconSet("remove"), @@ -2770,7 +2770,7 @@ void KMenu::slotContextMenuRequested( TQListViewItem * item, const TQPoint & pos i18n("Add to Favorites"), AddToFavorites); TQStringList favs = KickerSettings::favorites(); - if (m_popupService && favs.find(m_popupService->storageId())!=favs.end()) + if (m_popupService && favs.tqfind(m_popupService->storageId())!=favs.end()) m_popupMenu->setItemEnabled(num, false); else { TQStringList::Iterator it; @@ -2779,7 +2779,7 @@ void KMenu::slotContextMenuRequested( TQListViewItem * item, const TQPoint & pos if ((*it)[0]=='/') { KDesktopFile df((*it),true); - if (df.readURL().replace("file://",TQString::null)==m_popupPath.path) + if (df.readURL().tqreplace("file://",TQString())==m_popupPath.path) break; } } @@ -2788,7 +2788,7 @@ void KMenu::slotContextMenuRequested( TQListViewItem * item, const TQPoint & pos } } - if (source!=m_exitView) { + if (TQT_BASE_OBJECT_CONST(source)!=TQT_BASE_OBJECT(m_exitView)) { if (m_popupService || (!m_popupPath.path.startsWith("kicker:/") && !m_popupPath.path.startsWith("system:/") && !m_popupPath.path.startsWith("kaddressbook:/"))) { if (hasEntries) m_popupMenu->insertSeparator(); @@ -2828,14 +2828,14 @@ void KMenu::slotContextMenuRequested( TQListViewItem * item, const TQPoint & pos i18n("Put Into Run Dialog"), PutIntoRunDialog); } } - if (source==m_searchResultsWidget || ((source==m_favoriteView || source==m_recentlyView || source == m_systemView) && !m_popupService && !m_popupPath.path.startsWith("kicker:/")) ) { + if (TQT_BASE_OBJECT_CONST(source)==TQT_BASE_OBJECT(m_searchResultsWidget) || ((TQT_BASE_OBJECT_CONST(source)==TQT_BASE_OBJECT(m_favoriteView) || TQT_BASE_OBJECT_CONST(source)==TQT_BASE_OBJECT(m_recentlyView) || TQT_BASE_OBJECT_CONST(source) == TQT_BASE_OBJECT(m_systemView)) && !m_popupService && !m_popupPath.path.startsWith("kicker:/")) ) { TQString uri; if (m_popupService) uri = locate("apps", m_popupService->desktopEntryPath()); else uri = m_popupPath.path; - TQString mimetype = TQString::null; + TQString mimetype = TQString(); if ( m_popupPath.path.startsWith( "system:/media/" ) ) mimetype = media_mimetypes[m_popupPath.path]; @@ -2865,7 +2865,7 @@ void KMenu::slotContextMenuRequested( TQListViewItem * item, const TQPoint & pos } } - if (source==m_recentlyView) { + if (TQT_BASE_OBJECT_CONST(source)==TQT_BASE_OBJECT(m_recentlyView)) { m_popupMenu->insertSeparator(); if (m_popupService) m_popupMenu->insertItem(SmallIconSet("history_clear"), @@ -2935,8 +2935,8 @@ void KMenu::slotContextMenu(int selected) case EditItem: case EditMenu: accept(); - proc = new KProcess(this); - *proc << KStandardDirs::findExe(TQString::fromLatin1("kmenuedit")); + proc = new KProcess(TQT_TQOBJECT(this)); + *proc << KStandardDirs::findExe(TQString::tqfromLatin1("kmenuedit")); *proc << "/"+m_popupPath.menuPath.section('/',-200,-2) << m_popupPath.menuPath.section('/', -1); proc->start(); break; @@ -2971,7 +2971,7 @@ void KMenu::slotContextMenu(int selected) case AddToFavorites: if (m_popupService) { - if (favs.find(m_popupService->storageId())==favs.end()) { + if (favs.tqfind(m_popupService->storageId())==favs.end()) { KService::Ptr p = KService::serviceByStorageId(m_popupService->storageId()); m_favoriteView->insertMenuItem(p, serviceMenuEndId()+favs.count()+1); favs+=m_popupService->storageId(); @@ -2982,7 +2982,7 @@ void KMenu::slotContextMenu(int selected) for (it = favs.begin(); it != favs.end(); ++it) { if ((*it)[0]=='/') { KDesktopFile df((*it),true); - if (df.readURL().replace("file://",TQString::null)==m_popupPath.path) + if (df.readURL().tqreplace("file://",TQString())==m_popupPath.path) break; } } @@ -3010,7 +3010,7 @@ void KMenu::slotContextMenu(int selected) case RemoveFromFavorites: if (m_popupService) { - favs.erase(favs.find(m_popupService->storageId())); + favs.erase(favs.tqfind(m_popupService->storageId())); for (TQListViewItemIterator it(m_favoriteView); it.current(); ++it) { KMenuItem* kitem = static_cast<KMenuItem*>(it.current()); @@ -3024,7 +3024,7 @@ void KMenu::slotContextMenu(int selected) for (TQStringList::Iterator it = favs.begin(); it != favs.end(); ++it) { if ((*it)[0]=='/') { KDesktopFile df((*it),true); - if (df.readURL().replace("file://",TQString::null)==m_popupPath.path) { + if (df.readURL().tqreplace("file://",TQString())==m_popupPath.path) { TQFile::remove((*it)); favs.erase(it); break; @@ -3074,24 +3074,24 @@ void KMenu::resizeEvent ( TQResizeEvent * e ) // put the search widget at the top of the menu and give it its desired // height m_search->mainWidget()->setGeometry( 0, ypos, width(), - m_search->minimumSize().height() ); - left_height -= m_search->minimumSize().height(); - ypos += m_search->minimumSize().height(); + m_search->tqminimumSize().height() ); + left_height -= m_search->tqminimumSize().height(); + ypos += m_search->tqminimumSize().height(); // place the footer widget at the bottom of the menu and give it its desired // height - m_footer->mainWidget()->setGeometry( 0, height() - m_footer->minimumSize().height(), - width(), m_footer->minimumSize().height() ); - left_height -= m_footer->minimumSize().height(); + m_footer->mainWidget()->setGeometry( 0, height() - m_footer->tqminimumSize().height(), + width(), m_footer->tqminimumSize().height() ); + left_height -= m_footer->tqminimumSize().height(); // place the button box above the footer widget, horizontal placement // has the width of the edge graphics subtracted m_tabBar->setGeometry(button_box_left.width(), - height() - m_footer->minimumSize().height() - - m_tabBar->sizeHint().height(), + height() - m_footer->tqminimumSize().height() - + m_tabBar->tqsizeHint().height(), width() - button_box_left.width(), - m_tabBar->sizeHint().height() ); - left_height -= m_tabBar->sizeHint().height(); + m_tabBar->tqsizeHint().height() ); + left_height -= m_tabBar->tqsizeHint().height(); // place the main (stacker) widget below the search widget, // in the remaining vertical space @@ -3105,28 +3105,28 @@ void KMenu::resizeEvent ( TQResizeEvent * e ) // place the 'footer' widget at the top of the menu and give it // its desired height m_footer->mainWidget()->setGeometry( 0, - ypos /*height() - m_footer->minimumSize().height()*/, + ypos /*height() - m_footer->tqminimumSize().height()*/, width(), - m_footer->minimumSize().height() ); - ypos += m_footer->minimumSize().height(); - left_height -= m_footer->minimumSize().height(); + m_footer->tqminimumSize().height() ); + ypos += m_footer->tqminimumSize().height(); + left_height -= m_footer->tqminimumSize().height(); // place the button box next at the top of the menu. // has the width of the edge graphics subtracted m_tabBar->setGeometry(button_box_left.width(), ypos, width() - button_box_left.width(), - m_tabBar->sizeHint().height()); + m_tabBar->tqsizeHint().height()); - ypos += m_tabBar->sizeHint().height(); - left_height -= m_tabBar->sizeHint().height(); + ypos += m_tabBar->tqsizeHint().height(); + left_height -= m_tabBar->tqsizeHint().height(); // put the search widget above the footer widget // height m_search->mainWidget()->setGeometry( 0, - height() - m_search->minimumSize().height(), + height() - m_search->tqminimumSize().height(), width(), - m_search->minimumSize().height() + m_search->tqminimumSize().height() ); - left_height -= m_search->minimumSize().height(); + left_height -= m_search->tqminimumSize().height(); // place the main (stacker) widget below the button box, // in the remaining vertical space @@ -3167,14 +3167,14 @@ void KMenu::mouseMoveEvent ( TQMouseEvent * e ) if ( hasMouseTracking() && m_isresizing ) { m_stacker->setMinimumSize( TQSize(0, 0) ); m_stacker->setMaximumSize( TQSize(32000, 32000) ); - int newWidth = QMAX( e->x() - x(), minimumSizeHint().width() ); + int newWidth = QMAX( e->x() - x(), tqminimumSizeHint().width() ); if ( m_orientation == BottomUp ) { - int newHeight = QMAX( height() - e->y(), minimumSizeHint().height() + 10 ); + int newHeight = QMAX( height() - e->y(), tqminimumSizeHint().height() + 10 ); int newY = y() + height() - newHeight; setGeometry( x(), newY, newWidth, newHeight); } else { - setGeometry( x(), y(), newWidth, QMAX( e->y(), minimumSizeHint().height() + 10 )); + setGeometry( x(), y(), newWidth, QMAX( e->y(), tqminimumSizeHint().height() + 10 )); } } } @@ -3277,10 +3277,10 @@ void KMenu::searchActionClicked(TQListViewItem* item) if( !KURIFilter::self()->filterURI(data, list) ) { KDesktopFile file("searchproviders/google.desktop", true, "services"); - data.setData(file.readEntry("Query").replace("\\{@}", m_kcommand->currentText())); + data.setData(file.readEntry("Query").tqreplace("\\{@}", m_kcommand->currentText())); } - (void) new KRun( data.uri(), parentWidget()); + (void) new KRun( data.uri(), tqparentWidget()); } } @@ -3320,7 +3320,7 @@ void KMenu::updateRecentlyUsedApps(KService::Ptr &service) TQString strItem(service->desktopEntryPath()); // don't add an item from root kmenu level - if (!strItem.contains('/')) + if (!strItem.tqcontains('/')) { return; } @@ -3331,7 +3331,7 @@ void KMenu::updateRecentlyUsedApps(KService::Ptr &service) RecentlyLaunchedApps::the().m_bNeedToUpdate = true; } -TQSize KMenu::sizeHint() const +TQSize KMenu::tqsizeHint() const { #warning FIXME // this should be only for the inner area so layout changes do not break it @@ -3339,28 +3339,28 @@ TQSize KMenu::sizeHint() const const int height = kMin(KickerSettings::kMenuHeight(), TQApplication::desktop()->screen()->height()-50); TQSize wanted(width, height); - kdDebug() << "show " << minimumSizeHint() << " " << m_stacker->minimumSizeHint() << " " - << m_searchFrame->minimumSizeHint() << " " << wanted << endl; + kdDebug() << "show " << tqminimumSizeHint() << " " << m_stacker->tqminimumSizeHint() << " " + << m_searchFrame->tqminimumSizeHint() << " " << wanted << endl; bool isDefault = wanted.isNull(); - wanted = wanted.expandedTo(minimumSizeHint()); + wanted = wanted.expandedTo(tqminimumSizeHint()); if ( isDefault ) - wanted.setHeight( wanted.height() + ( m_favoriteView->goodHeight() - m_stacker->minimumSizeHint().height() ) ); + wanted.setHeight( wanted.height() + ( m_favoriteView->goodHeight() - m_stacker->tqminimumSizeHint().height() ) ); return wanted; } -TQSize KMenu::minimumSizeHint() const +TQSize KMenu::tqminimumSizeHint() const { TQSize minsize; - minsize.setWidth( minsize.width() + m_tabBar->sizeHint().width() ); + minsize.setWidth( minsize.width() + m_tabBar->tqsizeHint().width() ); minsize.setWidth( QMAX( minsize.width(), - m_search->minimumSize().width() ) ); + m_search->tqminimumSize().width() ) ); minsize.setWidth( QMAX( minsize.width(), - m_search->minimumSize().width() ) ); + m_search->tqminimumSize().width() ) ); minsize.setHeight( minsize.height() + - m_search->minimumSize().height() + - m_footer->minimumSize().height() + + m_search->tqminimumSize().height() + + m_footer->tqminimumSize().height() + 180 ); // 180 is a very rough guess for 32 icon size return minsize; } @@ -3372,12 +3372,12 @@ void KMenu::slotFavoritesMoved( TQListViewItem* item, TQListViewItem* /*afterFir TQStringList favs = KickerSettings::favorites(); TQStringList::Iterator it; - TQString addFav = TQString::null; + TQString addFav = TQString(); // remove at old position if (kitem->service()) { - favs.erase(favs.find(kitem->service()->storageId())); + favs.erase(favs.tqfind(kitem->service()->storageId())); addFav = kitem->service()->storageId(); } else @@ -3387,7 +3387,7 @@ void KMenu::slotFavoritesMoved( TQListViewItem* item, TQListViewItem* /*afterFir if ((*it)[0]=='/') { KDesktopFile df((*it),true); - if (df.readURL().replace("file://",TQString::null)==kitem->path()) + if (df.readURL().tqreplace("file://",TQString())==kitem->path()) { addFav = *it; favs.erase(it); @@ -3412,7 +3412,7 @@ void KMenu::slotFavoritesMoved( TQListViewItem* item, TQListViewItem* /*afterFir if ((*it)[0]=='/' && !kafterNow->service()) { KDesktopFile df((*it),true); - if (df.readURL().replace("file://",TQString::null)==kafterNow->path()) + if (df.readURL().tqreplace("file://",TQString())==kafterNow->path()) { kdDebug() << "insert after " << kafterNow->path() << endl; favs.insert(++it,addFav); @@ -3480,7 +3480,7 @@ void KMenu::updateMedia() if ( iconName.isEmpty() ) // no user icon, query the MIME type { KMimeType::Ptr mime = KMimeType::mimeType( mimeType ); - iconName = mime->icon( TQString::null, false ); + iconName = mime->icon( TQString(), false ); } TQString descr = deviceNode; @@ -3549,7 +3549,7 @@ void KMenu::slotFavDropped(TQDropEvent * ev, TQListViewItem *after ) if (item.m_s) { - if (favs.find(item.m_s->storageId())==favs.end()) + if (favs.tqfind(item.m_s->storageId())==favs.end()) { newItem = m_favoriteView->insertMenuItem(item.m_s, serviceMenuEndId()+favs.count()+1); favs += item.m_s->storageId(); @@ -3558,7 +3558,7 @@ void KMenu::slotFavDropped(TQDropEvent * ev, TQListViewItem *after ) else { TQString uri = item.m_path; - if (uri.startsWith(locateLocal("data", TQString::fromLatin1("RecentDocuments/")))) { + if (uri.startsWith(locateLocal("data", TQString::tqfromLatin1("RecentDocuments/")))) { KDesktopFile df(uri,true); uri=df.readURL(); } @@ -3569,7 +3569,7 @@ void KMenu::slotFavDropped(TQDropEvent * ev, TQListViewItem *after ) if ((*it)[0]=='/') { KDesktopFile df((*it),true); - if (df.readURL().replace("file://",TQString::null)==uri) + if (df.readURL().tqreplace("file://",TQString())==uri) break; } } @@ -3597,8 +3597,8 @@ void KMenu::slotFavDropped(TQDropEvent * ev, TQListViewItem *after ) if (text.endsWith(".desktop")) { - KService::Ptr p = KService::serviceByDesktopPath(text.replace("file://",TQString::null)); - if (p && favs.find(p->storageId())==favs.end()) { + KService::Ptr p = KService::serviceByDesktopPath(text.tqreplace("file://",TQString())); + if (p && favs.tqfind(p->storageId())==favs.end()) { newItem = m_favoriteView->insertMenuItem(p, serviceMenuEndId()+favs.count()+1); favs+=p->storageId(); } @@ -3611,13 +3611,13 @@ void KMenu::slotFavDropped(TQDropEvent * ev, TQListViewItem *after ) if ((*it)[0]=='/') { KDesktopFile df((*it),true); - if (df.readURL().replace("file://",TQString::null)==text) + if (df.readURL().tqreplace("file://",TQString())==text) break; } } if (it==favs.end()) { - KFileItem* item = new KFileItem(text, TQString::null, KFileItem::Unknown); + KFileItem* item = new KFileItem(text, TQString(), KFileItem::Unknown); KURL kurl(text); TQString file = KickerLib::newDesktopFile(text); @@ -3625,7 +3625,7 @@ void KMenu::slotFavDropped(TQDropEvent * ev, TQListViewItem *after ) df.writeEntry("Encoding", "UTF-8"); df.writeEntry("Type","Link"); df.writeEntry("Name", item->name()); - df.writeEntry("GenericName", i18n("Directory: %1").arg(kurl.upURL().path())); + df.writeEntry("GenericName", i18n("Directory: %1").tqarg(kurl.upURL().path())); df.writeEntry("Icon", item->iconName()); df.writeEntry("URL", text); diff --git a/kicker/kicker/ui/k_new_mnu.h b/kicker/kicker/ui/k_new_mnu.h index ef45ef815..73549cfa0 100644 --- a/kicker/kicker/ui/k_new_mnu.h +++ b/kicker/kicker/ui/k_new_mnu.h @@ -104,8 +104,8 @@ public: enum MaskEffect { Plain, Dissolve }; - virtual TQSize sizeHint() const; - virtual TQSize minimumSizeHint() const; + virtual TQSize tqsizeHint() const; + virtual TQSize tqminimumSizeHint() const; void searchOver(); void initCategoryTitlesUpdate(); @@ -319,7 +319,7 @@ private: TQStringList m_programsInMenu; TQStringList m_newInstalledPrograms, m_seenPrograms; bool m_seenProgramsChanged; - TQString m_currentDate; + TQString m_tqcurrentDate; MenuOrientation m_orientation; bool m_toolTipsEnabled; diff --git a/kicker/kicker/ui/kickoff_bar.cpp b/kicker/kicker/ui/kickoff_bar.cpp index 2f0de9aea..6fe731933 100644 --- a/kicker/kicker/ui/kickoff_bar.cpp +++ b/kicker/kicker/ui/kickoff_bar.cpp @@ -56,10 +56,10 @@ void KickoffTabBar::paint(TQPainter* p, TQTab* t, bool selected) const // else if(t == d->pressed) // flags |= TQStyle::Style_Sunken; //selection flags - if(t->rect().contains(mapFromGlobal(TQCursor::pos()))) + if(t->rect().tqcontains(mapFromGlobal(TQCursor::pos()))) flags |= TQStyle::Style_MouseOver; - style().drawControl( TQStyle::CE_TabBarTab, p, this, t->rect(), - colorGroup(), flags, TQStyleOption(t) ); + tqstyle().tqdrawControl( TQStyle::CE_TabBarTab, p, this, t->rect(), + tqcolorGroup(), flags, TQStyleOption(t) ); paintLabel( p, t->rect(), t, t->identifier() == keyboardFocusTab() ); } @@ -70,11 +70,11 @@ void KickoffTabBar::paintLabel(TQPainter* p, const TQRect& br, TQTab* t, bool ha TQRect r = br; bool selected = m_tabsActivated && (currentTab() == t->identifier()); - int vframe = style().pixelMetric( TQStyle::PM_TabBarTabVSpace, this ); + int vframe = tqstyle().tqpixelMetric( TQStyle::PM_TabBarTabVSpace, this ); p->setFont( font() ); TQFontMetrics fm = p->fontMetrics(); - int fw = fm.size( Qt::SingleLine|Qt::ShowPrefix, t->text() ).width(); + int fw = fm.size( TQt::SingleLine|TQt::ShowPrefix, t->text() ).width(); TQRect rt(r); rt.setWidth(fw); @@ -114,30 +114,30 @@ void KickoffTabBar::paintLabel(TQPainter* p, const TQRect& br, TQTab* t, bool ha flags |= TQStyle::Style_Selected; // else if(t == d->pressed) // flags |= TQStyle::Style_Sunken; - if(t->rect().contains(mapFromGlobal(TQCursor::pos()))) + if(t->rect().tqcontains(mapFromGlobal(TQCursor::pos()))) flags |= TQStyle::Style_MouseOver; - style().drawControl( TQStyle::CE_TabBarLabel, p, this, rt, - t->isEnabled() ? colorGroup(): palette().disabled(), + tqstyle().tqdrawControl( TQStyle::CE_TabBarLabel, p, this, rt, + t->isEnabled() ? tqcolorGroup(): tqpalette().disabled(), flags, TQStyleOption(t) ); } -TQSize KickoffTabBar::sizeHint() const +TQSize KickoffTabBar::tqsizeHint() const { - TQSize s = TQTabBar::sizeHint(); + TQSize s = TQTabBar::tqsizeHint(); return s; } void KickoffTabBar::layoutTabs() { - TQTabBar::layoutTabs(); + TQTabBar::tqlayoutTabs(); TQFontMetrics fm = fontMetrics(); int fh = ((KickerSettings::kickoffTabBarFormat() != KickerSettings::IconOnly) ? fm.height() : 0) + 4; - int hframe = style().pixelMetric( TQStyle::PM_TabBarTabHSpace, this ); - int vframe = style().pixelMetric( TQStyle::PM_TabBarTabVSpace, this ); - int overlap = style().pixelMetric( TQStyle::PM_TabBarTabOverlap, this ); + int hframe = tqstyle().tqpixelMetric( TQStyle::PM_TabBarTabHSpace, this ); + int vframe = tqstyle().tqpixelMetric( TQStyle::PM_TabBarTabVSpace, this ); + int overlap = tqstyle().tqpixelMetric( TQStyle::PM_TabBarTabOverlap, this ); TQSize s; for (int t = 0; t < count(); ++t) @@ -155,13 +155,13 @@ void KickoffTabBar::layoutTabs() h += 4 + s.height() + 4; TQRect r = tab->rect(); - int fw = fm.size( Qt::SingleLine|Qt::ShowPrefix, tab->text() ).width(); + int fw = fm.size( TQt::SingleLine|TQt::ShowPrefix, tab->text() ).width(); int iw = 0; if ( tab->iconSet() != 0 ) iw = tab->iconSet()->pixmap( TQIconSet::Large, TQIconSet::Normal ).width(); int w = QMAX(iw, fw + 6 + 6 ) + hframe; h += ((KickerSettings::kickoffTabBarFormat() != KickerSettings::IconOnly) ? fm.height() : 0) + vframe; - tab->setRect(TQRect(TQPoint(x, 0), style().sizeFromContents(TQStyle::CT_TabBarTab, this, + tab->setRect(TQRect(TQPoint(x, 0), tqstyle().tqsizeFromContents(TQStyle::CT_TabBarTab, this, TQSize(w, h), TQStyleOption(tab)))); x += tab->rect().width() - overlap; } @@ -185,7 +185,7 @@ void KickoffTabBar::dragMoveEvent(TQDragMoveEvent* event) void KickoffTabBar::mousePressEvent( TQMouseEvent * e ) { - if ( e->button() != LeftButton ) { + if ( e->button() != Qt::LeftButton ) { e->ignore(); return; } diff --git a/kicker/kicker/ui/kickoff_bar.h b/kicker/kicker/ui/kickoff_bar.h index 2330ffe39..55f94c3dd 100644 --- a/kicker/kicker/ui/kickoff_bar.h +++ b/kicker/kicker/ui/kickoff_bar.h @@ -32,7 +32,7 @@ public: KickoffTabBar(TQWidget* parent, const char* name); void deactivateTabs(bool b); - virtual TQSize sizeHint() const; + virtual TQSize tqsizeHint() const; protected: virtual void paint(TQPainter*, TQTab*, bool) const; diff --git a/kicker/kicker/ui/kmenuitembase.ui b/kicker/kicker/ui/kmenuitembase.ui index 0cbea1155..0b49763a1 100644 --- a/kicker/kicker/ui/kmenuitembase.ui +++ b/kicker/kicker/ui/kmenuitembase.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KMenuItemBase</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KMenuItemBase</cstring> </property> @@ -20,13 +20,13 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>0</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>32767</width> <height>80</height> @@ -42,7 +42,7 @@ <property name="margin"> <number>2</number> </property> - <widget class="QLayoutWidget" row="0" column="1"> + <widget class="TQLayoutWidget" row="0" column="1"> <property name="name"> <cstring>layout11</cstring> </property> @@ -50,7 +50,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>itemTitle</cstring> </property> @@ -73,11 +73,11 @@ <property name="textFormat"> <enum>RichText</enum> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>itemDescription</cstring> </property> @@ -102,13 +102,13 @@ <property name="textFormat"> <enum>RichText</enum> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> </vbox> </widget> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> <cstring>layout4</cstring> </property> @@ -116,11 +116,11 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>itemPixmap</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>64</width> <height>64</height> @@ -129,7 +129,7 @@ <property name="text"> <string></string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop|AlignHCenter</set> </property> </widget> diff --git a/kicker/kicker/ui/nonKDEButtonSettings.ui b/kicker/kicker/ui/nonKDEButtonSettings.ui index 5c44aca85..a3f04e6a8 100644 --- a/kicker/kicker/ui/nonKDEButtonSettings.ui +++ b/kicker/kicker/ui/nonKDEButtonSettings.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>NonKDEButtonSettings</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>NonKDEButtonSettings</cstring> </property> @@ -30,7 +30,7 @@ <string>Enter the name of the executable file to be run when this button is selected. If it is not in your $PATH then you will need to provide an absolute path.</string> </property> </widget> - <widget class="QLabel" row="8" column="0" rowspan="1" colspan="2"> + <widget class="TQLabel" row="8" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -46,7 +46,7 @@ <i>Example</i>: For the command `rm -rf` enter "-rf" in this text box.</string> </property> </widget> - <widget class="QCheckBox" row="10" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="10" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>m_inTerm</cstring> </property> @@ -57,7 +57,7 @@ <string>Select this option if the command is a command line application and you wish to be able to see its output when run.</string> </property> </widget> - <widget class="QLineEdit" row="9" column="0" rowspan="1" colspan="2"> + <widget class="TQLineEdit" row="9" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>m_commandLine</cstring> </property> @@ -67,7 +67,7 @@ <i>Example</i>: For the command `rm -rf` enter "-rf" in this text box.</string> </property> </widget> - <widget class="QLabel" row="6" column="0"> + <widget class="TQLabel" row="6" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -81,7 +81,7 @@ <string>Enter the name of the executable file to be run when this button is selected. If it is not in your $PATH then you will need to provide an absolute path.</string> </property> </widget> - <widget class="QLineEdit" row="1" column="1"> + <widget class="TQLineEdit" row="1" column="1"> <property name="name"> <cstring>m_title</cstring> </property> @@ -97,7 +97,7 @@ <string>Enter the name you would like to appear for this button here.</string> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -121,7 +121,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> @@ -140,13 +140,13 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>58</width> <height>58</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>58</width> <height>58</height> @@ -159,7 +159,7 @@ <number>48</number> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>textLabel4</cstring> </property> @@ -173,7 +173,7 @@ <string>Enter the name you would like to appear for this button here.</string> </property> </widget> - <widget class="QLineEdit" row="5" column="0" rowspan="1" colspan="2"> + <widget class="TQLineEdit" row="5" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>m_description</cstring> </property> @@ -199,7 +199,7 @@ <property name="sizeType"> <enum>Minimum</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>8</height> diff --git a/kicker/kicker/ui/popupmenutitle.h b/kicker/kicker/ui/popupmenutitle.h index 439fc195f..e5f565c1a 100644 --- a/kicker/kicker/ui/popupmenutitle.h +++ b/kicker/kicker/ui/popupmenutitle.h @@ -33,7 +33,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <kapplication.h> -class PopupMenuTitle : public QCustomMenuItem +class PopupMenuTitle : public TQCustomMenuItem { public: PopupMenuTitle(const TQString &name, const TQFont &font); @@ -46,7 +46,7 @@ public: { p->save(); TQRect r(x, y, w, h); - kapp->style().drawPrimitive(TQStyle::PE_HeaderSection, + kapp->tqstyle().tqdrawPrimitive(TQStyle::PE_HeaderSection, p, r, cg); if (!m_desktopName.isEmpty()) @@ -69,11 +69,11 @@ public: m_font.setBold(true); } - TQSize sizeHint() + TQSize tqsizeHint() { TQSize size = TQFontMetrics(m_font).size(AlignHCenter, m_desktopName); size.setHeight(size.height() + - (kapp->style().pixelMetric(TQStyle::PM_DefaultFrameWidth) * 2 + 1)); + (kapp->tqstyle().tqpixelMetric(TQStyle::PM_DefaultFrameWidth) * 2 + 1)); return size; } diff --git a/kicker/kicker/ui/query.cpp b/kicker/kicker/ui/query.cpp index 12b9b6910..0bcff59c1 100644 --- a/kicker/kicker/ui/query.cpp +++ b/kicker/kicker/ui/query.cpp @@ -111,7 +111,7 @@ bool Query::matches(const TQString &term) bool next_alternative = false; for ( TQStringList::ConstIterator it = alt->excludes.begin(); it != alt->excludes.end(); ++it ) { - if ( lower_term.find(*it)!=-1 ) { + if ( lower_term.tqfind(*it)!=-1 ) { next_alternative = true; continue; } @@ -120,7 +120,7 @@ bool Query::matches(const TQString &term) continue; for ( TQStringList::ConstIterator it = alt->includes.begin(); it != alt->includes.end(); ++it ) { - if ( lower_term.find(*it)==-1 ) { + if ( lower_term.tqfind(*it)==-1 ) { next_alternative = true; continue; } diff --git a/kicker/kicker/ui/removeapplet_mnu.cpp b/kicker/kicker/ui/removeapplet_mnu.cpp index 2e0543dae..3c14a74aa 100644 --- a/kicker/kicker/ui/removeapplet_mnu.cpp +++ b/kicker/kicker/ui/removeapplet_mnu.cpp @@ -63,7 +63,7 @@ void PanelRemoveAppletMenu::slotAboutToShow() } items.append(PanelMenuItemInfo(container->icon(), - container->visibleName().replace("&", "&&"), + container->visibleName().tqreplace("&", "&&"), id)); ++id; ++it; diff --git a/kicker/kicker/ui/removeapplet_mnu.h b/kicker/kicker/ui/removeapplet_mnu.h index b444b8540..895ded710 100644 --- a/kicker/kicker/ui/removeapplet_mnu.h +++ b/kicker/kicker/ui/removeapplet_mnu.h @@ -32,7 +32,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. class ContainerArea; -class PanelRemoveAppletMenu : public QPopupMenu +class PanelRemoveAppletMenu : public TQPopupMenu { Q_OBJECT diff --git a/kicker/kicker/ui/removebutton_mnu.h b/kicker/kicker/ui/removebutton_mnu.h index d326a2f62..211edd771 100644 --- a/kicker/kicker/ui/removebutton_mnu.h +++ b/kicker/kicker/ui/removebutton_mnu.h @@ -32,7 +32,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. class ContainerArea; -class PanelRemoveButtonMenu : public QPopupMenu +class PanelRemoveButtonMenu : public TQPopupMenu { Q_OBJECT diff --git a/kicker/kicker/ui/removecontainer_mnu.h b/kicker/kicker/ui/removecontainer_mnu.h index 6dd28dc30..bd6d03d89 100644 --- a/kicker/kicker/ui/removecontainer_mnu.h +++ b/kicker/kicker/ui/removecontainer_mnu.h @@ -28,7 +28,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. class ContainerArea; -class RemoveContainerMenu : public QPopupMenu +class RemoveContainerMenu : public TQPopupMenu { Q_OBJECT diff --git a/kicker/kicker/ui/removeextension_mnu.cpp b/kicker/kicker/ui/removeextension_mnu.cpp index 9d5d80d2b..e1d8d62c4 100644 --- a/kicker/kicker/ui/removeextension_mnu.cpp +++ b/kicker/kicker/ui/removeextension_mnu.cpp @@ -57,7 +57,7 @@ void PanelRemoveExtensionMenu::slotAboutToShow() for (ExtensionList::iterator it = m_containers.begin(); it != itEnd; ++it) { const AppletInfo info = (*it)->info(); - TQString name = info.name().replace("&", "&&"); + TQString name = info.name().tqreplace("&", "&&"); switch ((*it)->position()) { case KPanelExtension::Top: diff --git a/kicker/kicker/ui/removeextension_mnu.h b/kicker/kicker/ui/removeextension_mnu.h index 2fc83008a..e77522bc8 100644 --- a/kicker/kicker/ui/removeextension_mnu.h +++ b/kicker/kicker/ui/removeextension_mnu.h @@ -29,7 +29,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "container_extension.h" -class PanelRemoveExtensionMenu : public QPopupMenu +class PanelRemoveExtensionMenu : public TQPopupMenu { Q_OBJECT diff --git a/kicker/kicker/ui/service_mnu.cpp b/kicker/kicker/ui/service_mnu.cpp index 3042eddfe..76aa6162e 100644 --- a/kicker/kicker/ui/service_mnu.cpp +++ b/kicker/kicker/ui/service_mnu.cpp @@ -231,7 +231,7 @@ void PanelServiceMenu::fillMenu(KServiceGroup::Ptr& _root, TQString inlineHeaderName = g->showInlineHeader() ? groupCaption : ""; // Item names may contain ampersands. To avoid them being converted // to accelerators, replace them with two ampersands. - groupCaption.replace("&", "&&"); + groupCaption.tqreplace("&", "&&"); if ( nbChildCount == 1 && g->allowInline() && g->inlineAlias()) { @@ -411,10 +411,10 @@ void PanelServiceMenu::insertMenuItem(KService::Ptr & s, int nId, if (KickerSettings::menuEntryFormat() == KickerSettings::NameAndDescription) { if ((!suppressGenericNames || - !suppressGenericNames->contains(s->untranslatedGenericName())) && - serviceName.find(comment, 0, true) == -1) + !suppressGenericNames->tqcontains(s->untranslatedGenericName())) && + serviceName.tqfind(comment, 0, true) == -1) { - if (comment.find(serviceName, 0, true) == -1) + if (comment.tqfind(serviceName, 0, true) == -1) { serviceName = i18n("Entries in K-menu: %1 app name, %2 description", "%1 - %2").arg(serviceName, comment); } @@ -450,7 +450,7 @@ void PanelServiceMenu::insertMenuItem(KService::Ptr & s, int nId, // item names may contain ampersands. To avoid them being converted // to accelerators, replace them with two ampersands. - serviceName.replace("&", "&&"); + serviceName.tqreplace("&", "&&"); TQString icon = s->icon(); if (icon=="unknown") @@ -544,7 +544,7 @@ bool PanelServiceMenu::highlightMenuItem( const TQString &menuItemId ) void PanelServiceMenu::slotExec(int id) { - if (!entryMap_.contains(id)) + if (!entryMap_.tqcontains(id)) { return; } @@ -569,7 +569,7 @@ void PanelServiceMenu::mousePressEvent(TQMouseEvent * ev) void PanelServiceMenu::mouseReleaseEvent(TQMouseEvent * ev) { - if (ev->button() == RightButton && !Kicker::the()->isKioskImmutable()) + if (ev->button() == Qt::RightButton && !Kicker::the()->isKioskImmutable()) { int id = idAt( ev->pos() ); @@ -578,7 +578,7 @@ void PanelServiceMenu::mouseReleaseEvent(TQMouseEvent * ev) return; } - if (!entryMap_.contains(id)) + if (!entryMap_.tqcontains(id)) { kdDebug(1210) << "Cannot find service with menu id " << id << endl; return; @@ -694,8 +694,8 @@ void PanelServiceMenu::slotContextMenu(int selected) } case EditItem: - proc = new KProcess(this); - *proc << KStandardDirs::findExe(TQString::fromLatin1("kmenuedit")); + proc = new KProcess(TQT_TQOBJECT(this)); + *proc << KStandardDirs::findExe(TQString::tqfromLatin1("kmenuedit")); *proc << "/"+relPath_ << static_cast<KService *>(contextKSycocaEntry_)->menuId(); proc->start(); break; @@ -738,8 +738,8 @@ void PanelServiceMenu::slotContextMenu(int selected) } case EditMenu: - proc = new KProcess(this); - *proc << KStandardDirs::findExe(TQString::fromLatin1("kmenuedit")); + proc = new KProcess(TQT_TQOBJECT(this)); + *proc << KStandardDirs::findExe(TQString::tqfromLatin1("kmenuedit")); *proc << "/"+static_cast<KServiceGroup *>(contextKSycocaEntry_)->relPath(); proc->start(); break; @@ -756,7 +756,7 @@ void PanelServiceMenu::mouseMoveEvent(TQMouseEvent * ev) if (Kicker::the()->isKioskImmutable()) return; - if ( (ev->state() & LeftButton ) != LeftButton ) + if ( (ev->state() & Qt::LeftButton ) != Qt::LeftButton ) return; TQPoint p = ev->pos() - startPos_; @@ -769,7 +769,7 @@ void PanelServiceMenu::mouseMoveEvent(TQMouseEvent * ev) if (id < serviceMenuStartId()) return; - if (!entryMap_.contains(id)) { + if (!entryMap_.tqcontains(id)) { kdDebug(1210) << "Cannot find service with menu id " << id << endl; return; } @@ -838,7 +838,7 @@ void PanelServiceMenu::dragEnterEvent(TQDragEnterEvent *event) void PanelServiceMenu::dragLeaveEvent(TQDragLeaveEvent *) { // see PanelServiceMenu::dragEnterEvent why this is nescessary - if (!frameGeometry().contains(TQCursor::pos())) + if (!TQT_TQRECT_OBJECT(frameGeometry()).tqcontains(TQCursor::pos())) { KURLDrag::setTarget(0); } @@ -932,12 +932,12 @@ void PanelServiceMenu::setSearchString(const TQString &searchString) int id = *menuItemIt; KService* s = dynamic_cast< KService* >( static_cast< KSycocaEntry* >( entryMap_[ id ])); TQString menuText = text(id); - if (menuText.contains(searchString, false) > 0 - || ( s != NULL && ( s->name().contains(searchString, false) > 0 - || s->exec().contains(searchString, false) > 0 - || s->comment().contains(searchString, false) > 0 - || s->genericName().contains(searchString, false) > 0 - || s->exec().contains(searchString, false) > 0 ) + if (menuText.tqcontains(searchString, false) > 0 + || ( s != NULL && ( s->name().tqcontains(searchString, false) > 0 + || s->exec().tqcontains(searchString, false) > 0 + || s->comment().tqcontains(searchString, false) > 0 + || s->genericName().tqcontains(searchString, false) > 0 + || s->exec().tqcontains(searchString, false) > 0 ) )) { setItemEnabled(id, true); foundSomething = true; @@ -951,7 +951,7 @@ void PanelServiceMenu::setSearchString(const TQString &searchString) /*for (int i=count()-1; i>=0; --i) { int id = idAt(i); TQString menuText = text(id); - if (menuText.contains(searchString, false) > 0) { + if (menuText.tqcontains(searchString, false) > 0) { setItemEnabled(id, true); foundSomething = true; nonemptyMenus.insert(id); @@ -995,7 +995,7 @@ void PanelServiceMenu::updateRecentlyUsedApps(KService::Ptr &service) TQString strItem(service->desktopEntryPath()); // don't add an item from root kmenu level - if (!strItem.contains('/')) + if (!strItem.tqcontains('/')) { return; } |