diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:33:34 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:33:34 +0000 |
commit | c663b6440964f6ac48027143ac9e63298991f9d0 (patch) | |
tree | 6d8b0c5a5f9db1ee16acf98b1397cea9126b281d /kicker/kicker/core | |
parent | a061f7191beebb0e4a3b0c0a7c534ec5f22f2dc7 (diff) | |
download | tdebase-c663b6440964f6ac48027143ac9e63298991f9d0.tar.gz tdebase-c663b6440964f6ac48027143ac9e63298991f9d0.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1157639 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kicker/kicker/core')
32 files changed, 1061 insertions, 1061 deletions
diff --git a/kicker/kicker/core/applethandle.cpp b/kicker/kicker/core/applethandle.cpp index cd9de3c62..251cbc1bd 100644 --- a/kicker/kicker/core/applethandle.cpp +++ b/kicker/kicker/core/applethandle.cpp @@ -21,14 +21,14 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ******************************************************************/ -#include <qcursor.h> -#include <qlayout.h> -#include <qpainter.h> -#include <qstyle.h> -#include <qpixmapcache.h> -#include <qtimer.h> -#include <qtooltip.h> -#include <qimage.h> +#include <tqcursor.h> +#include <tqlayout.h> +#include <tqpainter.h> +#include <tqstyle.h> +#include <tqpixmapcache.h> +#include <tqtimer.h> +#include <tqtooltip.h> +#include <tqimage.h> #include <kpushbutton.h> #include <kapplication.h> @@ -43,7 +43,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "applethandle.h" AppletHandle::AppletHandle(AppletContainer* parent) - : QWidget(parent), + : TQWidget(parent), m_applet(parent), m_menuButton(0), m_drawHandle(false), @@ -52,7 +52,7 @@ AppletHandle::AppletHandle(AppletContainer* parent) { setBackgroundOrigin(AncestorOrigin); setMinimumSize(widthForHeight(0), heightForWidth(0)); - m_layout = new QBoxLayout(this, QBoxLayout::BottomToTop, 0, 0); + m_layout = new TQBoxLayout(this, TQBoxLayout::BottomToTop, 0, 0); m_dragBar = new AppletHandleDrag(this); m_dragBar->installEventFilter(this); @@ -64,25 +64,25 @@ AppletHandle::AppletHandle(AppletContainer* parent) m_menuButton->installEventFilter(this); m_layout->addWidget(m_menuButton); - connect(m_menuButton, SIGNAL(pressed()), - this, SLOT(menuButtonPressed())); - QToolTip::add(m_menuButton, i18n("%1 menu").arg(parent->info().name())); + connect(m_menuButton, TQT_SIGNAL(pressed()), + this, TQT_SLOT(menuButtonPressed())); + TQToolTip::add(m_menuButton, i18n("%1 menu").arg(parent->info().name())); } - QToolTip::add(this, i18n("%1 applet handle").arg(parent->info().name())); + TQToolTip::add(this, i18n("%1 applet handle").arg(parent->info().name())); resetLayout(); } int AppletHandle::heightForWidth( int /* w */ ) const { - int size = style().pixelMetric(QStyle::PM_DockWindowHandleExtent, this); + int size = style().pixelMetric(TQStyle::PM_DockWindowHandleExtent, this); return size; } int AppletHandle::widthForHeight( int /* h */ ) const { - int size = style().pixelMetric(QStyle::PM_DockWindowHandleExtent, this); + int size = style().pixelMetric(TQStyle::PM_DockWindowHandleExtent, this); return size; } @@ -101,19 +101,19 @@ void AppletHandle::setPopupDirection(KPanelApplet::Direction d) switch (m_popupDirection) { case KPanelApplet::Up: - m_layout->setDirection(QBoxLayout::BottomToTop); + m_layout->setDirection(TQBoxLayout::BottomToTop); a = Qt::UpArrow; break; case KPanelApplet::Down: - m_layout->setDirection(QBoxLayout::TopToBottom); + m_layout->setDirection(TQBoxLayout::TopToBottom); a = Qt::DownArrow; break; case KPanelApplet::Left: - m_layout->setDirection(QBoxLayout::RightToLeft); + m_layout->setDirection(TQBoxLayout::RightToLeft); a = Qt::LeftArrow; break; case KPanelApplet::Right: - m_layout->setDirection(QBoxLayout::LeftToRight); + m_layout->setDirection(TQBoxLayout::LeftToRight); a = Qt::RightArrow; break; } @@ -150,9 +150,9 @@ void AppletHandle::setFadeOutHandle(bool fadeOut) { if (!m_handleHoverTimer) { - m_handleHoverTimer = new QTimer(this); - connect(m_handleHoverTimer, SIGNAL(timeout()), - this, SLOT(checkHandleHover())); + m_handleHoverTimer = new TQTimer(this); + connect(m_handleHoverTimer, TQT_SIGNAL(timeout()), + this, TQT_SLOT(checkHandleHover())); m_applet->installEventFilter(this); } } @@ -166,13 +166,13 @@ void AppletHandle::setFadeOutHandle(bool fadeOut) resetLayout(); } -bool AppletHandle::eventFilter(QObject *o, QEvent *e) +bool AppletHandle::eventFilter(TQObject *o, TQEvent *e) { if (o == parent()) { switch (e->type()) { - case QEvent::Enter: + case TQEvent::Enter: { m_drawHandle = true; resetLayout(); @@ -184,14 +184,14 @@ bool AppletHandle::eventFilter(QObject *o, QEvent *e) break; } - case QEvent::Leave: + case TQEvent::Leave: { if (m_menuButton && m_menuButton->isOn()) { break; } - QWidget* w = dynamic_cast<QWidget*>(o); + TQWidget* w = dynamic_cast<TQWidget*>(o); bool nowDrawIt = false; if (w) @@ -199,7 +199,7 @@ bool AppletHandle::eventFilter(QObject *o, QEvent *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(QCursor::pos()))) + if (w->rect().contains(w->mapFromGlobal(TQCursor::pos()))) { nowDrawIt = true; } @@ -222,13 +222,13 @@ bool AppletHandle::eventFilter(QObject *o, QEvent *e) break; } - return QWidget::eventFilter( o, e ); + return TQWidget::eventFilter( o, e ); } else if (o == m_dragBar) { - if (e->type() == QEvent::MouseButtonPress) + if (e->type() == TQEvent::MouseButtonPress) { - QMouseEvent* ev = static_cast<QMouseEvent*>(e); + TQMouseEvent* ev = static_cast<TQMouseEvent*>(e); if (ev->button() == LeftButton || ev->button() == MidButton) { emit moveApplet(m_applet->mapFromGlobal(ev->globalPos())); @@ -236,9 +236,9 @@ bool AppletHandle::eventFilter(QObject *o, QEvent *e) } } - if (m_menuButton && e->type() == QEvent::MouseButtonPress) + if (m_menuButton && e->type() == TQEvent::MouseButtonPress) { - QMouseEvent* ev = static_cast<QMouseEvent*>(e); + TQMouseEvent* ev = static_cast<TQMouseEvent*>(e); if (ev->button() == RightButton) { if (!m_menuButton->isDown()) @@ -251,7 +251,7 @@ bool AppletHandle::eventFilter(QObject *o, QEvent *e) } } - return QWidget::eventFilter(o, e); // standard event processing + return TQWidget::eventFilter(o, e); // standard event processing } void AppletHandle::menuButtonPressed() @@ -263,7 +263,7 @@ void AppletHandle::menuButtonPressed() emit showAppletMenu(); - if (!onMenuButton(QCursor::pos())) + if (!onMenuButton(TQCursor::pos())) { toggleMenuButtonOff(); } @@ -274,7 +274,7 @@ void AppletHandle::checkHandleHover() if (!m_handleHoverTimer || (m_menuButton && m_menuButton->isOn()) || m_applet->geometry().contains(m_applet->mapToParent( - m_applet->mapFromGlobal(QCursor::pos())))) + m_applet->mapFromGlobal(TQCursor::pos())))) { return; } @@ -284,7 +284,7 @@ void AppletHandle::checkHandleHover() resetLayout(); } -bool AppletHandle::onMenuButton(const QPoint& point) const +bool AppletHandle::onMenuButton(const TQPoint& point) const { return m_menuButton && (childAt(mapFromGlobal(point)) == m_menuButton); } @@ -300,78 +300,78 @@ void AppletHandle::toggleMenuButtonOff() } AppletHandleDrag::AppletHandleDrag(AppletHandle* parent) - : QWidget(parent), + : TQWidget(parent), m_parent(parent), m_inside(false) { setBackgroundOrigin( AncestorOrigin ); } -QSize AppletHandleDrag::minimumSizeHint() const +TQSize AppletHandleDrag::minimumSizeHint() const { - int wh = style().pixelMetric(QStyle::PM_DockWindowHandleExtent, this); + int wh = style().pixelMetric(TQStyle::PM_DockWindowHandleExtent, this); if (m_parent->orientation() == Horizontal) { - return QSize(wh, 0); + return TQSize(wh, 0); } - return QSize(0, wh); + return TQSize(0, wh); } -QSizePolicy AppletHandleDrag::sizePolicy() const +TQSizePolicy AppletHandleDrag::sizePolicy() const { if (m_parent->orientation() == Horizontal) { - return QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Preferred ); + return TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Preferred ); } - return QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Fixed ); + return TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Fixed ); } -void AppletHandleDrag::enterEvent( QEvent *e ) +void AppletHandleDrag::enterEvent( TQEvent *e ) { m_inside = true; - QWidget::enterEvent( e ); + TQWidget::enterEvent( e ); update(); } -void AppletHandleDrag::leaveEvent( QEvent *e ) +void AppletHandleDrag::leaveEvent( TQEvent *e ) { m_inside = false; - QWidget::enterEvent( e ); + TQWidget::enterEvent( e ); update(); } -void AppletHandleDrag::paintEvent(QPaintEvent *) +void AppletHandleDrag::paintEvent(TQPaintEvent *) { - QPainter p(this); + TQPainter p(this); if (!KickerSettings::transparent()) { if (paletteBackgroundPixmap()) { - QPoint offset = backgroundOffset(); + TQPoint offset = backgroundOffset(); int ox = offset.x(); int oy = offset.y(); p.drawTiledPixmap( 0, 0, width(), height(),*paletteBackgroundPixmap(), ox, oy); } - QStyle::SFlags flags = QStyle::Style_Default; - flags |= QStyle::Style_Enabled; + TQStyle::SFlags flags = TQStyle::Style_Default; + flags |= TQStyle::Style_Enabled; if (m_parent->orientation() == Horizontal) { - flags |= QStyle::Style_Horizontal; + flags |= TQStyle::Style_Horizontal; } - QRect r = rect(); + TQRect r = rect(); - style().drawPrimitive(QStyle::PE_DockWindowHandle, &p, r, + style().drawPrimitive(TQStyle::PE_DockWindowHandle, &p, r, colorGroup(), flags); } else { - KickerLib::drawBlendedRect(&p, QRect(0, 0, width(), height()), paletteForegroundColor(), m_inside ? 0x40 : 0x20); + KickerLib::drawBlendedRect(&p, TQRect(0, 0, width(), height()), paletteForegroundColor(), m_inside ? 0x40 : 0x20); } } @@ -381,22 +381,22 @@ AppletHandleButton::AppletHandleButton(AppletHandle *parent) { } -QSize AppletHandleButton::minimumSizeHint() const +TQSize AppletHandleButton::minimumSizeHint() const { - int height = style().pixelMetric(QStyle::PM_DockWindowHandleExtent, this); + int height = style().pixelMetric(TQStyle::PM_DockWindowHandleExtent, this); int width = height; if (m_parent->orientation() == Horizontal) { - return QSize(width, height); + return TQSize(width, height); } - return QSize(height, width); + return TQSize(height, width); } -QSizePolicy AppletHandleButton::sizePolicy() const +TQSizePolicy AppletHandleButton::sizePolicy() const { - return QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ); + return TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ); } #include "applethandle.moc" diff --git a/kicker/kicker/core/applethandle.h b/kicker/kicker/core/applethandle.h index 2158756cb..ab340af06 100644 --- a/kicker/kicker/core/applethandle.h +++ b/kicker/kicker/core/applethandle.h @@ -24,8 +24,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #ifndef __applethandle_h__ #define __applethandle_h__ -#include <qwidget.h> -#include <qpushbutton.h> +#include <tqwidget.h> +#include <tqpushbutton.h> #include "container_applet.h" #include "simplebutton.h" @@ -45,7 +45,7 @@ class AppletHandle : public QWidget void resetLayout(); void setFadeOutHandle(bool); - bool eventFilter (QObject *, QEvent *); + bool eventFilter (TQObject *, TQEvent *); int widthForHeight( int h ) const; int heightForWidth( int w ) const; @@ -61,10 +61,10 @@ class AppletHandle : public QWidget return m_applet->orientation(); } - bool onMenuButton(const QPoint& point) const; + bool onMenuButton(const TQPoint& point) const; signals: - void moveApplet( const QPoint& moveOffset ); + void moveApplet( const TQPoint& moveOffset ); void showAppletMenu(); public slots: @@ -76,12 +76,12 @@ class AppletHandle : public QWidget private: AppletContainer* m_applet; - QBoxLayout* m_layout; + TQBoxLayout* m_layout; AppletHandleDrag* m_dragBar; AppletHandleButton* m_menuButton; bool m_drawHandle; KPanelApplet::Direction m_popupDirection; - QTimer* m_handleHoverTimer; + TQTimer* m_handleHoverTimer; bool m_inside; }; @@ -92,15 +92,15 @@ class AppletHandleDrag : public QWidget public: AppletHandleDrag(AppletHandle* parent); - QSize minimumSizeHint() const; - QSize minimumSize() const { return minimumSizeHint(); } - QSize sizeHint() const { return minimumSize(); } - QSizePolicy sizePolicy() const; + TQSize minimumSizeHint() const; + TQSize minimumSize() const { return minimumSizeHint(); } + TQSize sizeHint() const { return minimumSize(); } + TQSizePolicy sizePolicy() const; protected: - void paintEvent( QPaintEvent* ); - void enterEvent( QEvent* ); - void leaveEvent( QEvent* ); + void paintEvent( TQPaintEvent* ); + void enterEvent( TQEvent* ); + void leaveEvent( TQEvent* ); const AppletHandle* m_parent; private: @@ -113,10 +113,10 @@ class AppletHandleButton : public SimpleArrowButton public: AppletHandleButton(AppletHandle *parent); - QSize minimumSizeHint() const; - QSize minimumSize() const { return minimumSizeHint(); } - QSize sizeHint() const { return minimumSize(); } - QSizePolicy sizePolicy() const; + TQSize minimumSizeHint() const; + TQSize minimumSize() const { return minimumSizeHint(); } + TQSize sizeHint() const { return minimumSize(); } + TQSizePolicy sizePolicy() const; private: bool m_moveMouse; diff --git a/kicker/kicker/core/container_applet.cpp b/kicker/kicker/core/container_applet.cpp index 390b934d3..77c6d1912 100644 --- a/kicker/kicker/core/container_applet.cpp +++ b/kicker/kicker/core/container_applet.cpp @@ -21,14 +21,14 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ******************************************************************/ -#include <qcursor.h> +#include <tqcursor.h> #include <qxembed.h> -#include <qframe.h> -#include <qlayout.h> -#include <qhbox.h> -#include <qfile.h> -#include <qtimer.h> -#include <qtooltip.h> +#include <tqframe.h> +#include <tqlayout.h> +#include <tqhbox.h> +#include <tqfile.h> +#include <tqtimer.h> +#include <tqtooltip.h> #include <dcopclient.h> #include <kapplication.h> @@ -57,12 +57,12 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define APPLET_MARGIN 1 AppletContainer::AppletContainer(const AppletInfo& info, - QPopupMenu* opMenu, + TQPopupMenu* opMenu, bool immutable, - QWidget* parent ) + TQWidget* parent ) : BaseContainer(opMenu, parent, - QString(info.library() + "container").latin1()), + TQString(info.library() + "container").latin1()), _info(info), _handle(0), _layout(0), @@ -74,28 +74,28 @@ AppletContainer::AppletContainer(const AppletInfo& info, setBackgroundOrigin(AncestorOrigin); //setup appletframe - _appletframe = new QHBox(this); + _appletframe = new TQHBox(this); _appletframe->setBackgroundOrigin( AncestorOrigin ); - _appletframe->setFrameStyle(QFrame::NoFrame); + _appletframe->setFrameStyle(TQFrame::NoFrame); _appletframe->installEventFilter(this); if (orientation() == Horizontal) { - _layout = new QBoxLayout(this, QBoxLayout::LeftToRight, 0, 0); + _layout = new TQBoxLayout(this, TQBoxLayout::LeftToRight, 0, 0); } else { - _layout = new QBoxLayout(this, QBoxLayout::TopToBottom, 0, 0); + _layout = new TQBoxLayout(this, TQBoxLayout::TopToBottom, 0, 0); } - _layout->setResizeMode( QLayout::FreeResize ); + _layout->setResizeMode( TQLayout::FreeResize ); _layout->addSpacing(APPLET_MARGIN); _handle = new AppletHandle(this); _layout->addWidget(_handle, 0); - connect(_handle, SIGNAL(moveApplet(const QPoint&)), - this, SLOT(moveApplet(const QPoint&))); - connect(_handle, SIGNAL(showAppletMenu()), this, SLOT(showAppletMenu())); + connect(_handle, TQT_SIGNAL(moveApplet(const TQPoint&)), + this, TQT_SLOT(moveApplet(const TQPoint&))); + connect(_handle, TQT_SIGNAL(showAppletMenu()), this, TQT_SLOT(showAppletMenu())); _layout->addWidget(_appletframe, 1); _layout->activate(); @@ -124,12 +124,12 @@ AppletContainer::AppletContainer(const AppletInfo& info, setImmutable(immutable); - connect(_applet, SIGNAL(updateLayout()), SLOT(slotUpdateLayout())); - connect(_applet, SIGNAL(requestFocus()), SLOT(activateWindow())); - connect(_applet, SIGNAL(requestFocus(bool)), SLOT(focusRequested(bool))); + connect(_applet, TQT_SIGNAL(updateLayout()), TQT_SLOT(slotUpdateLayout())); + connect(_applet, TQT_SIGNAL(requestFocus()), TQT_SLOT(activateWindow())); + connect(_applet, TQT_SIGNAL(requestFocus(bool)), TQT_SLOT(focusRequested(bool))); - connect(Kicker::the(), SIGNAL(configurationChanged()), - this, SLOT(slotReconfigure())); + connect(Kicker::the(), TQT_SIGNAL(configurationChanged()), + this, TQT_SLOT(slotReconfigure())); } void AppletContainer::configure() @@ -193,17 +193,17 @@ void AppletContainer::resetLayout() if (orientation() == Horizontal) { - _layout->setDirection( QBoxLayout::LeftToRight ); + _layout->setDirection( TQBoxLayout::LeftToRight ); } else { - _layout->setDirection( QBoxLayout::TopToBottom ); + _layout->setDirection( TQBoxLayout::TopToBottom ); } _layout->activate(); } -void AppletContainer::moveApplet( const QPoint& moveOffset ) +void AppletContainer::moveApplet( const TQPoint& moveOffset ) { _moveOffset = moveOffset; emit moveme(this); @@ -221,7 +221,7 @@ void AppletContainer::showAppletMenu() return; } - QPopupMenu *menu = opMenu(); + TQPopupMenu *menu = opMenu(); Kicker::the()->setInsertionPoint(_handle->mapToGlobal(_handle->rect().center())); @@ -231,7 +231,7 @@ void AppletContainer::showAppletMenu() moveApplet(_handle->mapToParent(_handle->rect().center())); break; case PanelAppletOpMenu::Remove: - Kicker::the()->setInsertionPoint(QPoint()); + Kicker::the()->setInsertionPoint(TQPoint()); emit removeme(this); return; // Above signal will cause this to be deleted. break; @@ -251,7 +251,7 @@ void AppletContainer::showAppletMenu() break; } - Kicker::the()->setInsertionPoint(QPoint()); + Kicker::the()->setInsertionPoint(TQPoint()); clearOpMenu(); } @@ -270,7 +270,7 @@ void AppletContainer::slotRemoved(KConfig* config) return; } - QFile::remove(locateLocal("config", _configFile)); + TQFile::remove(locateLocal("config", _configFile)); } void AppletContainer::activateWindow() @@ -314,15 +314,15 @@ void AppletContainer::doSaveConfiguration( KConfigGroup& config, } } -QPopupMenu* AppletContainer::createOpMenu() +TQPopupMenu* AppletContainer::createOpMenu() { - QPopupMenu* opMenu = new PanelAppletOpMenu(_actions, appletOpMenu(), + TQPopupMenu* opMenu = new PanelAppletOpMenu(_actions, appletOpMenu(), appletsOwnMenu(), _info.name(), _info.icon(), this); - connect(opMenu, SIGNAL(escapePressed()), - _handle, SLOT(toggleMenuButtonOff())); + connect(opMenu, TQT_SIGNAL(escapePressed()), + _handle, TQT_SLOT(toggleMenuButtonOff())); return opMenu; } @@ -339,7 +339,7 @@ void AppletContainer::slotUpdateLayout() } -const QPopupMenu* AppletContainer::appletsOwnMenu() const +const TQPopupMenu* AppletContainer::appletsOwnMenu() const { if (!_applet) { @@ -447,8 +447,8 @@ void AppletContainer::setBackground() if (KickerSettings::transparent()) { // Trick to tell applets that they must refresh their transparent background if they need. - QMoveEvent e(_applet->pos(), _applet->pos()); - QApplication::sendEvent(_applet, &e); + TQMoveEvent e(_applet->pos(), _applet->pos()); + TQApplication::sendEvent(_applet, &e); } } @@ -471,7 +471,7 @@ void AppletContainer::setImmutable(bool immutable) } else if (!_handle->isVisibleTo(this)) { - QToolTip::add(_handle, _info.name()); + TQToolTip::add(_handle, _info.name()); _handle->show(); setBackground(); } diff --git a/kicker/kicker/core/container_applet.h b/kicker/kicker/core/container_applet.h index 8c364c09f..11eed1bfe 100644 --- a/kicker/kicker/core/container_applet.h +++ b/kicker/kicker/core/container_applet.h @@ -43,11 +43,11 @@ class AppletContainer : public BaseContainer Q_OBJECT public: - AppletContainer(const AppletInfo& info, QPopupMenu* opMenu, bool isImmutable = false, QWidget* parent = 0); + AppletContainer(const AppletInfo& info, TQPopupMenu* opMenu, bool isImmutable = false, TQWidget* parent = 0); KPanelApplet::Type type() const { return _type; } const AppletInfo& info() const { return _info; } - const QPopupMenu* appletsOwnMenu() const; + const TQPopupMenu* appletsOwnMenu() const; bool isStretch() const { return type() == KPanelApplet::Stretch; } void resetLayout(); @@ -58,9 +58,9 @@ public: virtual void reportBug(); virtual void setBackground(); virtual bool isValid() const { return _valid; } - virtual QString appletType() const { return "Applet"; } - virtual QString icon() const { return _info.icon(); } - virtual QString visibleName() const { return _info.name(); } + virtual TQString appletType() const { return "Applet"; } + virtual TQString icon() const { return _info.icon(); } + virtual TQString visibleName() const { return _info.name(); } int widthForHeight(int height) const; int heightForWidth(int width) const; @@ -76,7 +76,7 @@ public slots: virtual void setPopupDirection(KPanelApplet::Direction d); virtual void setOrientation(KPanelExtension::Orientation o); virtual void setImmutable(bool immutable); - void moveApplet( const QPoint& moveOffset ); + void moveApplet( const TQPoint& moveOffset ); void showAppletMenu(); void slotReconfigure(); void activateWindow(); @@ -86,18 +86,18 @@ protected: virtual void doSaveConfiguration( KConfigGroup&, bool layoutOnly ) const; virtual void alignmentChange(KPanelExtension::Alignment a); - virtual QPopupMenu* createOpMenu(); + virtual TQPopupMenu* createOpMenu(); AppletInfo _info; AppletHandle *_handle; - QHBox *_appletframe; - QBoxLayout *_layout; + TQHBox *_appletframe; + TQBoxLayout *_layout; KPanelApplet::Type _type; int _widthForHeightHint; int _heightForWidthHint; - QString _deskFile, _configFile; + TQString _deskFile, _configFile; bool _firstuse; - QCString _id; + TQCString _id; KPanelApplet * _applet; bool _valid; diff --git a/kicker/kicker/core/container_base.cpp b/kicker/kicker/core/container_base.cpp index cadbe592a..bb3d7d984 100644 --- a/kicker/kicker/core/container_base.cpp +++ b/kicker/kicker/core/container_base.cpp @@ -21,7 +21,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ******************************************************************/ -#include <qpopupmenu.h> +#include <tqpopupmenu.h> #include <kglobal.h> #include <kconfig.h> @@ -34,14 +34,14 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "container_base.h" #include "container_base.moc" -BaseContainer::BaseContainer( QPopupMenu* appletOpMenu, QWidget* parent, const char * name ) - : QWidget( parent, name ) +BaseContainer::BaseContainer( TQPopupMenu* appletOpMenu, TQWidget* parent, const char * name ) + : TQWidget( parent, name ) , _dir(KPanelApplet::Up) , _orient(Horizontal) , _alignment(KPanelExtension::LeftTop) , _fspace(0) - , _moveOffset(QPoint(0,0)) - , _aid(QString::null) + , _moveOffset(TQPoint(0,0)) + , _aid(TQString::null) , _actions(0) , m_immutable(false) , _opMnu(0) @@ -53,10 +53,10 @@ BaseContainer::~BaseContainer() delete _opMnu; } -void BaseContainer::reparent(QWidget* parent, WFlags f, const QPoint& p, bool showIt) +void BaseContainer::reparent(TQWidget* parent, WFlags f, const TQPoint& p, bool showIt) { emit takeme(this); - QWidget::reparent(parent, f, p, showIt); + TQWidget::reparent(parent, f, p, showIt); } bool BaseContainer::isImmutable() const @@ -121,7 +121,7 @@ void BaseContainer::setAlignment(KPanelExtension::Alignment a) alignmentChange(a); } -QPopupMenu* BaseContainer::opMenu() +TQPopupMenu* BaseContainer::opMenu() { if (_opMnu == 0) { diff --git a/kicker/kicker/core/container_base.h b/kicker/kicker/core/container_base.h index aa3efeb98..1da1500cd 100644 --- a/kicker/kicker/core/container_base.h +++ b/kicker/kicker/core/container_base.h @@ -24,9 +24,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #ifndef __container_base_h__ #define __container_base_h__ -#include <qwidget.h> -#include <qpoint.h> -#include <qvaluelist.h> +#include <tqwidget.h> +#include <tqpoint.h> +#include <tqvaluelist.h> #include <kpanelextension.h> #include <kpanelapplet.h> @@ -39,14 +39,14 @@ class BaseContainer : public QWidget Q_OBJECT public: - typedef QValueList<BaseContainer*> List; - typedef QValueListIterator<BaseContainer*> Iterator; - typedef QValueListConstIterator<BaseContainer*> ConstIterator; + typedef TQValueList<BaseContainer*> List; + typedef TQValueListIterator<BaseContainer*> Iterator; + typedef TQValueListConstIterator<BaseContainer*> ConstIterator; - BaseContainer( QPopupMenu* appletOpMenu, QWidget* parent = 0, const char * name = 0 ); + BaseContainer( TQPopupMenu* appletOpMenu, TQWidget* parent = 0, const char * name = 0 ); ~BaseContainer(); - virtual void reparent(QWidget * parent, WFlags f, const QPoint & p, bool showIt = false); + virtual void reparent(TQWidget * parent, WFlags f, const TQPoint & p, bool showIt = false); virtual int widthForHeight(int height) const = 0; virtual int heightForWidth(int width) const = 0; @@ -66,8 +66,8 @@ public: double freeSpace() const { return _fspace; } void setFreeSpace(double f) { _fspace = f; } - QString appletId() const { return _aid; } - void setAppletId(const QString& s) { _aid = s; } + TQString appletId() const { return _aid; } + void setAppletId(const TQString& s) { _aid = s; } virtual int actions() const { return _actions; } @@ -77,7 +77,7 @@ public: virtual void setBackground() {} - QPopupMenu* opMenu(); + TQPopupMenu* opMenu(); void clearOpMenu(); void loadConfiguration( KConfigGroup& ); @@ -86,11 +86,11 @@ public: void configure(KPanelExtension::Orientation, KPanelApplet::Direction); virtual void configure() {} - QPoint moveOffset() const { return _moveOffset; } + TQPoint moveOffset() const { return _moveOffset; } - virtual QString appletType() const = 0; - virtual QString icon() const { return "unknown"; } - virtual QString visibleName() const = 0; + virtual TQString appletType() const = 0; + virtual TQString icon() const { return "unknown"; } + virtual TQString visibleName() const = 0; public slots: virtual void slotRemoved(KConfig* config); @@ -113,21 +113,21 @@ protected: bool /* layoutOnly */ ) const {} virtual void alignmentChange(KPanelExtension::Alignment) {} - virtual QPopupMenu* createOpMenu() = 0; - QPopupMenu *appletOpMenu() const { return _appletOpMnu; } + virtual TQPopupMenu* createOpMenu() = 0; + TQPopupMenu *appletOpMenu() const { return _appletOpMnu; } KPanelApplet::Direction _dir; KPanelExtension::Orientation _orient; KPanelExtension::Alignment _alignment; double _fspace; - QPoint _moveOffset; - QString _aid; + TQPoint _moveOffset; + TQString _aid; int _actions; bool m_immutable; private: - QPopupMenu *_opMnu; - QPopupMenu *_appletOpMnu; + TQPopupMenu *_opMnu; + TQPopupMenu *_appletOpMnu; }; #endif diff --git a/kicker/kicker/core/container_button.cpp b/kicker/kicker/core/container_button.cpp index b050f371d..8ac39a47f 100644 --- a/kicker/kicker/core/container_button.cpp +++ b/kicker/kicker/core/container_button.cpp @@ -23,7 +23,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <algorithm> -#include <qlayout.h> +#include <tqlayout.h> #include <kapplication.h> #include <kconfig.h> @@ -56,7 +56,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "container_button.h" #include "container_button.moc" -ButtonContainer::ButtonContainer(QPopupMenu* opMenu, QWidget* parent) +ButtonContainer::ButtonContainer(TQPopupMenu* opMenu, TQWidget* parent) : BaseContainer(opMenu, parent) , _button(0) , _layout(0) @@ -145,21 +145,21 @@ void ButtonContainer::embedButton(PanelButton* b) if (!b) return; delete _layout; - _layout = new QVBoxLayout(this); + _layout = new TQVBoxLayout(this); _button = b; _button->installEventFilter(this); _layout->add(_button); - connect(_button, SIGNAL(requestSave()), SIGNAL(requestSave())); - connect(_button, SIGNAL(hideme(bool)), SLOT(hideRequested(bool))); - connect(_button, SIGNAL(removeme()), SLOT(removeRequested())); - connect(_button, SIGNAL(dragme(const QPixmap)), - SLOT(dragButton(const QPixmap))); - connect(_button, SIGNAL(dragme(const KURL::List, const QPixmap)), - SLOT(dragButton(const KURL::List, const QPixmap))); + connect(_button, TQT_SIGNAL(requestSave()), TQT_SIGNAL(requestSave())); + connect(_button, TQT_SIGNAL(hideme(bool)), TQT_SLOT(hideRequested(bool))); + connect(_button, TQT_SIGNAL(removeme()), TQT_SLOT(removeRequested())); + connect(_button, TQT_SIGNAL(dragme(const TQPixmap)), + TQT_SLOT(dragButton(const TQPixmap))); + connect(_button, TQT_SIGNAL(dragme(const KURL::List, const TQPixmap)), + TQT_SLOT(dragButton(const KURL::List, const TQPixmap))); } -QPopupMenu* ButtonContainer::createOpMenu() +TQPopupMenu* ButtonContainer::createOpMenu() { return new PanelAppletOpMenu(_actions, appletOpMenu(), 0, _button->title(), _button->icon(), this); @@ -187,7 +187,7 @@ void ButtonContainer::hideRequested(bool shouldHide) } } -void ButtonContainer::dragButton(const KURL::List urls, const QPixmap icon) +void ButtonContainer::dragButton(const KURL::List urls, const TQPixmap icon) { if (isImmutable()) { @@ -203,7 +203,7 @@ void ButtonContainer::dragButton(const KURL::List urls, const QPixmap icon) releaseKeyboard(); } -void ButtonContainer::dragButton(const QPixmap icon) +void ButtonContainer::dragButton(const TQPixmap icon) { PanelDrag* dd = new PanelDrag(this, this); dd->setPixmap(icon); @@ -212,9 +212,9 @@ void ButtonContainer::dragButton(const QPixmap icon) releaseKeyboard(); } -bool ButtonContainer::eventFilter(QObject *o, QEvent *e) +bool ButtonContainer::eventFilter(TQObject *o, TQEvent *e) { - if (o == _button && e->type() == QEvent::MouseButtonPress) + if (o == _button && e->type() == TQEvent::MouseButtonPress) { static bool sentinal = false; @@ -224,7 +224,7 @@ bool ButtonContainer::eventFilter(QObject *o, QEvent *e) } sentinal = true; - QMouseEvent* me = static_cast<QMouseEvent*>(e); + TQMouseEvent* me = static_cast<TQMouseEvent*>(e); switch (me->button()) { case MidButton: @@ -249,11 +249,11 @@ bool ButtonContainer::eventFilter(QObject *o, QEvent *e) break; } - QPopupMenu* menu = opMenu(); - connect( menu, SIGNAL( aboutToHide() ), this, SLOT( slotMenuClosed() ) ); - QPoint pos = KickerLib::popupPosition(popupDirection(), menu, this, + TQPopupMenu* menu = opMenu(); + connect( menu, TQT_SIGNAL( aboutToHide() ), this, TQT_SLOT( slotMenuClosed() ) ); + TQPoint pos = KickerLib::popupPosition(popupDirection(), menu, this, (orientation() == Horizontal) ? - QPoint(0, 0) : me->pos()); + TQPoint(0, 0) : me->pos()); Kicker::the()->setInsertionPoint(me->globalPos()); @@ -284,7 +284,7 @@ bool ButtonContainer::eventFilter(QObject *o, QEvent *e) } KickerTip::enableTipping(true); - Kicker::the()->setInsertionPoint(QPoint()); + Kicker::the()->setInsertionPoint(TQPoint()); clearOpMenu(); sentinal = false; return true; @@ -322,7 +322,7 @@ void ButtonContainer::checkImmutability(const KConfigGroup& config) } // KMenuButton containerpan -KMenuButtonContainer::KMenuButtonContainer(const KConfigGroup& config, QPopupMenu *opMenu, QWidget* parent) +KMenuButtonContainer::KMenuButtonContainer(const KConfigGroup& config, TQPopupMenu *opMenu, TQWidget* parent) : ButtonContainer(opMenu, parent) { checkImmutability(config); @@ -330,7 +330,7 @@ KMenuButtonContainer::KMenuButtonContainer(const KConfigGroup& config, QPopupMen _actions = PanelAppletOpMenu::KMenuEditor; } -KMenuButtonContainer::KMenuButtonContainer(QPopupMenu *opMenu, QWidget* parent) +KMenuButtonContainer::KMenuButtonContainer(TQPopupMenu *opMenu, TQWidget* parent) : ButtonContainer(opMenu, parent) { embedButton( new KButton(this) ); @@ -346,14 +346,14 @@ int KMenuButtonContainer::heightForWidth( int width ) const } // DesktopButton container -DesktopButtonContainer::DesktopButtonContainer(QPopupMenu *opMenu, QWidget* parent) +DesktopButtonContainer::DesktopButtonContainer(TQPopupMenu *opMenu, TQWidget* parent) : ButtonContainer(opMenu, parent) { embedButton( new DesktopButton(this) ); } DesktopButtonContainer::DesktopButtonContainer(const KConfigGroup& config, - QPopupMenu *opMenu, QWidget* parent) + TQPopupMenu *opMenu, TQWidget* parent) : ButtonContainer(opMenu, parent) { checkImmutability(config); @@ -361,8 +361,8 @@ DesktopButtonContainer::DesktopButtonContainer(const KConfigGroup& config, } // ServiceButton container -ServiceButtonContainer::ServiceButtonContainer( const QString& desktopFile, - QPopupMenu* opMenu, QWidget* parent) +ServiceButtonContainer::ServiceButtonContainer( const TQString& desktopFile, + TQPopupMenu* opMenu, TQWidget* parent) : ButtonContainer(opMenu, parent) { embedButton( new ServiceButton( desktopFile, this ) ); @@ -370,7 +370,7 @@ ServiceButtonContainer::ServiceButtonContainer( const QString& desktopFile, } ServiceButtonContainer::ServiceButtonContainer( const KService::Ptr &service, - QPopupMenu* opMenu, QWidget* parent) + TQPopupMenu* opMenu, TQWidget* parent) : ButtonContainer(opMenu, parent) { embedButton( new ServiceButton( service, this ) ); @@ -378,7 +378,7 @@ ServiceButtonContainer::ServiceButtonContainer( const KService::Ptr &service, } ServiceButtonContainer::ServiceButtonContainer( const KConfigGroup& config, - QPopupMenu* opMenu, QWidget* parent) + TQPopupMenu* opMenu, TQWidget* parent) : ButtonContainer(opMenu, parent) { checkImmutability(config); @@ -386,25 +386,25 @@ ServiceButtonContainer::ServiceButtonContainer( const KConfigGroup& config, _actions = KPanelApplet::Preferences; } -QString ServiceButtonContainer::icon() const +TQString ServiceButtonContainer::icon() const { return button()->icon(); } -QString ServiceButtonContainer::visibleName() const +TQString ServiceButtonContainer::visibleName() const { return button()->title(); } // URLButton container -URLButtonContainer::URLButtonContainer( const QString& url, QPopupMenu* opMenu, QWidget* parent ) +URLButtonContainer::URLButtonContainer( const TQString& url, TQPopupMenu* opMenu, TQWidget* parent ) : ButtonContainer(opMenu, parent) { embedButton( new URLButton( url, this ) ); _actions = KPanelApplet::Preferences; } -URLButtonContainer::URLButtonContainer( const KConfigGroup& config, QPopupMenu* opMenu, QWidget* parent) +URLButtonContainer::URLButtonContainer( const KConfigGroup& config, TQPopupMenu* opMenu, TQWidget* parent) : ButtonContainer(opMenu, parent) { checkImmutability(config); @@ -412,25 +412,25 @@ URLButtonContainer::URLButtonContainer( const KConfigGroup& config, QPopupMenu* _actions = KPanelApplet::Preferences; } -QString URLButtonContainer::icon() const +TQString URLButtonContainer::icon() const { return button()->icon(); } -QString URLButtonContainer::visibleName() const +TQString URLButtonContainer::visibleName() const { return button()->title(); } // BrowserButton container -BrowserButtonContainer::BrowserButtonContainer(const QString &startDir, QPopupMenu* opMenu, const QString& icon, QWidget* parent) +BrowserButtonContainer::BrowserButtonContainer(const TQString &startDir, TQPopupMenu* opMenu, const TQString& icon, TQWidget* parent) : ButtonContainer(opMenu, parent) { embedButton( new BrowserButton(icon, startDir, this) ); _actions = KPanelApplet::Preferences; } -BrowserButtonContainer::BrowserButtonContainer( const KConfigGroup& config, QPopupMenu* opMenu, QWidget* parent) +BrowserButtonContainer::BrowserButtonContainer( const KConfigGroup& config, TQPopupMenu* opMenu, TQWidget* parent) : ButtonContainer(opMenu, parent) { checkImmutability(config); @@ -439,45 +439,45 @@ BrowserButtonContainer::BrowserButtonContainer( const KConfigGroup& config, QPop } // ServiceMenuButton container -ServiceMenuButtonContainer::ServiceMenuButtonContainer(const QString& relPath, QPopupMenu* opMenu, QWidget* parent) +ServiceMenuButtonContainer::ServiceMenuButtonContainer(const TQString& relPath, TQPopupMenu* opMenu, TQWidget* parent) : ButtonContainer(opMenu, parent) { embedButton( new ServiceMenuButton(relPath, this) ); } -ServiceMenuButtonContainer::ServiceMenuButtonContainer( const KConfigGroup& config, QPopupMenu* opMenu, QWidget* parent) +ServiceMenuButtonContainer::ServiceMenuButtonContainer( const KConfigGroup& config, TQPopupMenu* opMenu, TQWidget* parent) : ButtonContainer(opMenu, parent) { checkImmutability(config); embedButton( new ServiceMenuButton(config, this) ); } -QString ServiceMenuButtonContainer::icon() const +TQString ServiceMenuButtonContainer::icon() const { return button()->icon(); } -QString ServiceMenuButtonContainer::visibleName() const +TQString ServiceMenuButtonContainer::visibleName() const { return button()->title(); } // WindowListButton container -WindowListButtonContainer::WindowListButtonContainer(const KConfigGroup& config, QPopupMenu *opMenu, QWidget* parent) +WindowListButtonContainer::WindowListButtonContainer(const KConfigGroup& config, TQPopupMenu *opMenu, TQWidget* parent) : ButtonContainer(opMenu, parent) { checkImmutability(config); embedButton( new WindowListButton(this) ); } -WindowListButtonContainer::WindowListButtonContainer(QPopupMenu *opMenu, QWidget* parent) +WindowListButtonContainer::WindowListButtonContainer(TQPopupMenu *opMenu, TQWidget* parent) : ButtonContainer(opMenu, parent) { embedButton( new WindowListButton(this) ); } // BookmarkButton container -BookmarksButtonContainer::BookmarksButtonContainer(const KConfigGroup& config, QPopupMenu *opMenu, QWidget* parent) +BookmarksButtonContainer::BookmarksButtonContainer(const KConfigGroup& config, TQPopupMenu *opMenu, TQWidget* parent) : ButtonContainer(opMenu, parent) { checkImmutability(config); @@ -485,7 +485,7 @@ BookmarksButtonContainer::BookmarksButtonContainer(const KConfigGroup& config, Q _actions = PanelAppletOpMenu::BookmarkEditor; } -BookmarksButtonContainer::BookmarksButtonContainer(QPopupMenu *opMenu, QWidget* parent) +BookmarksButtonContainer::BookmarksButtonContainer(TQPopupMenu *opMenu, TQWidget* parent) : ButtonContainer(opMenu, parent) { embedButton( new BookmarksButton(this) ); @@ -493,14 +493,14 @@ BookmarksButtonContainer::BookmarksButtonContainer(QPopupMenu *opMenu, QWidget* } // NonKDEAppButton container -NonKDEAppButtonContainer::NonKDEAppButtonContainer(const QString &name, - const QString &description, - const QString &filePath, - const QString &icon, - const QString &cmdLine, +NonKDEAppButtonContainer::NonKDEAppButtonContainer(const TQString &name, + const TQString &description, + const TQString &filePath, + const TQString &icon, + const TQString &cmdLine, bool inTerm, - QPopupMenu* opMenu, - QWidget* parent) + TQPopupMenu* opMenu, + TQWidget* parent) : ButtonContainer(opMenu, parent) { embedButton(new NonKDEAppButton(name, description, filePath, icon, cmdLine, @@ -508,7 +508,7 @@ NonKDEAppButtonContainer::NonKDEAppButtonContainer(const QString &name, _actions = KPanelApplet::Preferences; } -NonKDEAppButtonContainer::NonKDEAppButtonContainer( const KConfigGroup& config, QPopupMenu* opMenu, QWidget *parent) +NonKDEAppButtonContainer::NonKDEAppButtonContainer( const KConfigGroup& config, TQPopupMenu* opMenu, TQWidget *parent) : ButtonContainer(opMenu, parent) { checkImmutability(config); @@ -517,25 +517,25 @@ NonKDEAppButtonContainer::NonKDEAppButtonContainer( const KConfigGroup& config, } // ExtensionButton container -ExtensionButtonContainer::ExtensionButtonContainer(const QString& df, QPopupMenu* opMenu, QWidget *parent) +ExtensionButtonContainer::ExtensionButtonContainer(const TQString& df, TQPopupMenu* opMenu, TQWidget *parent) : ButtonContainer(opMenu, parent) { embedButton( new ExtensionButton(df, this) ); } -ExtensionButtonContainer::ExtensionButtonContainer( const KConfigGroup& config, QPopupMenu* opMenu, QWidget *parent) +ExtensionButtonContainer::ExtensionButtonContainer( const KConfigGroup& config, TQPopupMenu* opMenu, TQWidget *parent) : ButtonContainer(opMenu, parent) { checkImmutability(config); embedButton( new ExtensionButton(config, this) ); } -QString ExtensionButtonContainer::icon() const +TQString ExtensionButtonContainer::icon() const { return button()->icon(); } -QString ExtensionButtonContainer::visibleName() const +TQString ExtensionButtonContainer::visibleName() const { return button()->title(); } diff --git a/kicker/kicker/core/container_button.h b/kicker/kicker/core/container_button.h index 737271216..3d8592a6d 100644 --- a/kicker/kicker/core/container_button.h +++ b/kicker/kicker/core/container_button.h @@ -39,7 +39,7 @@ class ButtonContainer : public BaseContainer Q_OBJECT public: - ButtonContainer(QPopupMenu* opMenu, QWidget* parent = 0); + ButtonContainer(TQPopupMenu* opMenu, TQWidget* parent = 0); virtual bool isValid() const; virtual bool isAMenu() const { return false; } @@ -51,7 +51,7 @@ public: virtual void configure(); - bool eventFilter (QObject *, QEvent *); + bool eventFilter (TQObject *, TQEvent *); virtual void completeMoveOperation(); PanelButton* button() const { return _button; } @@ -64,29 +64,29 @@ protected slots: void slotMenuClosed(); void removeRequested(); void hideRequested(bool); - void dragButton(const KURL::List urls, const QPixmap icon); - void dragButton(const QPixmap icon); + void dragButton(const KURL::List urls, const TQPixmap icon); + void dragButton(const TQPixmap icon); protected: virtual void doSaveConfiguration( KConfigGroup&, bool layoutOnly ) const; void embedButton(PanelButton* p); - QPopupMenu* createOpMenu(); + TQPopupMenu* createOpMenu(); void checkImmutability(const KConfigGroup&); protected: PanelButton *_button; - QLayout *_layout; - QPoint _oldpos; + TQLayout *_layout; + TQPoint _oldpos; }; class KMenuButtonContainer : public ButtonContainer { public: - KMenuButtonContainer(const KConfigGroup& config, QPopupMenu* opMenu, QWidget* parent = 0); - KMenuButtonContainer(QPopupMenu* opMenu, QWidget* parent = 0); - virtual QString appletType() const { return "KMenuButton"; } - virtual QString icon() const { return "kmenu"; } - virtual QString visibleName() const { return i18n("K Menu"); } + KMenuButtonContainer(const KConfigGroup& config, TQPopupMenu* opMenu, TQWidget* parent = 0); + KMenuButtonContainer(TQPopupMenu* opMenu, TQWidget* parent = 0); + virtual TQString appletType() const { return "KMenuButton"; } + virtual TQString icon() const { return "kmenu"; } + virtual TQString visibleName() const { return i18n("K Menu"); } virtual int heightForWidth( int width ) const; bool isAMenu() const { return true; } @@ -95,99 +95,99 @@ public: class DesktopButtonContainer : public ButtonContainer { public: - DesktopButtonContainer(const KConfigGroup& config, QPopupMenu* opMenu, QWidget* parent = 0); - DesktopButtonContainer(QPopupMenu* opMenu, QWidget* parent = 0); - QString appletType() const { return "DesktopButton"; } - virtual QString icon() const { return "desktop"; } - virtual QString visibleName() const { return i18n("Desktop Access"); } + DesktopButtonContainer(const KConfigGroup& config, TQPopupMenu* opMenu, TQWidget* parent = 0); + DesktopButtonContainer(TQPopupMenu* opMenu, TQWidget* parent = 0); + TQString appletType() const { return "DesktopButton"; } + virtual TQString icon() const { return "desktop"; } + virtual TQString visibleName() const { return i18n("Desktop Access"); } }; class ServiceButtonContainer : public ButtonContainer { public: - ServiceButtonContainer(const KConfigGroup& config, QPopupMenu* opMenu, QWidget* parent = 0); - ServiceButtonContainer(const KService::Ptr & service, QPopupMenu* opMenu,QWidget* parent = 0); - ServiceButtonContainer(const QString& desktopFile, QPopupMenu* opMenu,QWidget* parent = 0); - QString appletType() const { return "ServiceButton"; } - virtual QString icon() const; - virtual QString visibleName() const; + ServiceButtonContainer(const KConfigGroup& config, TQPopupMenu* opMenu, TQWidget* parent = 0); + ServiceButtonContainer(const KService::Ptr & service, TQPopupMenu* opMenu,TQWidget* parent = 0); + ServiceButtonContainer(const TQString& desktopFile, TQPopupMenu* opMenu,TQWidget* parent = 0); + TQString appletType() const { return "ServiceButton"; } + virtual TQString icon() const; + virtual TQString visibleName() const; }; class URLButtonContainer : public ButtonContainer { public: - URLButtonContainer(const KConfigGroup& config, QPopupMenu* opMenu, QWidget* parent = 0); - URLButtonContainer(const QString& url, QPopupMenu* opMenu, QWidget* parent = 0); - QString appletType() const { return "URLButton"; } - virtual QString icon() const; - virtual QString visibleName() const; + URLButtonContainer(const KConfigGroup& config, TQPopupMenu* opMenu, TQWidget* parent = 0); + URLButtonContainer(const TQString& url, TQPopupMenu* opMenu, TQWidget* parent = 0); + TQString appletType() const { return "URLButton"; } + virtual TQString icon() const; + virtual TQString visibleName() const; }; class BrowserButtonContainer : public ButtonContainer { public: - BrowserButtonContainer(const KConfigGroup& config, QPopupMenu* opMenu, QWidget* parent = 0); - BrowserButtonContainer(const QString& startDir, QPopupMenu* opMenu, const QString& icon = "kdisknav", QWidget* parent = 0); - QString appletType() const { return "BrowserButton"; } - virtual QString icon() const { return "kdisknav"; } - virtual QString visibleName() const { return i18n("Quick Browser"); } + BrowserButtonContainer(const KConfigGroup& config, TQPopupMenu* opMenu, TQWidget* parent = 0); + BrowserButtonContainer(const TQString& startDir, TQPopupMenu* opMenu, const TQString& icon = "kdisknav", TQWidget* parent = 0); + TQString appletType() const { return "BrowserButton"; } + virtual TQString icon() const { return "kdisknav"; } + virtual TQString visibleName() const { return i18n("Quick Browser"); } bool isAMenu() const { return true; } }; class ServiceMenuButtonContainer : public ButtonContainer { public: - ServiceMenuButtonContainer(const KConfigGroup& config, QPopupMenu* opMenu, QWidget* parent = 0); - ServiceMenuButtonContainer(const QString& relPath, QPopupMenu* opMenu, QWidget* parent = 0); - QString appletType() const { return "ServiceMenuButton"; } - virtual QString icon() const; - virtual QString visibleName() const; + ServiceMenuButtonContainer(const KConfigGroup& config, TQPopupMenu* opMenu, TQWidget* parent = 0); + ServiceMenuButtonContainer(const TQString& relPath, TQPopupMenu* opMenu, TQWidget* parent = 0); + TQString appletType() const { return "ServiceMenuButton"; } + virtual TQString icon() const; + virtual TQString visibleName() const; bool isAMenu() const { return true; } }; class WindowListButtonContainer : public ButtonContainer { public: - WindowListButtonContainer(const KConfigGroup& config, QPopupMenu* opMenu, QWidget* parent = 0); - WindowListButtonContainer(QPopupMenu* opMenu, QWidget* parent = 0); - QString appletType() const { return "WindowListButton"; } - virtual QString icon() const { return "window_list"; } - virtual QString visibleName() const { return i18n("Windowlist"); } + WindowListButtonContainer(const KConfigGroup& config, TQPopupMenu* opMenu, TQWidget* parent = 0); + WindowListButtonContainer(TQPopupMenu* opMenu, TQWidget* parent = 0); + TQString appletType() const { return "WindowListButton"; } + virtual TQString icon() const { return "window_list"; } + virtual TQString visibleName() const { return i18n("Windowlist"); } bool isAMenu() const { return true; } }; class BookmarksButtonContainer : public ButtonContainer { public: - BookmarksButtonContainer(const KConfigGroup& config, QPopupMenu* opMenu, QWidget* parent = 0); - BookmarksButtonContainer(QPopupMenu* opMenu, QWidget* parent = 0); - QString appletType() const { return "BookmarksButton"; } - virtual QString icon() const { return "bookmark"; } - virtual QString visibleName() const { return i18n("Bookmarks"); } + BookmarksButtonContainer(const KConfigGroup& config, TQPopupMenu* opMenu, TQWidget* parent = 0); + BookmarksButtonContainer(TQPopupMenu* opMenu, TQWidget* parent = 0); + TQString appletType() const { return "BookmarksButton"; } + virtual TQString icon() const { return "bookmark"; } + virtual TQString visibleName() const { return i18n("Bookmarks"); } bool isAMenu() const { return true; } }; class NonKDEAppButtonContainer : public ButtonContainer { public: - NonKDEAppButtonContainer(const KConfigGroup& config, QPopupMenu* opMenu, QWidget *parent=0); - NonKDEAppButtonContainer(const QString &name, const QString &description, - const QString &filePath, const QString &icon, - const QString &cmdLine, bool inTerm, - QPopupMenu* opMenu, QWidget* parent = 0); - QString appletType() const { return "ExecButton"; } - virtual QString icon() const { return "exec"; } - virtual QString visibleName() const { return i18n("Non-KDE Application"); } + NonKDEAppButtonContainer(const KConfigGroup& config, TQPopupMenu* opMenu, TQWidget *parent=0); + NonKDEAppButtonContainer(const TQString &name, const TQString &description, + const TQString &filePath, const TQString &icon, + const TQString &cmdLine, bool inTerm, + TQPopupMenu* opMenu, TQWidget* parent = 0); + TQString appletType() const { return "ExecButton"; } + virtual TQString icon() const { return "exec"; } + virtual TQString visibleName() const { return i18n("Non-KDE Application"); } }; class ExtensionButtonContainer : public ButtonContainer { public: - ExtensionButtonContainer(const KConfigGroup& config, QPopupMenu* opMenu, QWidget *parent=0); - ExtensionButtonContainer(const QString& desktopFile, QPopupMenu* opMenu, QWidget *parent= 0); - QString appletType() const { return "ExtensionButton"; } - virtual QString icon() const; - virtual QString visibleName() const; + ExtensionButtonContainer(const KConfigGroup& config, TQPopupMenu* opMenu, TQWidget *parent=0); + ExtensionButtonContainer(const TQString& desktopFile, TQPopupMenu* opMenu, TQWidget *parent= 0); + TQString appletType() const { return "ExtensionButton"; } + virtual TQString icon() const; + virtual TQString visibleName() const; bool isAMenu() const { return true; } }; diff --git a/kicker/kicker/core/container_extension.cpp b/kicker/kicker/core/container_extension.cpp index 694513109..7aee673f1 100644 --- a/kicker/kicker/core/container_extension.cpp +++ b/kicker/kicker/core/container_extension.cpp @@ -24,16 +24,16 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <stdlib.h> #include <math.h> -#include <qcursor.h> -#include <qfile.h> -#include <qlayout.h> -#include <qmovie.h> -#include <qpainter.h> -#include <qtimer.h> -#include <qtooltip.h> -#include <qvbox.h> +#include <tqcursor.h> +#include <tqfile.h> +#include <tqlayout.h> +#include <tqmovie.h> +#include <tqpainter.h> +#include <tqtimer.h> +#include <tqtooltip.h> +#include <tqvbox.h> #include <qxembed.h> -#include <qcolor.h> +#include <tqcolor.h> #include <dcopclient.h> #include <kconfig.h> @@ -66,9 +66,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define PANEL_SPEED(x, c) (int)((1.0-2.0*fabs((x)-(c)/2.0)/c)*m_settings.hideAnimationSpeed()+1.0) ExtensionContainer::ExtensionContainer(const AppletInfo& info, - const QString& extensionId, - QWidget *parent) - : QFrame(parent, ("ExtensionContainer#" + extensionId).latin1(), WStyle_Customize | WStyle_NoBorder), + const TQString& extensionId, + TQWidget *parent) + : TQFrame(parent, ("ExtensionContainer#" + extensionId).latin1(), WStyle_Customize | WStyle_NoBorder), m_settings(KSharedConfig::openConfig(info.configFile())), m_hideMode(ManualHide), m_unhideTriggeredAt(UnhideTrigger::None), @@ -93,9 +93,9 @@ ExtensionContainer::ExtensionContainer(const AppletInfo& info, ExtensionContainer::ExtensionContainer(KPanelExtension* extension, const AppletInfo& info, - const QString& extensionId, - QWidget *parent) - : QFrame(parent, ("ExtensionContainer#" + extensionId).latin1(), WStyle_Customize | WStyle_NoBorder), + const TQString& extensionId, + TQWidget *parent) + : TQFrame(parent, ("ExtensionContainer#" + extensionId).latin1(), WStyle_Customize | WStyle_NoBorder), m_settings(KSharedConfig::openConfig(info.configFile())), _autoHidden(false), _userHidden(Unhidden), @@ -111,7 +111,7 @@ ExtensionContainer::ExtensionContainer(KPanelExtension* extension, m_maintainFocus(0), m_panelOrder(ExtensionManager::the()->nextPanelOrder()) { - m_extension->reparent(this, QPoint(0, 0)); + m_extension->reparent(this, TQPoint(0, 0)); init(); } @@ -122,38 +122,38 @@ void ExtensionContainer::init() KWin::setState(winId(), NET::Sticky); KWin::setOnAllDesktops(winId(), true); - connect(Kicker::the()->kwinModule(), SIGNAL(strutChanged()), this, SLOT(strutChanged())); - connect(Kicker::the()->kwinModule(), SIGNAL(currentDesktopChanged(int)), - this, SLOT( currentDesktopChanged(int))); + connect(Kicker::the()->kwinModule(), TQT_SIGNAL(strutChanged()), this, TQT_SLOT(strutChanged())); + connect(Kicker::the()->kwinModule(), TQT_SIGNAL(currentDesktopChanged(int)), + this, TQT_SLOT( currentDesktopChanged(int))); setBackgroundOrigin(AncestorOrigin); setFrameStyle(NoFrame); setLineWidth(0); setMargin(0); - connect(UnhideTrigger::the(), SIGNAL(triggerUnhide(UnhideTrigger::Trigger,int)), - this, SLOT(unhideTriggered(UnhideTrigger::Trigger,int))); + connect(UnhideTrigger::the(), TQT_SIGNAL(triggerUnhide(UnhideTrigger::Trigger,int)), + this, TQT_SLOT(unhideTriggered(UnhideTrigger::Trigger,int))); _popupWidgetFilter = new PopupWidgetFilter( this ); - connect(_popupWidgetFilter, SIGNAL(popupWidgetHiding()), SLOT(maybeStartAutoHideTimer())); + connect(_popupWidgetFilter, TQT_SIGNAL(popupWidgetHiding()), TQT_SLOT(maybeStartAutoHideTimer())); // layout - _layout = new QGridLayout(this, 3, 3, 0, 0); - _layout->setResizeMode(QLayout::FreeResize); + _layout = new TQGridLayout(this, 3, 3, 0, 0); + _layout->setResizeMode(TQLayout::FreeResize); _layout->setRowStretch(1,10); _layout->setColStretch(1,10); // instantiate the autohide timer - _autohideTimer = new QTimer(this, "_autohideTimer"); - connect(_autohideTimer, SIGNAL(timeout()), SLOT(autoHideTimeout())); + _autohideTimer = new TQTimer(this, "_autohideTimer"); + connect(_autohideTimer, TQT_SIGNAL(timeout()), TQT_SLOT(autoHideTimeout())); // instantiate the updateLayout event compressor timer - _updateLayoutTimer = new QTimer(this, "_updateLayoutTimer"); - connect(_updateLayoutTimer, SIGNAL(timeout()), SLOT(actuallyUpdateLayout())); + _updateLayoutTimer = new TQTimer(this, "_updateLayoutTimer"); + connect(_updateLayoutTimer, TQT_SIGNAL(timeout()), TQT_SLOT(actuallyUpdateLayout())); installEventFilter(this); // for mouse event handling - connect(Kicker::the(), SIGNAL(kdisplayPaletteChanged()), this, SLOT(updateHighlightColor())); + connect(Kicker::the(), TQT_SIGNAL(kdisplayPaletteChanged()), this, TQT_SLOT(updateHighlightColor())); updateHighlightColor(); // if we were hidden when kicker quit, let's start out hidden as well! @@ -192,9 +192,9 @@ void ExtensionContainer::init() item->setDefaultValue(m_extension->customSize()); } - connect(m_extension, SIGNAL(updateLayout()), SLOT(updateLayout())); - connect(m_extension, SIGNAL(maintainFocus(bool)), - SLOT(maintainFocus(bool))); + connect(m_extension, TQT_SIGNAL(updateLayout()), TQT_SLOT(updateLayout())); + connect(m_extension, TQT_SIGNAL(maintainFocus(bool)), + TQT_SLOT(maintainFocus(bool))); _layout->addWidget(m_extension, 1, 1); } @@ -210,7 +210,7 @@ ExtensionContainer::~ExtensionContainer() { } -QSize ExtensionContainer::sizeHint(KPanelExtension::Position p, const QSize &maxSize) const +TQSize ExtensionContainer::sizeHint(KPanelExtension::Position p, const TQSize &maxSize) const { int width = 0; int height = 0; @@ -255,7 +255,7 @@ QSize ExtensionContainer::sizeHint(KPanelExtension::Position p, const QSize &max height += _layout->rowSpacing(0) + _layout->rowSpacing(2); } - QSize size(width, height); + TQSize size(width, height); size = size.boundedTo(maxSize); if (m_extension) @@ -342,7 +342,7 @@ void ExtensionContainer::writeConfig() m_settings.writeConfig(); } -void ExtensionContainer::showPanelMenu( const QPoint& globalPos ) +void ExtensionContainer::showPanelMenu( const TQPoint& globalPos ) { if (!kapp->authorizeKAction("kicker_rmb")) { @@ -354,7 +354,7 @@ void ExtensionContainer::showPanelMenu( const QPoint& globalPos ) // use the extenion's own custom menu Kicker::the()->setInsertionPoint(globalPos); m_extension->customMenu()->exec(globalPos); - Kicker::the()->setInsertionPoint(QPoint()); + Kicker::the()->setInsertionPoint(TQPoint()); return; } @@ -366,7 +366,7 @@ void ExtensionContainer::showPanelMenu( const QPoint& globalPos ) this); } - QPopupMenu *menu = KickerLib::reduceMenu(_opMnu); + TQPopupMenu *menu = KickerLib::reduceMenu(_opMnu); Kicker::the()->setInsertionPoint(globalPos); @@ -390,7 +390,7 @@ void ExtensionContainer::showPanelMenu( const QPoint& globalPos ) default: break; } - Kicker::the()->setInsertionPoint(QPoint()); + Kicker::the()->setInsertionPoint(TQPoint()); } void ExtensionContainer::about() @@ -440,9 +440,9 @@ void ExtensionContainer::removeSessionConfigFile() return; } - if (QFile::exists(locate("config", _info.configFile()))) + if (TQFile::exists(locate("config", _info.configFile()))) { - QFile::remove(locate("config", _info.configFile())); + TQFile::remove(locate("config", _info.configFile())); } } @@ -462,7 +462,7 @@ void ExtensionContainer::moveMe() stopAutoHideTimer(); - QApplication::syncX(); + TQApplication::syncX(); UserRectSel::RectList rects; KPanelExtension::Position positions[] = { KPanelExtension::Left, @@ -473,7 +473,7 @@ void ExtensionContainer::moveMe() KPanelExtension::Center, KPanelExtension::RightBottom }; - for (int s = 0; s < QApplication::desktop()->numScreens(); s++) + for (int s = 0; s < TQApplication::desktop()->numScreens(); s++) { for (int i = 0; i < 4; i++) { @@ -552,13 +552,13 @@ void ExtensionContainer::actuallyUpdateLayout() void ExtensionContainer::enableMouseOverEffects() { KickerTip::enableTipping(true); - QPoint globalPos = QCursor::pos(); - QPoint localPos = mapFromGlobal(globalPos); - QWidget* child = childAt(localPos); + TQPoint globalPos = TQCursor::pos(); + TQPoint localPos = mapFromGlobal(globalPos); + TQWidget* child = childAt(localPos); if (child) { - QMouseEvent* e = new QMouseEvent(QEvent::Enter, localPos, globalPos, 0, 0); + TQMouseEvent* e = new TQMouseEvent(TQEvent::Enter, localPos, globalPos, 0, 0); qApp->sendEvent(child, e); } } @@ -656,11 +656,11 @@ 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(QCursor::pos()) because + // We can't just do geometry().contains(TQCursor::pos()) because // now we hide the panel completely off screen. - int x = QCursor::pos().x(); - int y = QCursor::pos().y(); + int x = TQCursor::pos().x(); + int y = TQCursor::pos().y(); int t = geometry().top(); int b = geometry().bottom(); int r = geometry().right(); @@ -700,7 +700,7 @@ void ExtensionContainer::autoHideTimeout() { // kdDebug(1210) << "PanelContainer::autoHideTimeout() " << name() << endl; // Hack: If there is a popup open, don't autohide until it closes. - QWidget* popup = QApplication::activePopupWidget(); + TQWidget* popup = TQApplication::activePopupWidget(); if (popup) { @@ -728,8 +728,8 @@ void ExtensionContainer::autoHideTimeout() return; } - QRect r = geometry(); - QPoint p = QCursor::pos(); + TQRect r = geometry(); + TQPoint p = TQCursor::pos(); if (!r.contains(p) && (m_settings.unhideLocation() == UnhideTrigger::None || !shouldUnhideForTrigger(m_unhideTriggeredAt))) @@ -763,21 +763,21 @@ void ExtensionContainer::autoHide(bool hide) blockUserInput(true); - QPoint oldpos = pos(); - QRect newextent = initialGeometry( position(), alignment(), xineramaScreen(), hide, Unhidden ); - QPoint newpos = newextent.topLeft(); + TQPoint oldpos = pos(); + TQRect newextent = initialGeometry( position(), alignment(), xineramaScreen(), hide, Unhidden ); + TQPoint newpos = newextent.topLeft(); if (hide) { /* bail out if we are unable to hide */ - for (int s=0; s < QApplication::desktop()->numScreens(); s++) + for (int s=0; s < TQApplication::desktop()->numScreens(); s++) { /* don't let it intersect with any screen in the hidden position * that it doesn't intesect in the shown position. Should prevent * panels from hiding by sliding onto other screens, while still * letting them show reveal buttons onscreen */ - QRect desktopGeom = QApplication::desktop()->screenGeometry(s); + TQRect desktopGeom = TQApplication::desktop()->screenGeometry(s); if (desktopGeom.intersects(newextent) && !desktopGeom.intersects(geometry())) { @@ -848,11 +848,11 @@ void ExtensionContainer::autoHide(bool hide) updateLayout(); // Sometimes tooltips don't get hidden - QToolTip::hide(); + TQToolTip::hide(); _in_autohide = false; - QTimer::singleShot(100, this, SLOT(enableMouseOverEffects())); + TQTimer::singleShot(100, this, TQT_SLOT(enableMouseOverEffects())); } void ExtensionContainer::animatedHide(bool left) @@ -875,24 +875,24 @@ void ExtensionContainer::animatedHide(bool left) newState = RightBottom; } - QPoint oldpos = pos(); - QRect newextent = initialGeometry(position(), alignment(), xineramaScreen(), false, newState); - QPoint newpos(newextent.topLeft()); + TQPoint oldpos = pos(); + TQRect newextent = initialGeometry(position(), alignment(), xineramaScreen(), false, newState); + TQPoint newpos(newextent.topLeft()); if (newState != Unhidden) { /* bail out if we are unable to hide */ - for(int s=0; s < QApplication::desktop()->numScreens(); s++) + for(int s=0; s < TQApplication::desktop()->numScreens(); s++) { /* don't let it intersect with any screen in the hidden position * that it doesn't intesect in the shown position. Should prevent * panels from hiding by sliding onto other screens, while still * letting them show reveal buttons onscreen */ - if (QApplication::desktop()->screenGeometry(s).intersects(newextent) && - !QApplication::desktop()->screenGeometry(s).intersects(geometry())) + if (TQApplication::desktop()->screenGeometry(s).intersects(newextent) && + !TQApplication::desktop()->screenGeometry(s).intersects(geometry())) { blockUserInput(false); - QTimer::singleShot(100, this, SLOT(enableMouseOverEffects())); + TQTimer::singleShot(100, this, TQT_SLOT(enableMouseOverEffects())); return; } } @@ -955,7 +955,7 @@ void ExtensionContainer::animatedHide(bool left) config->setGroup(extensionId()); config->writeEntry("UserHidden", userHidden()); - QTimer::singleShot(100, this, SLOT(enableMouseOverEffects())); + TQTimer::singleShot(100, this, TQT_SLOT(enableMouseOverEffects())); } bool ExtensionContainer::reserveStrut() const @@ -981,9 +981,9 @@ void ExtensionContainer::updateWindowManager() int w = 0; int h = 0; - QRect geom = initialGeometry(position(), alignment(), xineramaScreen()); - QRect virtRect(QApplication::desktop()->geometry()); - QRect screenRect(QApplication::desktop()->screenGeometry(xineramaScreen())); + TQRect geom = initialGeometry(position(), alignment(), xineramaScreen()); + TQRect virtRect(TQApplication::desktop()->geometry()); + TQRect screenRect(TQApplication::desktop()->screenGeometry(xineramaScreen())); if (m_hideMode == ManualHide && !userHidden()) { @@ -1083,7 +1083,7 @@ void ExtensionContainer::currentDesktopChanged(int) void ExtensionContainer::strutChanged() { //kdDebug(1210) << "PanelContainer::strutChanged()" << endl; - QRect ig = currentGeometry(); + TQRect ig = currentGeometry(); if (ig != geometry()) { @@ -1265,8 +1265,8 @@ int ExtensionContainer::setupBorderSpace() } int layoutOffset = 0; - QRect r = QApplication::desktop()->screenGeometry(xineramaScreen()); - QRect h = geometry(); + TQRect r = TQApplication::desktop()->screenGeometry(xineramaScreen()); + TQRect h = geometry(); if (orientation() == Vertical) { @@ -1340,28 +1340,28 @@ void ExtensionContainer::updateHighlightColor() { KConfig *config = KGlobal::config(); config->setGroup("WM"); - QColor color = QApplication::palette().active().highlight(); + TQColor color = TQApplication::palette().active().highlight(); m_highlightColor = config->readColorEntry("activeBackground", &color); update(); } -void ExtensionContainer::paintEvent(QPaintEvent *e) +void ExtensionContainer::paintEvent(TQPaintEvent *e) { - QFrame::paintEvent(e); + TQFrame::paintEvent(e); if (needsBorder()) { // draw border - QPainter p(this); + TQPainter p(this); if (KickerSettings::useBackgroundTheme() && KickerSettings::colorizeBackground()) p.setPen(m_highlightColor); else - p.setPen(palette().color(QPalette::Active, QColorGroup::Mid)); + p.setPen(palette().color(TQPalette::Active, TQColorGroup::Mid)); p.drawRect(0, 0, width(), height()); } } -void ExtensionContainer::leaveEvent(QEvent*) +void ExtensionContainer::leaveEvent(TQEvent*) { maybeStartAutoHideTimer(); } @@ -1405,8 +1405,8 @@ void ExtensionContainer::unhideIfHidden(int showForAtLeastHowManyMS) if (_autoHidden) { autoHide(false); - QTimer::singleShot(showForAtLeastHowManyMS, - this, SLOT(maybeStartAutoHideTimer())); + TQTimer::singleShot(showForAtLeastHowManyMS, + this, TQT_SLOT(maybeStartAutoHideTimer())); return; } @@ -1433,19 +1433,19 @@ void ExtensionContainer::setHideButtons(bool showLeft, bool showRight) resetLayout(); } -bool ExtensionContainer::event(QEvent* e) +bool ExtensionContainer::event(TQEvent* e) { // Update the layout when we receive a LayoutHint. This way we can adjust // to changes of the layout of the main widget. - if (e->type() == QEvent::LayoutHint) + if (e->type() == TQEvent::LayoutHint) { updateLayout(); } - return QFrame::event(e); + return TQFrame::event(e); } -void ExtensionContainer::closeEvent(QCloseEvent* e) +void ExtensionContainer::closeEvent(TQCloseEvent* e) { // Prevent being closed via Alt-F4 e->ignore(); @@ -1519,7 +1519,7 @@ KPanelExtension::Position ExtensionContainer::position() const void ExtensionContainer::resetLayout() { - QRect g = initialGeometry(position(), alignment(), xineramaScreen(), + TQRect g = initialGeometry(position(), alignment(), xineramaScreen(), autoHidden(), userHidden()); // Disable the layout while we rearrange the panel. @@ -1547,7 +1547,7 @@ void ExtensionContainer::resetLayout() _ltHB = new HideButton(this); _ltHB->installEventFilter(this); _ltHB->setEnabled(true); - connect(_ltHB, SIGNAL(clicked()), this, SLOT(hideLeft())); + connect(_ltHB, TQT_SIGNAL(clicked()), this, TQT_SLOT(hideLeft())); haveToArrangeButtons = true; } @@ -1578,7 +1578,7 @@ void ExtensionContainer::resetLayout() _rbHB = new HideButton(this); _rbHB->installEventFilter(this); _rbHB->setEnabled(true); - connect(_rbHB, SIGNAL(clicked()), this, SLOT(hideRight())); + connect(_rbHB, TQT_SIGNAL(clicked()), this, TQT_SLOT(hideRight())); haveToArrangeButtons = true; } @@ -1602,27 +1602,27 @@ void ExtensionContainer::resetLayout() if (_ltHB) { - QToolTip::remove(_ltHB); + TQToolTip::remove(_ltHB); if (userHidden()) { - QToolTip::add(_ltHB, i18n("Show panel")); + TQToolTip::add(_ltHB, i18n("Show panel")); } else { - QToolTip::add(_ltHB, i18n("Hide panel")); + TQToolTip::add(_ltHB, i18n("Hide panel")); } } if (_rbHB) { - QToolTip::remove( _rbHB ); + TQToolTip::remove( _rbHB ); if (userHidden()) { - QToolTip::add(_rbHB, i18n("Show panel")); + TQToolTip::add(_rbHB, i18n("Show panel")); } else { - QToolTip::add(_rbHB, i18n("Hide panel")); + TQToolTip::add(_rbHB, i18n("Hide panel")); } } @@ -1692,13 +1692,13 @@ bool ExtensionContainer::needsBorder() const //&& !KickerSettings::useBackgroundTheme(); } -QSize ExtensionContainer::initialSize(KPanelExtension::Position p, QRect workArea) const +TQSize ExtensionContainer::initialSize(KPanelExtension::Position p, TQRect workArea) const { /*kdDebug(1210) << "initialSize() Work Area: (" << workArea.topLeft().x() << ", " << workArea.topLeft().y() << ") to (" << workArea.bottomRight().x() << ", " << workArea.bottomRight().y() << ")" << endl;*/ - QSize hint = sizeHint(p, workArea.size()).boundedTo(workArea.size()); + TQSize hint = sizeHint(p, workArea.size()).boundedTo(workArea.size()); int width = 0; int height = 0; @@ -1723,25 +1723,25 @@ QSize ExtensionContainer::initialSize(KPanelExtension::Position p, QRect workAre } } - return QSize(width, height); + return TQSize(width, height); } -QPoint ExtensionContainer::initialLocation(KPanelExtension::Position p, +TQPoint ExtensionContainer::initialLocation(KPanelExtension::Position p, KPanelExtension::Alignment a, int XineramaScreen, - const QSize &s, - QRect workArea, + const TQSize &s, + TQRect workArea, bool autohidden, UserHidden userHidden) const { - QRect wholeScreen; + TQRect wholeScreen; if (XineramaScreen == XineramaAllScreens) { - wholeScreen = QApplication::desktop()->geometry(); + wholeScreen = TQApplication::desktop()->geometry(); } else { - wholeScreen = QApplication::desktop()->screenGeometry(XineramaScreen); + wholeScreen = TQApplication::desktop()->screenGeometry(XineramaScreen); } /*kdDebug(1210) << "initialLocation() Work Area: (" << @@ -1890,7 +1890,7 @@ QPoint ExtensionContainer::initialLocation(KPanelExtension::Position p, } } - return QPoint( left, top ); + return TQPoint( left, top ); } int ExtensionContainer::xineramaScreen() const @@ -1900,14 +1900,14 @@ int ExtensionContainer::xineramaScreen() const /* -2 means all screens, -1 primary screens, the rest are valid screen numbers */ if (XineramaAllScreens <= m_settings.xineramaScreen() && - m_settings.xineramaScreen() < QApplication::desktop()->numScreens()) + m_settings.xineramaScreen() < TQApplication::desktop()->numScreens()) { return m_settings.xineramaScreen(); } else { /* force invalid screen locations onto the primary screen */ - return QApplication::desktop()->primaryScreen(); + return TQApplication::desktop()->primaryScreen(); } } @@ -1921,13 +1921,13 @@ void ExtensionContainer::setXineramaScreen(int screen) arrange(position(),alignment(), screen); } -QRect ExtensionContainer::currentGeometry() const +TQRect ExtensionContainer::currentGeometry() const { return initialGeometry(position(), alignment(), xineramaScreen(), autoHidden(), userHidden()); } -QRect ExtensionContainer::initialGeometry(KPanelExtension::Position p, +TQRect ExtensionContainer::initialGeometry(KPanelExtension::Position p, KPanelExtension::Alignment a, int XineramaScreen, bool autoHidden, @@ -1937,54 +1937,54 @@ QRect ExtensionContainer::initialGeometry(KPanelExtension::Position p, /*kdDebug(1210) << "initialGeometry() Computing geometry for " << name() << " on screen " << XineramaScreen << endl;*/ - QRect workArea = ExtensionManager::the()->workArea(XineramaScreen, this); - QSize size = initialSize(p, workArea); - QPoint point = initialLocation(p, a, XineramaScreen, + TQRect workArea = ExtensionManager::the()->workArea(XineramaScreen, this); + TQSize size = initialSize(p, workArea); + TQPoint point = initialLocation(p, a, XineramaScreen, size, workArea, autoHidden, userHidden); //kdDebug(1210) << "Size: " << size.width() << " x " << size.height() << endl; //kdDebug(1210) << "Pos: (" << point.x() << ", " << point.y() << ")" << endl; - return QRect(point, size); + return TQRect(point, size); } -bool ExtensionContainer::eventFilter( QObject*, QEvent * e) +bool ExtensionContainer::eventFilter( TQObject*, TQEvent * e) { if (autoHidden()) { switch ( e->type() ) { - case QEvent::MouseButtonPress: - case QEvent::MouseButtonRelease: - case QEvent::MouseButtonDblClick: - case QEvent::MouseMove: - case QEvent::KeyPress: - case QEvent::KeyRelease: + case TQEvent::MouseButtonPress: + case TQEvent::MouseButtonRelease: + case TQEvent::MouseButtonDblClick: + case TQEvent::MouseMove: + case TQEvent::KeyPress: + case TQEvent::KeyRelease: return true; // ignore; default: break; } } - QEvent::Type eventType = e->type(); + TQEvent::Type eventType = e->type(); if (_block_user_input) { - return (eventType == QEvent::MouseButtonPress || - eventType == QEvent::MouseButtonRelease || - eventType == QEvent::MouseButtonDblClick || - eventType == QEvent::MouseMove || - eventType == QEvent::KeyPress || - eventType == QEvent::KeyRelease || - eventType == QEvent::Enter || - eventType == QEvent::Leave); + return (eventType == TQEvent::MouseButtonPress || + eventType == TQEvent::MouseButtonRelease || + eventType == TQEvent::MouseButtonDblClick || + eventType == TQEvent::MouseMove || + eventType == TQEvent::KeyPress || + eventType == TQEvent::KeyRelease || + eventType == TQEvent::Enter || + eventType == TQEvent::Leave); } switch (eventType) { - case QEvent::MouseButtonPress: + case TQEvent::MouseButtonPress: { - QMouseEvent* me = static_cast<QMouseEvent*>(e); + TQMouseEvent* me = static_cast<TQMouseEvent*>(e); if ( me->button() == LeftButton ) { _last_lmb_press = me->globalPos(); @@ -1998,9 +1998,9 @@ bool ExtensionContainer::eventFilter( QObject*, QEvent * e) } break; - case QEvent::MouseButtonRelease: + case TQEvent::MouseButtonRelease: { - QMouseEvent* me = static_cast<QMouseEvent*>(e); + TQMouseEvent* me = static_cast<TQMouseEvent*>(e); if ( me->button() == LeftButton ) { _is_lmb_down = false; @@ -2008,16 +2008,16 @@ bool ExtensionContainer::eventFilter( QObject*, QEvent * e) } break; - case QEvent::MouseMove: + case TQEvent::MouseMove: { - QMouseEvent* me = (QMouseEvent*) e; + TQMouseEvent* me = (TQMouseEvent*) e; if (_is_lmb_down && ((me->state() & LeftButton) == LeftButton) && !Kicker::the()->isImmutable() && !m_settings.config()->isImmutable() && !ExtensionManager::the()->isMenuBar(this)) { - QPoint p(me->globalPos() - _last_lmb_press); + TQPoint p(me->globalPos() - _last_lmb_press); int x_threshold = width(); int y_threshold = height(); @@ -2049,14 +2049,14 @@ bool ExtensionContainer::eventFilter( QObject*, QEvent * e) return false; } -PopupWidgetFilter::PopupWidgetFilter( QObject *parent ) - : QObject( parent, "PopupWidgetFilter" ) +PopupWidgetFilter::PopupWidgetFilter( TQObject *parent ) + : TQObject( parent, "PopupWidgetFilter" ) { } -bool PopupWidgetFilter::eventFilter( QObject*, QEvent* e ) +bool PopupWidgetFilter::eventFilter( TQObject*, TQEvent* e ) { - if (e->type() == QEvent::Hide) + if (e->type() == TQEvent::Hide) { emit popupWidgetHiding(); } diff --git a/kicker/kicker/core/container_extension.h b/kicker/kicker/core/container_extension.h index aebe048e6..cdc608392 100644 --- a/kicker/kicker/core/container_extension.h +++ b/kicker/kicker/core/container_extension.h @@ -24,8 +24,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #ifndef __container_extension_h__ #define __container_extension_h__ -#include <qframe.h> -#include <qptrlist.h> +#include <tqframe.h> +#include <tqptrlist.h> #include <kpanelextension.h> #include <dcopobject.h> @@ -58,24 +58,24 @@ public: enum HideMode { ManualHide, AutomaticHide, BackgroundHide }; ExtensionContainer(const AppletInfo& info, - const QString& extensionId, - QWidget *parent = 0); + const TQString& extensionId, + TQWidget *parent = 0); ExtensionContainer(KPanelExtension* extension, const AppletInfo& info, - const QString& extensionId, - QWidget *parent = 0); + const TQString& extensionId, + TQWidget *parent = 0); virtual ~ExtensionContainer(); - virtual QSize sizeHint(KPanelExtension::Position, const QSize &maxSize) const; + virtual TQSize sizeHint(KPanelExtension::Position, const TQSize &maxSize) const; const AppletInfo& info() const { return _info; } - QString extensionId() const { return _id; } + TQString extensionId() const { return _id; } void readConfig(); void writeConfig(); - virtual QString panelId() const { return extensionId(); } + virtual TQString panelId() const { return extensionId(); } virtual void about(); virtual void help(); @@ -103,12 +103,12 @@ public: KPanelExtension::Alignment alignment() const; void setAlignment(KPanelExtension::Alignment a) { arrange( position(), a, xineramaScreen() ); } - QRect currentGeometry() const; - QRect initialGeometry(KPanelExtension::Position p, KPanelExtension::Alignment a, + TQRect currentGeometry() const; + TQRect initialGeometry(KPanelExtension::Position p, KPanelExtension::Alignment a, int XineramaScreen, bool autoHidden = false, UserHidden userHidden = Unhidden) const; - bool eventFilter( QObject *, QEvent * ); + bool eventFilter( TQObject *, TQEvent * ); int panelOrder() const { return m_panelOrder; } void setPanelOrder(int order) { m_panelOrder = order; } @@ -117,7 +117,7 @@ signals: void removeme(ExtensionContainer*); protected slots: - virtual void showPanelMenu( const QPoint& pos ); + virtual void showPanelMenu( const TQPoint& pos ); void moveMe(); void updateLayout(); void actuallyUpdateLayout(); @@ -125,10 +125,10 @@ protected slots: void updateHighlightColor(); protected: - bool event(QEvent*); - void closeEvent( QCloseEvent* e ); - void paintEvent(QPaintEvent*); - void leaveEvent(QEvent*); + bool event(TQEvent*); + void closeEvent( TQCloseEvent* e ); + void paintEvent(TQPaintEvent*); + void leaveEvent(TQEvent*); void arrange(KPanelExtension::Position p, KPanelExtension::Alignment a, int XineramaScreen); bool autoHidden() const { return _autoHidden; }; @@ -154,9 +154,9 @@ private slots: private: bool shouldUnhideForTrigger(UnhideTrigger::Trigger t) const; void init(); - QSize initialSize(KPanelExtension::Position p, QRect workArea) const; - QPoint initialLocation(KPanelExtension::Position p, KPanelExtension::Alignment a, - int XineramaScreen, const QSize &s, QRect workArea, + TQSize initialSize(KPanelExtension::Position p, TQRect workArea) const; + TQPoint initialLocation(KPanelExtension::Position p, KPanelExtension::Alignment a, + int XineramaScreen, const TQSize &s, TQRect workArea, bool autohidden = false, UserHidden userHidden = Unhidden) const; void positionChange(KPanelExtension::Position p); void alignmentChange(KPanelExtension::Alignment a); @@ -172,17 +172,17 @@ private: bool _autoHidden; UserHidden _userHidden; bool _block_user_input; - QPoint _last_lmb_press; + TQPoint _last_lmb_press; bool _is_lmb_down; bool _in_autohide; // Misc objects - QTimer *_autohideTimer; - QTimer *_updateLayoutTimer; + TQTimer *_autohideTimer; + TQTimer *_updateLayoutTimer; NETExtendedStrut _strut; PopupWidgetFilter *_popupWidgetFilter; - QString _id; + TQString _id; PanelExtensionOpMenu *_opMnu; AppletInfo _info; KPanelExtension::Type _type; @@ -190,12 +190,12 @@ private: // Widgets HideButton *_ltHB; // Left Hide Button HideButton *_rbHB; // Right Hide Button - QGridLayout *_layout; + TQGridLayout *_layout; KPanelExtension *m_extension; int m_maintainFocus; int m_panelOrder; - QColor m_highlightColor; + TQColor m_highlightColor; }; class PopupWidgetFilter : public QObject @@ -203,13 +203,13 @@ class PopupWidgetFilter : public QObject Q_OBJECT public: - PopupWidgetFilter( QObject *parent ); + PopupWidgetFilter( TQObject *parent ); ~PopupWidgetFilter() {} - bool eventFilter( QObject *obj, QEvent* e ); + bool eventFilter( TQObject *obj, TQEvent* e ); signals: void popupWidgetHiding(); }; -typedef QValueList<ExtensionContainer*> ExtensionList; +typedef TQValueList<ExtensionContainer*> ExtensionList; #endif diff --git a/kicker/kicker/core/containerarea.cpp b/kicker/kicker/core/containerarea.cpp index 23732e684..7d63d562a 100644 --- a/kicker/kicker/core/containerarea.cpp +++ b/kicker/kicker/core/containerarea.cpp @@ -23,15 +23,15 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <unistd.h> -#include <qdir.h> -#include <qfile.h> -#include <qfileinfo.h> -#include <qpainter.h> -#include <qpixmap.h> -#include <qstyle.h> -#include <qtextstream.h> -#include <qtimer.h> -#include <qwmatrix.h> +#include <tqdir.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqpainter.h> +#include <tqpixmap.h> +#include <tqstyle.h> +#include <tqtextstream.h> +#include <tqtimer.h> +#include <tqwmatrix.h> #include <kapplication.h> #include <kglobal.h> @@ -69,8 +69,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. extern int kicker_screen_number; ContainerArea::ContainerArea(KConfig* _c, - QWidget* parent, - QPopupMenu* opMenu, + TQWidget* parent, + TQPopupMenu* opMenu, const char* name) : Panner(parent, name), _moveAC(0), @@ -78,7 +78,7 @@ ContainerArea::ContainerArea(KConfig* _c, _config(_c), _dragIndicator(0), _dragMoveAC(0), - _dragMoveOffset(QPoint(0,0)), + _dragMoveOffset(TQPoint(0,0)), m_opMenu(opMenu), _rootPixmap(0), _useBgTheme(false), @@ -100,11 +100,11 @@ ContainerArea::ContainerArea(KConfig* _c, setBackground(); - connect(&_autoScrollTimer, SIGNAL(timeout()), SLOT(autoScroll())); - connect(kapp, SIGNAL(kdisplayPaletteChanged()), SLOT(setBackground())); - connect(Kicker::the(), SIGNAL(immutabilityChanged(bool)), - SLOT(immutabilityChanged(bool))); - connect(this, SIGNAL(contentsMoving(int, int)), SLOT(setBackground())); + connect(&_autoScrollTimer, TQT_SIGNAL(timeout()), TQT_SLOT(autoScroll())); + connect(kapp, TQT_SIGNAL(kdisplayPaletteChanged()), TQT_SLOT(setBackground())); + connect(Kicker::the(), TQT_SIGNAL(immutabilityChanged(bool)), + TQT_SLOT(immutabilityChanged(bool))); + connect(this, TQT_SIGNAL(contentsMoving(int, int)), TQT_SLOT(setBackground())); } ContainerArea::~ContainerArea() @@ -139,7 +139,7 @@ void ContainerArea::initialize(bool useDefaultConfig) } setAcceptDrops(!isImmutable()); - QTimer::singleShot(0, this, SLOT(resizeContents())); + TQTimer::singleShot(0, this, TQT_SLOT(resizeContents())); } void ContainerArea::defaultContainerConfig() @@ -160,12 +160,12 @@ void ContainerArea::defaultContainerConfig() } dsize -= 560; - QStringList buttons; + TQStringList buttons; - QFile f(locate("data", "kicker/default-apps")); + TQFile f(locate("data", "kicker/default-apps")); if (f.open(IO_ReadOnly)) { - QTextStream is(&f); + TQTextStream is(&f); while (!is.eof()) buttons << is.readLine(); @@ -179,7 +179,7 @@ void ContainerArea::defaultContainerConfig() } //int size = dsize; - for (QStringList::ConstIterator it = buttons.begin(); it != buttons.end(); ++it) + for (TQStringList::ConstIterator it = buttons.begin(); it != buttons.end(); ++it) { /*size -= 42; if (size <= 0) @@ -190,9 +190,9 @@ void ContainerArea::defaultContainerConfig() if (!service) { // look for a special button - QString s = locate("appdata", *it); + TQString s = locate("appdata", *it); if (s.isEmpty()) continue; - QString itExt = (*it).section('/', 1); + TQString itExt = (*it).section('/', 1); button = new ExtensionButtonContainer(itExt, m_opMenu, m_contents); } else @@ -216,7 +216,7 @@ void ContainerArea::defaultContainerConfig() AppletContainer* a = manager->createAppletContainer( "minipagerapplet.desktop", true, - QString::null, + TQString::null, m_opMenu, m_contents); if (a) @@ -229,7 +229,7 @@ void ContainerArea::defaultContainerConfig() a = manager->createAppletContainer( "taskbarapplet.desktop", true, - QString::null, + TQString::null, m_opMenu, m_contents); if (a) @@ -242,7 +242,7 @@ void ContainerArea::defaultContainerConfig() a = manager->createAppletContainer( "systemtrayapplet.desktop", true, - QString::null, + TQString::null, m_opMenu, m_contents ); if (a) @@ -255,7 +255,7 @@ void ContainerArea::defaultContainerConfig() a = manager->createAppletContainer( "clockapplet.desktop", true, - QString::null, + TQString::null, m_opMenu, m_contents ); if (a) @@ -274,17 +274,17 @@ void ContainerArea::defaultContainerConfig() saveContainerConfig(); } -void ContainerArea::loadContainers(const QStringList& containers) +void ContainerArea::loadContainers(const TQStringList& containers) { // read applet list bool badApplets = false; // now restore the applets - QStringList::const_iterator it = containers.constBegin(); - QStringList::const_iterator itEnd = containers.constEnd(); + TQStringList::const_iterator it = containers.constBegin(); + TQStringList::const_iterator itEnd = containers.constEnd(); for (; it != itEnd; ++it) { - QString appletId(*it); + TQString appletId(*it); // is there a config group for this applet? if (!_config->hasGroup(appletId)) @@ -298,7 +298,7 @@ void ContainerArea::loadContainers(const QStringList& containers) int sep = appletId.findRev('_'); Q_ASSERT(sep != -1); - QString appletType = appletId.left(sep); + TQString appletType = appletId.left(sep); // create a matching applet container if (appletType == "KMenuButton") @@ -359,7 +359,7 @@ void ContainerArea::loadContainers(const QStringList& containers) // it gets executed too soon. we need to wait until the containers are // actually resized, but we enter the event loop prior to that happening // above. - QTimer::singleShot(0, this, SLOT(updateContainersBackground())); + TQTimer::singleShot(0, this, TQT_SLOT(updateContainersBackground())); } void ContainerArea::saveContainerConfig(bool layoutOnly) @@ -370,8 +370,8 @@ void ContainerArea::saveContainerConfig(bool layoutOnly) } // Save the applet list - QStringList alist; - QLayoutIterator it2 = m_layout->iterator(); + TQStringList alist; + TQLayoutIterator it2 = m_layout->iterator(); for (; it2.current(); ++it2) { BaseContainer* a = dynamic_cast<BaseContainer*>(it2.current()->widget()); @@ -414,9 +414,9 @@ void ContainerArea::configure() resizeContents(); } -const QWidget* ContainerArea::addButton(const AppletInfo& info) +const TQWidget* ContainerArea::addButton(const AppletInfo& info) { - QString buttonType = info.library(); + TQString buttonType = info.library(); if (buttonType == "BookmarksButton") { @@ -453,7 +453,7 @@ const QWidget* ContainerArea::addButton(const AppletInfo& info) return 0; } -const QWidget* ContainerArea::addKMenuButton() +const TQWidget* ContainerArea::addKMenuButton() { if (!canAddContainers()) { @@ -465,7 +465,7 @@ const QWidget* ContainerArea::addKMenuButton() return b; } -const QWidget* ContainerArea::addDesktopButton() +const TQWidget* ContainerArea::addDesktopButton() { if (!canAddContainers()) { @@ -477,7 +477,7 @@ const QWidget* ContainerArea::addDesktopButton() return b; } -const QWidget* ContainerArea::addWindowListButton() +const TQWidget* ContainerArea::addWindowListButton() { if (!canAddContainers()) { @@ -489,7 +489,7 @@ const QWidget* ContainerArea::addWindowListButton() return b; } -const QWidget* ContainerArea::addBookmarksButton() +const TQWidget* ContainerArea::addBookmarksButton() { if (!canAddContainers()) { @@ -501,7 +501,7 @@ const QWidget* ContainerArea::addBookmarksButton() return b; } -const QWidget* ContainerArea::addServiceButton(const QString& desktopFile) +const TQWidget* ContainerArea::addServiceButton(const TQString& desktopFile) { if (!canAddContainers()) { @@ -514,7 +514,7 @@ const QWidget* ContainerArea::addServiceButton(const QString& desktopFile) return b; } -const QWidget* ContainerArea::addURLButton(const QString &url) +const TQWidget* ContainerArea::addURLButton(const TQString &url) { if (!canAddContainers()) { @@ -526,17 +526,17 @@ const QWidget* ContainerArea::addURLButton(const QString &url) return b; } -const QWidget* ContainerArea::addBrowserButton() +const TQWidget* ContainerArea::addBrowserButton() { if (!canAddContainers()) { return 0; } - PanelBrowserDialog *dlg = new PanelBrowserDialog(QDir::home().path(), + PanelBrowserDialog *dlg = new PanelBrowserDialog(TQDir::home().path(), "kdisknav"); - if (dlg->exec() == QDialog::Accepted) + if (dlg->exec() == TQDialog::Accepted) { return addBrowserButton(dlg->path(), dlg->icon()); } @@ -544,8 +544,8 @@ const QWidget* ContainerArea::addBrowserButton() return 0; } -const QWidget* ContainerArea::addBrowserButton(const QString &startDir, - const QString& icon) +const TQWidget* ContainerArea::addBrowserButton(const TQString &startDir, + const TQString& icon) { if (!canAddContainers()) { @@ -558,7 +558,7 @@ const QWidget* ContainerArea::addBrowserButton(const QString &startDir, return b; } -const QWidget* ContainerArea::addServiceMenuButton(const QString& relPath) +const TQWidget* ContainerArea::addServiceMenuButton(const TQString& relPath) { if (!canAddContainers()) { @@ -571,17 +571,17 @@ const QWidget* ContainerArea::addServiceMenuButton(const QString& relPath) return b; } -const QWidget* ContainerArea::addNonKDEAppButton() +const TQWidget* ContainerArea::addNonKDEAppButton() { if (!canAddContainers()) { return 0; } - PanelExeDialog dlg(QString::null, QString::null, QString::null, - QString::null, QString::null, false, 0); + PanelExeDialog dlg(TQString::null, TQString::null, TQString::null, + TQString::null, TQString::null, false, 0); - if (dlg.exec() == QDialog::Accepted) + if (dlg.exec() == TQDialog::Accepted) { return addNonKDEAppButton(dlg.title(), dlg.description(), dlg.command(), dlg.iconPath(), @@ -592,11 +592,11 @@ const QWidget* ContainerArea::addNonKDEAppButton() return 0; } -const QWidget* ContainerArea::addNonKDEAppButton(const QString &name, - const QString &description, - const QString& filePath, - const QString &icon, - const QString &cmdLine, +const TQWidget* ContainerArea::addNonKDEAppButton(const TQString &name, + const TQString &description, + const TQString& filePath, + const TQString &icon, + const TQString &cmdLine, bool inTerm) { if (!canAddContainers()) @@ -613,7 +613,7 @@ const QWidget* ContainerArea::addNonKDEAppButton(const QString &name, return b; } -const QWidget* ContainerArea::addExtensionButton(const QString& df) +const TQWidget* ContainerArea::addExtensionButton(const TQString& df) { if (!canAddContainers()) { @@ -651,7 +651,7 @@ AppletContainer* ContainerArea::addApplet(const AppletInfo& info, AppletContainer* a = PluginManager::the()->createAppletContainer( info.desktopFile(), false, // not startup - QString::null, // no config + TQString::null, // no config m_opMenu, m_contents, isImmutable); @@ -682,8 +682,8 @@ void ContainerArea::addContainer(BaseContainer* a, bool arrange, int index) if (arrange) { - QWidget* w = m_layout->widgetAt(index); - QPoint oldInsertionPoint = Kicker::the()->insertionPoint(); + TQWidget* w = m_layout->widgetAt(index); + TQPoint oldInsertionPoint = Kicker::the()->insertionPoint(); if (w) { // let's set the insertion point to where the widget asked to be @@ -693,7 +693,7 @@ void ContainerArea::addContainer(BaseContainer* a, bool arrange, int index) if (Kicker::the()->insertionPoint().isNull()) { - m_layout->insertIntoFreeSpace(a, QPoint()); + m_layout->insertIntoFreeSpace(a, TQPoint()); } else { @@ -710,20 +710,20 @@ void ContainerArea::addContainer(BaseContainer* a, bool arrange, int index) m_layout->add(a); } - connect(a, SIGNAL(moveme(BaseContainer*)), - SLOT(startContainerMove(BaseContainer*))); - connect(a, SIGNAL(removeme(BaseContainer*)), - SLOT(removeContainer(BaseContainer*))); - connect(a, SIGNAL(takeme(BaseContainer*)), - SLOT(takeContainer(BaseContainer*))); - connect(a, SIGNAL(requestSave()), - SLOT(slotSaveContainerConfig())); - connect(a, SIGNAL(maintainFocus(bool)), - this, SIGNAL(maintainFocus(bool))); + connect(a, TQT_SIGNAL(moveme(BaseContainer*)), + TQT_SLOT(startContainerMove(BaseContainer*))); + connect(a, TQT_SIGNAL(removeme(BaseContainer*)), + TQT_SLOT(removeContainer(BaseContainer*))); + connect(a, TQT_SIGNAL(takeme(BaseContainer*)), + TQT_SLOT(takeContainer(BaseContainer*))); + connect(a, TQT_SIGNAL(requestSave()), + TQT_SLOT(slotSaveContainerConfig())); + connect(a, TQT_SIGNAL(maintainFocus(bool)), + this, TQT_SIGNAL(maintainFocus(bool))); if (dynamic_cast<AppletContainer*>(a)) { - connect(a, SIGNAL(updateLayout()), SLOT(resizeContents())); + connect(a, TQT_SIGNAL(updateLayout()), TQT_SLOT(resizeContents())); } a->configure(orientation(), popupDirection()); @@ -806,16 +806,16 @@ void ContainerArea::takeContainer(BaseContainer* a) return; } - disconnect(a, SIGNAL(moveme(BaseContainer*)), - this, SLOT(startContainerMove(BaseContainer*))); - disconnect(a, SIGNAL(removeme(BaseContainer*)), - this, SLOT(removeContainer(BaseContainer*))); - disconnect(a, SIGNAL(takeme(BaseContainer*)), - this, SLOT(takeContainer(BaseContainer*))); - disconnect(a, SIGNAL(requestSave()), - this, SLOT(slotSaveContainerConfig())); - disconnect(a, SIGNAL(maintainFocus(bool)), - this, SIGNAL(maintainFocus(bool))); + disconnect(a, TQT_SIGNAL(moveme(BaseContainer*)), + this, TQT_SLOT(startContainerMove(BaseContainer*))); + disconnect(a, TQT_SIGNAL(removeme(BaseContainer*)), + this, TQT_SLOT(removeContainer(BaseContainer*))); + disconnect(a, TQT_SIGNAL(takeme(BaseContainer*)), + this, TQT_SLOT(takeContainer(BaseContainer*))); + disconnect(a, TQT_SIGNAL(requestSave()), + this, TQT_SLOT(slotSaveContainerConfig())); + disconnect(a, TQT_SIGNAL(maintainFocus(bool)), + this, TQT_SIGNAL(maintainFocus(bool))); // Just remove the group from our own config file. Leave separate config // files untouched. @@ -859,10 +859,10 @@ void ContainerArea::resizeContents() } } -QString ContainerArea::createUniqueId(const QString& appletType) const +TQString ContainerArea::createUniqueId(const TQString& appletType) const { - QString idBase = appletType + "_%1"; - QString newId; + TQString idBase = appletType + "_%1"; + TQString newId; int i = 0; bool unique = false; @@ -911,7 +911,7 @@ void ContainerArea::startContainerMove(BaseContainer *a) a->raise(); } -void ContainerArea::mouseReleaseEvent(QMouseEvent *) +void ContainerArea::mouseReleaseEvent(TQMouseEvent *) { if (!_moveAC) { @@ -936,7 +936,7 @@ void ContainerArea::mouseReleaseEvent(QMouseEvent *) saveContainerConfig(true); } -void ContainerArea::mouseMoveEvent(QMouseEvent *ev) +void ContainerArea::mouseMoveEvent(TQMouseEvent *ev) { if (!_moveAC) { @@ -1035,7 +1035,7 @@ bool ContainerArea::isImmutable() const return m_immutable || Kicker::the()->isImmutable(); } -void ContainerArea::dragEnterEvent(QDragEnterEvent *ev) +void ContainerArea::dragEnterEvent(TQDragEnterEvent *ev) { bool canAccept = !isImmutable() && (PanelDrag::canDecode(ev) || @@ -1066,13 +1066,13 @@ void ContainerArea::dragEnterEvent(QDragEnterEvent *ev) if (orientation() == Horizontal) { - _dragIndicator->setPreferredSize(QSize(preferedWidth, height())); + _dragIndicator->setPreferredSize(TQSize(preferedWidth, height())); } else { - _dragIndicator->setPreferredSize(QSize(width(), preferedHeight)); + _dragIndicator->setPreferredSize(TQSize(width(), preferedHeight)); } - _dragMoveOffset = QPoint(_dragIndicator->width()/2, + _dragMoveOffset = TQPoint(_dragIndicator->width()/2, _dragIndicator->height()/2); // Find the container before the position of the dragindicator. @@ -1108,7 +1108,7 @@ void ContainerArea::dragEnterEvent(QDragEnterEvent *ev) _dragIndicator->show(); } -void ContainerArea::dragMoveEvent(QDragMoveEvent* ev) +void ContainerArea::dragMoveEvent(TQDragMoveEvent* ev) { if (ev->source() == this) { @@ -1117,10 +1117,10 @@ void ContainerArea::dragMoveEvent(QDragMoveEvent* ev) // then it does work only on every second event. // Cancel the drag by faking an Escape keystroke. - QKeyEvent fakedKeyPress(QEvent::KeyPress, Key_Escape, 0, 0); - QKeyEvent fakedKeyRelease(QEvent::KeyRelease, Key_Escape, 0, 0); - QApplication::sendEvent(this, &fakedKeyPress); - QApplication::sendEvent(this, &fakedKeyRelease); + TQKeyEvent fakedKeyPress(TQEvent::KeyPress, Key_Escape, 0, 0); + TQKeyEvent fakedKeyRelease(TQEvent::KeyRelease, Key_Escape, 0, 0); + TQApplication::sendEvent(this, &fakedKeyPress); + TQApplication::sendEvent(this, &fakedKeyRelease); qApp->processEvents(); startContainerMove(_moveAC); @@ -1151,7 +1151,7 @@ void ContainerArea::dragMoveEvent(QDragMoveEvent* ev) } } -void ContainerArea::dragLeaveEvent(QDragLeaveEvent*) +void ContainerArea::dragLeaveEvent(TQDragLeaveEvent*) { if (_dragIndicator) { @@ -1161,7 +1161,7 @@ void ContainerArea::dragLeaveEvent(QDragLeaveEvent*) _dragMoveAC = 0; } -void ContainerArea::dropEvent(QDropEvent *ev) +void ContainerArea::dropEvent(TQDropEvent *ev) { if (!_dragIndicator) { @@ -1182,7 +1182,7 @@ void ContainerArea::dropEvent(QDropEvent *ev) return; } - QObject *parent = ev->source() ? ev->source()->parent() : 0; + TQObject *parent = ev->source() ? ev->source()->parent() : 0; while (parent && (parent != this)) { parent = parent->parent(); @@ -1217,7 +1217,7 @@ void ContainerArea::dropEvent(QDropEvent *ev) a->reparent(m_contents, 0, _dragIndicator->pos(), true); a->setAppletId(createUniqueId(a->appletType())); addContainer(a, true); - Kicker::the()->setInsertionPoint(QPoint()); + Kicker::the()->setInsertionPoint(TQPoint()); m_layout->updateFreeSpaceValues(); _dragMoveAC = 0; _dragIndicator->hide(); @@ -1243,7 +1243,7 @@ void ContainerArea::dropEvent(QDropEvent *ev) addApplet(info); } - Kicker::the()->setInsertionPoint(QPoint()); + Kicker::the()->setInsertionPoint(TQPoint()); return; } @@ -1269,7 +1269,7 @@ void ContainerArea::dropEvent(QDropEvent *ev) // see if it's a executable or directory if (url.protocol() == "programs") { - QString relPath = url.path(); + TQString relPath = url.path(); if (relPath[0] == '/') { relPath = relPath.right(relPath.length() - 1); @@ -1278,7 +1278,7 @@ void ContainerArea::dropEvent(QDropEvent *ev) } else if (url.isLocalFile()) { - QFileInfo fi(url.path()); + TQFileInfo fi(url.path()); if (fi.isDir()) { // directory switch (PanelDirDropMenu().exec(mapToGlobal(ev->pos()))) @@ -1308,15 +1308,15 @@ void ContainerArea::dropEvent(QDropEvent *ev) else if (fi.isExecutable()) { // non-KDE executable - QString pixmapFile; + TQString pixmapFile; KMimeType::pixmapForURL(url, 0, KIcon::Panel, 0, KIcon::DefaultState, &pixmapFile); - PanelExeDialog dlg(QString::null, QString::null, url.path(), - pixmapFile, QString::null, false, 0); - if (dlg.exec() == QDialog::Accepted) + PanelExeDialog dlg(TQString::null, TQString::null, url.path(), + pixmapFile, TQString::null, false, 0); + if (dlg.exec() == TQDialog::Accepted) { // KIconloader returns a full path, we only want the name - QFileInfo iconfi(dlg.iconPath()); + TQFileInfo iconfi(dlg.iconPath()); a = new NonKDEAppButtonContainer(dlg.title(), dlg.description(), dlg.command(), @@ -1340,7 +1340,7 @@ void ContainerArea::dropEvent(QDropEvent *ev) if (!a) { _dragIndicator->hide(); - Kicker::the()->setInsertionPoint(QPoint()); + Kicker::the()->setInsertionPoint(TQPoint()); m_layout->setStretchEnabled(true); return; } @@ -1352,11 +1352,11 @@ void ContainerArea::dropEvent(QDropEvent *ev) saveContainerConfig(); _dragMoveAC = 0; _dragIndicator->hide(); - Kicker::the()->setInsertionPoint(QPoint()); + Kicker::the()->setInsertionPoint(TQPoint()); m_layout->setStretchEnabled(true); } -bool ContainerArea::eventFilter(QObject* o, QEvent* e) +bool ContainerArea::eventFilter(TQObject* o, TQEvent* e) { // Propagate the layout hints which m_contents receives. This way widgets // which contain a ContainerArea can react to layout changes of its @@ -1364,7 +1364,7 @@ bool ContainerArea::eventFilter(QObject* o, QEvent* e) // want to grow as well. if (o == m_contents) { - if (e->type() == QEvent::LayoutHint) + if (e->type() == TQEvent::LayoutHint) { updateGeometry(); // Posts a new layout hint to our parent. } @@ -1374,13 +1374,13 @@ bool ContainerArea::eventFilter(QObject* o, QEvent* e) return Panner::eventFilter(o, e); } -void ContainerArea::resizeEvent(QResizeEvent *ev) +void ContainerArea::resizeEvent(TQResizeEvent *ev) { Panner::resizeEvent(ev); setBackground(); } -void ContainerArea::viewportResizeEvent(QResizeEvent* ev) +void ContainerArea::viewportResizeEvent(TQResizeEvent* ev) { Panner::viewportResizeEvent(ev); if (orientation() == Horizontal) @@ -1411,8 +1411,8 @@ void ContainerArea::setBackground() { _rootPixmap = new KRootPixmap(this); _rootPixmap->setCustomPainting(true); - connect(_rootPixmap, SIGNAL(backgroundUpdated(const QPixmap&)), - SLOT(updateBackground(const QPixmap&))); + connect(_rootPixmap, TQT_SIGNAL(backgroundUpdated(const TQPixmap&)), + TQT_SLOT(updateBackground(const TQPixmap&))); } else { @@ -1438,9 +1438,9 @@ void ContainerArea::setBackground() // by keeping the src image static, we can share it among panels and only // reload from disk when it actually changes in the config, not every time we // get a resize or configure event - static QString bgStr; - static QImage srcImage; - QString newBgStr = locate("appdata", KickerSettings::backgroundTheme()); + static TQString bgStr; + static TQImage srcImage; + TQString newBgStr = locate("appdata", KickerSettings::backgroundTheme()); if (bgStr != newBgStr) { @@ -1454,13 +1454,13 @@ void ContainerArea::setBackground() } else { - QImage bgImage = srcImage; + TQImage bgImage = srcImage; if (orientation() == Vertical) { if (KickerSettings::rotateBackground()) { - QWMatrix matrix; + TQWMatrix matrix; matrix.rotate(position() == KPanelExtension::Left ? 90: 270); bgImage = bgImage.xForm(matrix); } @@ -1472,7 +1472,7 @@ void ContainerArea::setBackground() if (position() == KPanelExtension::Top && KickerSettings::rotateBackground()) { - QWMatrix matrix; + TQWMatrix matrix; matrix.rotate(180); bgImage = bgImage.xForm(matrix); } @@ -1484,8 +1484,8 @@ void ContainerArea::setBackground() { KickerLib::colorize(bgImage); } - setPaletteBackgroundPixmap(QPixmap(bgImage)); - QTimer::singleShot(0, this, SLOT(updateContainersBackground())); + setPaletteBackgroundPixmap(TQPixmap(bgImage)); + TQTimer::singleShot(0, this, TQT_SLOT(updateContainersBackground())); } } @@ -1507,12 +1507,12 @@ void ContainerArea::immutabilityChanged(bool immutable) } setAcceptDrops(!isImmutable()); - QTimer::singleShot(0, this, SLOT(setBackground())); + TQTimer::singleShot(0, this, TQT_SLOT(setBackground())); } -QRect ContainerArea::availableSpaceFollowing(BaseContainer* a) +TQRect ContainerArea::availableSpaceFollowing(BaseContainer* a) { - QRect availableSpace = rect(); + TQRect availableSpace = rect(); BaseContainer* b = 0; if (a) @@ -1564,7 +1564,7 @@ QRect ContainerArea::availableSpaceFollowing(BaseContainer* a) void ContainerArea::moveDragIndicator(int pos) { - QRect availableSpace = availableSpaceFollowing(_dragMoveAC); + TQRect availableSpace = availableSpaceFollowing(_dragMoveAC); // Move _dragIndicator to position pos, restricted by availableSpace. // Resize _dragIndicator if necessary. @@ -1606,11 +1606,11 @@ void ContainerArea::moveDragIndicator(int pos) } } -void ContainerArea::updateBackground( const QPixmap& pm ) +void ContainerArea::updateBackground( const TQPixmap& pm ) { - QBrush bgBrush(colorGroup().background(), pm); - QPalette pal = kapp->palette(); - pal.setBrush(QColorGroup::Background, bgBrush); + TQBrush bgBrush(colorGroup().background(), pm); + TQPalette pal = kapp->palette(); + pal.setBrush(TQColorGroup::Background, bgBrush); setPalette(pal); // because the Pixmap can be smaller as the containerarea @@ -1632,7 +1632,7 @@ void ContainerArea::resizeContents(int w, int h) if (!m_updateBackgroundsCalled) { m_updateBackgroundsCalled = true; - QTimer::singleShot(0, this, SLOT(updateContainersBackground())); + TQTimer::singleShot(0, this, TQT_SLOT(updateContainersBackground())); } } @@ -1761,8 +1761,8 @@ void ContainerArea::updateContainersBackground() // case the cached is cleared). if( !m_cachedGeometry.contains( *it )) { - m_cachedGeometry[ *it ] = QRect(); - connect( *it, SIGNAL( destroyed()), SLOT( destroyCachedGeometry())); + m_cachedGeometry[ *it ] = TQRect(); + connect( *it, TQT_SIGNAL( destroyed()), TQT_SLOT( destroyCachedGeometry())); } if( m_cachedGeometry[ *it ] != (*it)->geometry()) { @@ -1774,10 +1774,10 @@ void ContainerArea::updateContainersBackground() void ContainerArea::destroyCachedGeometry() { - m_cachedGeometry.remove(const_cast<QWidget*>(static_cast<const QWidget*>(sender()))); + m_cachedGeometry.remove(const_cast<TQWidget*>(static_cast<const TQWidget*>(sender()))); } -BaseContainer::List ContainerArea::containers(const QString& type) const +BaseContainer::List ContainerArea::containers(const TQString& type) const { if (type.isEmpty() || type == "All") { @@ -1792,7 +1792,7 @@ BaseContainer::List ContainerArea::containers(const QString& type) const it != m_containers.constEnd(); ++it) { - QString type = (*it)->appletType(); + TQString type = (*it)->appletType(); if (type == "KMenuButton" || type == "WindowListButton" || type == "BookmarksButton" || @@ -1821,7 +1821,7 @@ BaseContainer::List ContainerArea::containers(const QString& type) const return list; } -int ContainerArea::containerCount(const QString& type) const +int ContainerArea::containerCount(const TQString& type) const { if (type.isEmpty() || type == "All") { @@ -1835,7 +1835,7 @@ int ContainerArea::containerCount(const QString& type) const it != m_containers.end(); ++it) { - QString type = (*it)->appletType(); + TQString type = (*it)->appletType(); if (type == "KMenuButton" || type == "WindowListButton" || type == "BookmarksButton" || @@ -1864,7 +1864,7 @@ int ContainerArea::containerCount(const QString& type) const return count; } -QStringList ContainerArea::listContainers() const +TQStringList ContainerArea::listContainers() const { return m_layout->listItems(); } @@ -1879,7 +1879,7 @@ void ContainerArea::showAddAppletDialog() if (!m_addAppletDialog) { m_addAppletDialog = new AddAppletDialog(this, this, 0); - connect(m_addAppletDialog, SIGNAL(finished()), this, SLOT(addAppletDialogDone())); + connect(m_addAppletDialog, TQT_SIGNAL(finished()), this, TQT_SLOT(addAppletDialogDone())); } else { @@ -1900,7 +1900,7 @@ void ContainerArea::addAppletDialogDone() m_addAppletDialog = 0; } -const QPixmap* ContainerArea::completeBackgroundPixmap() const +const TQPixmap* ContainerArea::completeBackgroundPixmap() const { return &_completeBg; } @@ -1916,22 +1916,22 @@ int ContainerArea::heightForWidth(int w) const } -DragIndicator::DragIndicator(QWidget* parent, const char* name) - : QWidget(parent, name) +DragIndicator::DragIndicator(TQWidget* parent, const char* name) + : TQWidget(parent, name) { setBackgroundOrigin(AncestorOrigin); } -void DragIndicator::paintEvent(QPaintEvent*) +void DragIndicator::paintEvent(TQPaintEvent*) { - QPainter painter(this); - QRect rect(0, 0, width(), height()); - style().drawPrimitive( QStyle::PE_FocusRect, &painter, rect, colorGroup(), - QStyle::Style_Default, colorGroup().base() ); + TQPainter painter(this); + TQRect rect(0, 0, width(), height()); + style().drawPrimitive( TQStyle::PE_FocusRect, &painter, rect, colorGroup(), + TQStyle::Style_Default, colorGroup().base() ); } -void DragIndicator::mousePressEvent(QMouseEvent*) +void DragIndicator::mousePressEvent(TQMouseEvent*) { hide(); } diff --git a/kicker/kicker/core/containerarea.h b/kicker/kicker/core/containerarea.h index 8b17c8ae9..a43cd8c9c 100644 --- a/kicker/kicker/core/containerarea.h +++ b/kicker/kicker/core/containerarea.h @@ -24,9 +24,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #ifndef __containerarea_h__ #define __containerarea_h__ -#include <qpixmap.h> -#include <qptrlist.h> -#include <qtimer.h> +#include <tqpixmap.h> +#include <tqptrlist.h> +#include <tqtimer.h> #include <appletinfo.h> @@ -48,7 +48,7 @@ class ContainerArea : public Panner Q_OBJECT public: - ContainerArea( KConfig* config, QWidget* parent, QPopupMenu* opMenu, const char* name = 0 ); + ContainerArea( KConfig* config, TQWidget* parent, TQPopupMenu* opMenu, const char* name = 0 ); ~ContainerArea(); void initialize(bool useDefaultConfig); @@ -56,24 +56,24 @@ public: KPanelApplet::Direction popupDirection() const; bool isImmutable() const; - const QWidget* addButton(const AppletInfo& info); - const QWidget* addKMenuButton(); - const QWidget* addDesktopButton(); - const QWidget* addWindowListButton(); - const QWidget* addBookmarksButton(); - const QWidget* addServiceButton(const QString& desktopFile); - const QWidget* addURLButton(const QString &url); - const QWidget* addBrowserButton(); - const QWidget* addBrowserButton(const QString &startDir, - const QString& icon = QString("kdisknav")); - const QWidget* addServiceMenuButton(const QString& relPath); - const QWidget* addNonKDEAppButton(); - const QWidget* addNonKDEAppButton(const QString &name, - const QString &description, - const QString &filePath, - const QString &icon, - const QString &cmdLine, bool inTerm); - const QWidget* addExtensionButton(const QString& desktopFile); + const TQWidget* addButton(const AppletInfo& info); + const TQWidget* addKMenuButton(); + const TQWidget* addDesktopButton(); + const TQWidget* addWindowListButton(); + const TQWidget* addBookmarksButton(); + const TQWidget* addServiceButton(const TQString& desktopFile); + const TQWidget* addURLButton(const TQString &url); + const TQWidget* addBrowserButton(); + const TQWidget* addBrowserButton(const TQString &startDir, + const TQString& icon = TQString("kdisknav")); + const TQWidget* addServiceMenuButton(const TQString& relPath); + const TQWidget* addNonKDEAppButton(); + const TQWidget* addNonKDEAppButton(const TQString &name, + const TQString &description, + const TQString &filePath, + const TQString &icon, + const TQString &cmdLine, bool inTerm); + const TQWidget* addExtensionButton(const TQString& desktopFile); AppletContainer* addApplet(const AppletInfo& info, bool isImmutable = false, int insertionIndex = -1); @@ -84,11 +84,11 @@ public: int widthForHeight(int height) const; int heightForWidth(int width) const; - const QPixmap* completeBackgroundPixmap() const; + const TQPixmap* completeBackgroundPixmap() const; - BaseContainer::List containers(const QString& type) const; - int containerCount(const QString& type) const; - QStringList listContainers() const; + BaseContainer::List containers(const TQString& type) const; + int containerCount(const TQString& type) const; + TQStringList listContainers() const; bool canAddContainers() const; signals: @@ -108,25 +108,25 @@ public slots: void addAppletDialogDone(); protected: - QString createUniqueId(const QString& appletType) const; + TQString createUniqueId(const TQString& appletType) const; void completeContainerAddition(BaseContainer* container, int insertionIndex = -1); - bool eventFilter(QObject*, QEvent*); - void mouseMoveEvent(QMouseEvent*); - void mouseReleaseEvent(QMouseEvent *); - void dragEnterEvent(QDragEnterEvent*); - void dragMoveEvent(QDragMoveEvent*); - void dragLeaveEvent(QDragLeaveEvent*); - void dropEvent(QDropEvent*); - void resizeEvent(QResizeEvent*); - void viewportResizeEvent(QResizeEvent*); + bool eventFilter(TQObject*, TQEvent*); + void mouseMoveEvent(TQMouseEvent*); + void mouseReleaseEvent(TQMouseEvent *); + void dragEnterEvent(TQDragEnterEvent*); + void dragMoveEvent(TQDragMoveEvent*); + void dragLeaveEvent(TQDragLeaveEvent*); + void dropEvent(TQDropEvent*); + void resizeEvent(TQResizeEvent*); + void viewportResizeEvent(TQResizeEvent*); void defaultContainerConfig(); - void loadContainers(const QStringList& containers); + void loadContainers(const TQStringList& containers); void saveContainerConfig(bool layoutOnly = false); - QRect availableSpaceFollowing(BaseContainer*); + TQRect availableSpaceFollowing(BaseContainer*); void moveDragIndicator(int pos); void scrollTo(BaseContainer*); @@ -138,7 +138,7 @@ protected: protected slots: void autoScroll(); - void updateBackground(const QPixmap&); + void updateBackground(const TQPixmap&); void setBackground(); void immutabilityChanged(bool); void updateContainersBackground(); @@ -154,21 +154,21 @@ private: DragIndicator* _dragIndicator; BaseContainer* _dragMoveAC; QPoint _dragMoveOffset; - QPopupMenu* m_opMenu; + TQPopupMenu* m_opMenu; KRootPixmap* _rootPixmap; bool _transparent; bool _useBgTheme; bool _bgSet; - QPixmap _completeBg; - QTimer _autoScrollTimer; + TQPixmap _completeBg; + TQTimer _autoScrollTimer; bool m_canAddContainers; bool m_immutable; bool m_updateBackgroundsCalled; - QWidget* m_contents; + TQWidget* m_contents; ContainerAreaLayout* m_layout; AddAppletDialog* m_addAppletDialog; - QMap< QWidget*, QRect > m_cachedGeometry; + TQMap< TQWidget*, TQRect > m_cachedGeometry; }; @@ -177,18 +177,18 @@ class DragIndicator : public QWidget Q_OBJECT public: - DragIndicator(QWidget* parent = 0, const char* name = 0); + DragIndicator(TQWidget* parent = 0, const char* name = 0); ~DragIndicator() {} - QSize preferredSize() const { return _preferredSize; } - void setPreferredSize(const QSize& size) { _preferredSize = size; } + TQSize preferredSize() const { return _preferredSize; } + void setPreferredSize(const TQSize& size) { _preferredSize = size; } protected: - void paintEvent(QPaintEvent*); - void mousePressEvent(QMouseEvent*); + void paintEvent(TQPaintEvent*); + void mousePressEvent(TQMouseEvent*); private: - QSize _preferredSize; + TQSize _preferredSize; }; #endif diff --git a/kicker/kicker/core/containerarealayout.cpp b/kicker/kicker/core/containerarealayout.cpp index a865bec86..12a09c8e6 100644 --- a/kicker/kicker/core/containerarealayout.cpp +++ b/kicker/kicker/core/containerarealayout.cpp @@ -24,7 +24,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <assert.h> #include <math.h> -#include <qapplication.h> +#include <tqapplication.h> #include <kdebug.h> #include <kglobal.h> @@ -41,20 +41,20 @@ class ContainerAreaLayoutIterator : public QGLayoutIterator { } - QLayoutItem* current() + TQLayoutItem* current() { return m_idx < int(m_list->count()) ? (*m_list->at(m_idx))->item : 0; } - QLayoutItem* next() + TQLayoutItem* next() { m_idx++; return current(); } - QLayoutItem* takeCurrent() + TQLayoutItem* takeCurrent() { - QLayoutItem* item = 0; + TQLayoutItem* item = 0; ContainerAreaLayout::ItemList::iterator b = m_list->at(m_idx); if (b != m_list->end()) { @@ -128,12 +128,12 @@ Qt::Orientation ContainerAreaLayoutItem::orientation() const return m_layout->orientation(); } -QRect ContainerAreaLayoutItem::geometryR() const +TQRect ContainerAreaLayoutItem::geometryR() const { return m_layout->transform(geometry()); } -void ContainerAreaLayoutItem::setGeometryR(const QRect& r) +void ContainerAreaLayoutItem::setGeometryR(const TQRect& r) { setGeometry(m_layout->transform(r)); } @@ -178,7 +178,7 @@ int ContainerAreaLayoutItem::leftR() const { if (orientation() == Horizontal) { - if (QApplication::reverseLayout()) + if (TQApplication::reverseLayout()) return m_layout->geometry().right() - geometry().right(); else return geometry().left(); @@ -193,7 +193,7 @@ int ContainerAreaLayoutItem::rightR() const { if (orientation() == Horizontal) { - if (QApplication::reverseLayout()) + if (TQApplication::reverseLayout()) return m_layout->geometry().right() - geometry().left(); else return geometry().right(); @@ -205,19 +205,19 @@ int ContainerAreaLayoutItem::rightR() const } -ContainerAreaLayout::ContainerAreaLayout(QWidget* parent) - : QLayout(parent), +ContainerAreaLayout::ContainerAreaLayout(TQWidget* parent) + : TQLayout(parent), m_orientation(Horizontal), m_stretchEnabled(true) { } -void ContainerAreaLayout::addItem(QLayoutItem* item) +void ContainerAreaLayout::addItem(TQLayoutItem* item) { m_items.append(new ContainerAreaLayoutItem(item, this)); } -void ContainerAreaLayout::insertIntoFreeSpace(QWidget* widget, QPoint insertionPoint) +void ContainerAreaLayout::insertIntoFreeSpace(TQWidget* widget, TQPoint insertionPoint) { if (!widget) { @@ -247,7 +247,7 @@ void ContainerAreaLayout::insertIntoFreeSpace(QWidget* widget, QPoint insertionP if (nextIt == m_items.end()) { // first item in! - item->setGeometryR(QRect(insertionPoint.x(), insertionPoint.y(), widget->width(), widget->height())); + item->setGeometryR(TQRect(insertionPoint.x(), insertionPoint.y(), widget->width(), widget->height())); updateFreeSpaceValues(); return; } @@ -311,7 +311,7 @@ void ContainerAreaLayout::insertIntoFreeSpace(QWidget* widget, QPoint insertionP } } - QRect geom = item->geometryR(); + TQRect geom = item->geometryR(); geom.moveLeft(insPos); item->setGeometryR(geom); widget->setGeometry(transform(geom)); // widget isn't shown, layout not active yet @@ -341,13 +341,13 @@ void ContainerAreaLayout::insertIntoFreeSpace(QWidget* widget, QPoint insertionP updateFreeSpaceValues(); } -QStringList ContainerAreaLayout::listItems() const +TQStringList ContainerAreaLayout::listItems() const { - QStringList items; + TQStringList items; for (ItemList::const_iterator it = m_items.constBegin(); it != m_items.constEnd(); ++it) { - QLayoutItem* item = (*it)->item; + TQLayoutItem* item = (*it)->item; BaseContainer* container = dynamic_cast<BaseContainer*>(item->widget()); if (!container) @@ -374,7 +374,7 @@ QStringList ContainerAreaLayout::listItems() const return items; } -QWidget* ContainerAreaLayout::widgetAt(int index) const +TQWidget* ContainerAreaLayout::widgetAt(int index) const { if (index < 0 || index >= (int)m_items.count()) { @@ -384,46 +384,46 @@ QWidget* ContainerAreaLayout::widgetAt(int index) const return m_items[index]->item->widget(); } -QSize ContainerAreaLayout::sizeHint() const +TQSize ContainerAreaLayout::sizeHint() const { const int size = KickerLib::sizeValue(KPanelExtension::SizeNormal); if (orientation() == Horizontal) { - return QSize(widthForHeight(size), size); + return TQSize(widthForHeight(size), size); } else { - return QSize(size, heightForWidth(size)); + return TQSize(size, heightForWidth(size)); } } -QSize ContainerAreaLayout::minimumSize() const +TQSize ContainerAreaLayout::minimumSize() const { const int size = KickerLib::sizeValue(KPanelExtension::SizeTiny); if (orientation() == Horizontal) { - return QSize(widthForHeight(size), size); + return TQSize(widthForHeight(size), size); } else { - return QSize(size, heightForWidth(size)); + return TQSize(size, heightForWidth(size)); } } -QLayoutIterator ContainerAreaLayout::iterator() +TQLayoutIterator ContainerAreaLayout::iterator() { - return QLayoutIterator(new ContainerAreaLayoutIterator(&m_items)); + return TQLayoutIterator(new ContainerAreaLayoutIterator(&m_items)); } -void ContainerAreaLayout::setGeometry(const QRect& rect) +void ContainerAreaLayout::setGeometry(const TQRect& rect) { //RESEARCH: when can we short curcuit this? // maybe a dirty flag to be set when we have containers // that needs laying out? - QLayout::setGeometry(rect); + TQLayout::setGeometry(rect); float totalFreeSpace = kMax(0, widthR() - widthForHeightR(heightR())); int occupiedSpace = 0; @@ -453,7 +453,7 @@ void ContainerAreaLayout::setGeometry(const QRect& rect) w = widthR() - pos; } } - cur->setGeometryR(QRect(pos, 0, w, heightR())); + cur->setGeometryR(TQRect(pos, 0, w, heightR())); } } @@ -520,10 +520,10 @@ int ContainerAreaLayout::distanceToPreviousItem(ItemList::const_iterator it) con cur->leftR() - leftR(); } -void ContainerAreaLayout::moveContainerSwitch(QWidget* container, int distance) +void ContainerAreaLayout::moveContainerSwitch(TQWidget* container, int distance) { const bool horizontal = orientation() == Horizontal; - const bool reverseLayout = QApplication::reverseLayout(); + const bool reverseLayout = TQApplication::reverseLayout(); if (horizontal && reverseLayout) distance = - distance; @@ -566,7 +566,7 @@ void ContainerAreaLayout::moveContainerSwitch(QWidget* container, int distance) break; // Move 'next' to the other side of 'moving'. - QRect geom = next->geometryR(); + TQRect geom = next->geometryR(); if (forward) geom.moveLeft(geom.left() - moving->widthR()); else @@ -630,7 +630,7 @@ void ContainerAreaLayout::moveContainerSwitch(QWidget* container, int distance) } // Move the container to its new position and prevent it from moving outside the panel. - QRect geom = moving->geometryR(); + TQRect geom = moving->geometryR(); distance = kClamp(newPos, 0, widthR() - moving->widthR()); geom.moveLeft(distance); moving->setGeometryR(geom); @@ -645,7 +645,7 @@ void ContainerAreaLayout::moveContainerSwitch(QWidget* container, int distance) if(AppletContainer* applet = dynamic_cast<AppletContainer*>(container)) if( applet->info().desktopFile() == "menuapplet.desktop" ) { - QRect geom = (*it)->geometryR(); + TQRect geom = (*it)->geometryR(); if( prev != m_items.constEnd()) geom.moveLeft( (*prev)->rightR() + 1 ); else @@ -657,10 +657,10 @@ void ContainerAreaLayout::moveContainerSwitch(QWidget* container, int distance) updateFreeSpaceValues(); } -int ContainerAreaLayout::moveContainerPush(QWidget* a, int distance) +int ContainerAreaLayout::moveContainerPush(TQWidget* a, int distance) { const bool horizontal = orientation() == Horizontal; - const bool reverseLayout = QApplication::reverseLayout(); + const bool reverseLayout = TQApplication::reverseLayout(); // Get the iterator 'it' pointing to the layoutitem representing 'a'. ItemList::const_iterator it = m_items.constBegin(); @@ -721,20 +721,20 @@ int ContainerAreaLayout::moveContainerPushRecursive(ItemList::const_iterator it, moved = forward ? kMin(distance, available) : kMax(distance, available); - QRect geom = cur->geometryR(); + TQRect geom = cur->geometryR(); geom.moveLeft(geom.left() + moved); cur->setGeometryR(geom); return moved; } -QRect ContainerAreaLayout::transform(const QRect& r) const +TQRect ContainerAreaLayout::transform(const TQRect& r) const { if (orientation() == Horizontal) { - if (QApplication::reverseLayout()) + if (TQApplication::reverseLayout()) { - QRect t = r; + TQRect t = r; t.moveLeft(geometry().right() - r.right()); return t; } @@ -745,7 +745,7 @@ QRect ContainerAreaLayout::transform(const QRect& r) const } else { - return QRect(r.y(), r.x(), r.height(), r.width()); + return TQRect(r.y(), r.x(), r.height(), r.width()); } } diff --git a/kicker/kicker/core/containerarealayout.h b/kicker/kicker/core/containerarealayout.h index 4d4e0561d..995497268 100644 --- a/kicker/kicker/core/containerarealayout.h +++ b/kicker/kicker/core/containerarealayout.h @@ -24,14 +24,14 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #ifndef __containerarealayout_h__ #define __containerarealayout_h__ -#include <qlayout.h> +#include <tqlayout.h> class ContainerAreaLayout; class ContainerAreaLayoutItem : public Qt { public: - ContainerAreaLayoutItem(QLayoutItem* i, ContainerAreaLayout* layout) + ContainerAreaLayoutItem(TQLayoutItem* i, ContainerAreaLayout* layout) : item(i), m_freeSpaceRatio(0.0), m_layout(layout) @@ -45,9 +45,9 @@ class ContainerAreaLayoutItem : public Qt bool isStretch() const; - QRect geometry() const + TQRect geometry() const { return item->geometry(); } - void setGeometry(const QRect& geometry) + void setGeometry(const TQRect& geometry) { item->setGeometry(geometry); } double freeSpaceRatio() const; @@ -56,15 +56,15 @@ class ContainerAreaLayoutItem : public Qt Orientation orientation() const; // Relative geometry - QRect geometryR() const; - void setGeometryR(const QRect&); + TQRect geometryR() const; + void setGeometryR(const TQRect&); int widthForHeightR(int w) const; int widthR() const; int heightR() const; int leftR() const; int rightR() const; - QLayoutItem* item; + TQLayoutItem* item; private: double m_freeSpaceRatio; @@ -75,18 +75,18 @@ class ContainerAreaLayout : public QLayout { public: typedef ContainerAreaLayoutItem Item; - typedef QValueList<Item*> ItemList; + typedef TQValueList<Item*> ItemList; - ContainerAreaLayout(QWidget* parent); + ContainerAreaLayout(TQWidget* parent); - void addItem(QLayoutItem* item); - void insertIntoFreeSpace(QWidget* item, QPoint insertionPoint); - QStringList listItems() const; - QWidget* widgetAt(int index) const; - QSize sizeHint() const; - QSize minimumSize() const; - QLayoutIterator iterator(); - void setGeometry(const QRect& rect); + void addItem(TQLayoutItem* item); + void insertIntoFreeSpace(TQWidget* item, TQPoint insertionPoint); + TQStringList listItems() const; + TQWidget* widgetAt(int index) const; + TQSize sizeHint() const; + TQSize minimumSize() const; + TQLayoutIterator iterator(); + void setGeometry(const TQRect& rect); Orientation orientation() const { return m_orientation; } void setOrientation(Orientation o) { m_orientation = o; } @@ -97,11 +97,11 @@ class ContainerAreaLayout : public QLayout void setStretchEnabled(bool enable); - void moveContainerSwitch(QWidget* container, int distance); - int moveContainerPush(QWidget* container, int distance); + void moveContainerSwitch(TQWidget* container, int distance); + int moveContainerPush(TQWidget* container, int distance); // Relative geometry - QRect transform(const QRect&) const; + TQRect transform(const TQRect&) const; int widthForHeightR(int w) const; int widthR() const; int heightR() const; diff --git a/kicker/kicker/core/extensionmanager.cpp b/kicker/kicker/core/extensionmanager.cpp index e1c2c0c57..e0f68ce8a 100644 --- a/kicker/kicker/core/extensionmanager.cpp +++ b/kicker/kicker/core/extensionmanager.cpp @@ -59,7 +59,7 @@ ExtensionManager* ExtensionManager::the() } ExtensionManager::ExtensionManager() - : QObject(0, "ExtensionManager"), + : TQObject(0, "ExtensionManager"), m_menubarPanel(0), m_mainPanel(0), m_panelCounter(-1) @@ -108,7 +108,7 @@ void ExtensionManager::initialize() m_mainPanel = pm->createExtensionContainer( "childpanelextension.desktop", true, - QString(kapp->aboutData()->appName()) + "rc", + TQString(kapp->aboutData()->appName()) + "rc", "Main Panel"); } @@ -130,14 +130,14 @@ void ExtensionManager::initialize() // read extension list config->setGroup("General"); - QStringList elist = config->readListEntry("Extensions2"); + TQStringList elist = config->readListEntry("Extensions2"); // now restore the extensions - QStringList::iterator itEnd = elist.end(); - for (QStringList::iterator it = elist.begin(); it != elist.end(); ++it) + TQStringList::iterator itEnd = elist.end(); + for (TQStringList::iterator it = elist.begin(); it != elist.end(); ++it) { // extension id - QString extensionId(*it); + TQString extensionId(*it); // create a matching applet container if (extensionId.find("Extension") == -1) @@ -168,9 +168,9 @@ void ExtensionManager::initialize() } pm->clearUntrustedLists(); - connect(Kicker::the(), SIGNAL(configurationChanged()), SLOT(configurationChanged())); + connect(Kicker::the(), TQT_SIGNAL(configurationChanged()), TQT_SLOT(configurationChanged())); DCOPRef r( "ksmserver", "ksmserver" ); - r.send( "resumeStartup", QCString( "kicker" )); + r.send( "resumeStartup", TQCString( "kicker" )); } void ExtensionManager::configureMenubar(bool duringInit) @@ -187,7 +187,7 @@ void ExtensionManager::configureMenubar(bool duringInit) if (duringInit) { - AppletInfo menubarInfo("menuapplet.desktop", QString::null, AppletInfo::Applet); + AppletInfo menubarInfo("menuapplet.desktop", TQString::null, AppletInfo::Applet); if (PluginManager::the()->hasInstance(menubarInfo)) { // it's already there, in the main panel! @@ -211,7 +211,7 @@ void ExtensionManager::configureMenubar(bool duringInit) updateMenubar(); m_menubarPanel->show(); - connect(kapp, SIGNAL(kdisplayFontChanged()), SLOT(updateMenubar())); + connect(kapp, TQT_SIGNAL(kdisplayFontChanged()), TQT_SLOT(updateMenubar())); } else if (m_menubarPanel) { @@ -253,11 +253,11 @@ void ExtensionManager::migrateMenubar() return; } - QStringList elist = config->readListEntry("Extensions2"); - QStringList::iterator itEnd = elist.end(); - for (QStringList::iterator it = elist.begin(); it != elist.end(); ++it) + TQStringList elist = config->readListEntry("Extensions2"); + TQStringList::iterator itEnd = elist.end(); + for (TQStringList::iterator it = elist.begin(); it != elist.end(); ++it) { - QString extensionId(*it); + TQString extensionId(*it); if (extensionId.find("Extension") == -1) { @@ -271,18 +271,18 @@ void ExtensionManager::migrateMenubar() } config->setGroup(extensionId); - QString extension = config->readPathEntry("ConfigFile"); + TQString extension = config->readPathEntry("ConfigFile"); KConfig extensionConfig(locate("config", extension)); extensionConfig.setGroup("General"); if (extensionConfig.hasKey("Applets2")) { - QStringList containers = extensionConfig.readListEntry("Applets2"); - QStringList::iterator cit = containers.begin(); - QStringList::iterator citEnd = containers.end(); + TQStringList containers = extensionConfig.readListEntry("Applets2"); + TQStringList::iterator cit = containers.begin(); + TQStringList::iterator citEnd = containers.end(); for (; cit != citEnd; ++cit) { - QString appletId(*cit); + TQString appletId(*cit); // is there a config group for this applet? if (!extensionConfig.hasGroup(appletId)) @@ -291,14 +291,14 @@ void ExtensionManager::migrateMenubar() } KConfigGroup group(&extensionConfig, appletId.latin1()); - QString appletType = appletId.left(appletId.findRev('_')); + TQString appletType = appletId.left(appletId.findRev('_')); if (appletType == "Applet") { - QString appletFile = group.readPathEntry("DesktopFile"); + TQString appletFile = group.readPathEntry("DesktopFile"); if (appletFile.find("menuapplet.desktop") != -1) { - QString menubarConfig = locate("config", extension); + TQString menubarConfig = locate("config", extension); KIO::NetAccess::copy(menubarConfig, locateLocal("config", "kicker_menubarpanelrc"), 0); @@ -325,7 +325,7 @@ void ExtensionManager::saveContainerConfig() KConfig *config = KGlobal::config(); // build the extension list - QStringList elist; + TQStringList elist; ExtensionList::iterator itEnd = _containers.end(); for (ExtensionList::iterator it = _containers.begin(); it != itEnd; ++it) { @@ -378,22 +378,22 @@ void ExtensionManager::updateMenubar() m_menubarPanel->xineramaScreen()); } -bool ExtensionManager::isMainPanel(const QWidget* panel) const +bool ExtensionManager::isMainPanel(const TQWidget* panel) const { return m_mainPanel == panel; } -bool ExtensionManager::isMenuBar(const QWidget* panel) const +bool ExtensionManager::isMenuBar(const TQWidget* panel) const { return m_menubarPanel == panel; } -void ExtensionManager::addExtension( const QString& desktopFile ) +void ExtensionManager::addExtension( const TQString& desktopFile ) { PluginManager* pm = PluginManager::the(); ExtensionContainer *e = pm->createExtensionContainer(desktopFile, false, // is not startup - QString::null, // no config + TQString::null, // no config uniqueId()); @@ -422,8 +422,8 @@ void ExtensionManager::addContainer(ExtensionContainer* e) _containers.append(e); - connect(e, SIGNAL(removeme(ExtensionContainer*)), - this, SLOT(removeContainer(ExtensionContainer*))); + connect(e, TQT_SIGNAL(removeme(ExtensionContainer*)), + this, TQT_SLOT(removeContainer(ExtensionContainer*))); emit desktopIconsAreaChanged(desktopIconsArea(e->xineramaScreen()), e->xineramaScreen()); @@ -457,10 +457,10 @@ void ExtensionManager::removeAllContainers() saveContainerConfig(); } -QString ExtensionManager::uniqueId() +TQString ExtensionManager::uniqueId() { - QString idBase = "Extension_%1"; - QString newId; + TQString idBase = "Extension_%1"; + TQString newId; int i = 0; bool unique = false; @@ -621,14 +621,14 @@ bool ExtensionManager::shouldExclude(int XineramaScreen, return true; } -QRect ExtensionManager::workArea(int XineramaScreen, const ExtensionContainer* extension) +TQRect ExtensionManager::workArea(int XineramaScreen, const ExtensionContainer* extension) { if (!extension) { return Kicker::the()->kwinModule()->workArea(XineramaScreen); } - QValueList<WId> list; + TQValueList<WId> list; ExtensionList::iterator itEnd = _containers.end(); ExtensionList::iterator it = _containers.begin(); @@ -672,7 +672,7 @@ QRect ExtensionManager::workArea(int XineramaScreen, const ExtensionContainer* e } } - QRect workArea; + TQRect workArea; if ((XineramaScreen == XineramaAllScreens) || (kapp->desktop()->numScreens() < 2)) { /* special value for all screens */ @@ -681,7 +681,7 @@ QRect ExtensionManager::workArea(int XineramaScreen, const ExtensionContainer* e else { workArea = Kicker::the()->kwinModule()->workArea(list, XineramaScreen) - .intersect(QApplication::desktop()->screenGeometry(XineramaScreen)); + .intersect(TQApplication::desktop()->screenGeometry(XineramaScreen)); } return workArea; @@ -693,7 +693,7 @@ int ExtensionManager::nextPanelOrder() return m_panelCounter; } -void ExtensionManager::reduceArea(QRect &area, const ExtensionContainer *extension) const +void ExtensionManager::reduceArea(TQRect &area, const ExtensionContainer *extension) const { if (!extension || extension->hideMode() == ExtensionContainer::AutomaticHide || @@ -702,10 +702,10 @@ void ExtensionManager::reduceArea(QRect &area, const ExtensionContainer *extensi return; } - QRect geom = extension->initialGeometry(extension->position(), extension->alignment(), + TQRect geom = extension->initialGeometry(extension->position(), extension->alignment(), extension->xineramaScreen()); - // reduce given area (QRect) to the space not covered by the given extension + // reduce given area (TQRect) to the space not covered by the given extension // As simplification: the length of the extension is not taken into account // which means that even a small extension e.g. on the left side of the desktop // will remove the available area with its with @@ -736,12 +736,12 @@ void ExtensionManager::reduceArea(QRect &area, const ExtensionContainer *extensi } } -QRect ExtensionManager::desktopIconsArea(int screen) const +TQRect ExtensionManager::desktopIconsArea(int screen) const { // This is pretty broken, mixes Xinerama and non-Xinerama multihead // and generally doesn't seem to be required anyway => ignore screen. -// QRect area = QApplication::desktop()->screenGeometry(screen); - QRect area = QApplication::desktop()->geometry(); +// TQRect area = TQApplication::desktop()->screenGeometry(screen); + TQRect area = TQApplication::desktop()->geometry(); reduceArea(area, m_mainPanel); reduceArea(area, m_menubarPanel); diff --git a/kicker/kicker/core/extensionmanager.h b/kicker/kicker/core/extensionmanager.h index 2885df01f..6de7b35e1 100644 --- a/kicker/kicker/core/extensionmanager.h +++ b/kicker/kicker/core/extensionmanager.h @@ -24,8 +24,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #ifndef __extensionmanager_h__ #define __extensionmanager_h__ -#include <qvaluelist.h> -#include <qobject.h> +#include <tqvaluelist.h> +#include <tqobject.h> #include "container_extension.h" @@ -39,20 +39,20 @@ public: static ExtensionManager* the(); void configureMenubar(bool duringInit); - void addExtension( const QString &desktopFile ); - bool isMainPanel(const QWidget* panel) const; - bool isMenuBar(const QWidget* panel) const; + void addExtension( const TQString &desktopFile ); + bool isMainPanel(const TQWidget* panel) const; + bool isMenuBar(const TQWidget* panel) const; void addContainer( ExtensionContainer* ); void removeAllContainers(); ExtensionList containers() const { return _containers; } KPanelExtension::Position initialPanelPosition(KPanelExtension::Position preferred); - QRect workArea(int XineramaScreen, const ExtensionContainer* container); + TQRect workArea(int XineramaScreen, const ExtensionContainer* container); int nextPanelOrder(); // return the space available for all icons on the desktop // subtracts all panels from XineramaScreen's geometry - QRect desktopIconsArea(int xineramaScreen) const; + TQRect desktopIconsArea(int xineramaScreen) const; public slots: void removeContainer( ExtensionContainer* ); @@ -60,14 +60,14 @@ public slots: void extensionSizeChanged(ExtensionContainer *); signals: - void desktopIconsAreaChanged(const QRect &, int xineramaScreen); + void desktopIconsAreaChanged(const TQRect &, int xineramaScreen); protected: friend class Kicker; ExtensionManager(); ~ExtensionManager(); - QString uniqueId(); + TQString uniqueId(); void saveContainerConfig(); bool shouldExclude(int XineramaScreen, const ExtensionContainer* container, @@ -79,7 +79,7 @@ protected slots: private: void migrateMenubar(); - void reduceArea(QRect &area, const ExtensionContainer *panel) const; + void reduceArea(TQRect &area, const ExtensionContainer *panel) const; ExtensionList _containers; ExtensionContainer* m_menubarPanel; diff --git a/kicker/kicker/core/kicker.cpp b/kicker/kicker/core/kicker.cpp index 65e059c5b..de37c609e 100644 --- a/kicker/kicker/core/kicker.cpp +++ b/kicker/kicker/core/kicker.cpp @@ -24,9 +24,9 @@ #include <stdlib.h> #include <unistd.h> -#include <qfile.h> -#include <qtimer.h> -#include <qtooltip.h> +#include <tqfile.h> +#include <tqtimer.h> +#include <tqtooltip.h> #include <dcopclient.h> #include <kconfig.h> @@ -74,7 +74,7 @@ Kicker::Kicker() // this means we've most likely crashed once. so let's see if we // stay up for more than 2 minutes time, and if so reset the // crash handler since the crash isn't a frequent offender - QTimer::singleShot(120000, this, SLOT(setCrashHandler())); + TQTimer::singleShot(120000, this, TQT_SLOT(setCrashHandler())); } else { @@ -93,7 +93,7 @@ Kicker::Kicker() dcopClient()->setDefaultObject("Panel"); disableSessionManagement(); - QString dataPathBase = KStandardDirs::kde_default("data").append("kicker/"); + TQString dataPathBase = KStandardDirs::kde_default("data").append("kicker/"); KGlobal::dirs()->addResourceType("mini", dataPathBase + "pics/mini"); KGlobal::dirs()->addResourceType("icon", dataPathBase + "pics"); KGlobal::dirs()->addResourceType("builtinbuttons", dataPathBase + "builtins"); @@ -121,19 +121,19 @@ Kicker::Kicker() // set up our global settings configure(); - connect(this, SIGNAL(settingsChanged(int)), SLOT(slotSettingsChanged(int))); - connect(this, SIGNAL(kdisplayPaletteChanged()), SLOT(paletteChanged())); - connect(this, SIGNAL(kdisplayStyleChanged()), SLOT(slotStyleChanged())); + connect(this, TQT_SIGNAL(settingsChanged(int)), TQT_SLOT(slotSettingsChanged(int))); + connect(this, TQT_SIGNAL(kdisplayPaletteChanged()), TQT_SLOT(paletteChanged())); + connect(this, TQT_SIGNAL(kdisplayStyleChanged()), TQT_SLOT(slotStyleChanged())); #if (QT_VERSION-0 >= 0x030200) // XRANDR support - connect(desktop(), SIGNAL(resized(int)), SLOT(slotDesktopResized())); + connect(desktop(), TQT_SIGNAL(resized(int)), TQT_SLOT(slotDesktopResized())); #endif // the panels, aka extensions - QTimer::singleShot(0, ExtensionManager::the(), SLOT(initialize())); + TQTimer::singleShot(0, ExtensionManager::the(), TQT_SLOT(initialize())); - connect(ExtensionManager::the(), SIGNAL(desktopIconsAreaChanged(const QRect &, int)), - this, SLOT(slotDesktopIconsAreaChanged(const QRect &, int))); + connect(ExtensionManager::the(), TQT_SIGNAL(desktopIconsAreaChanged(const TQRect &, int)), + this, TQT_SLOT(slotDesktopIconsAreaChanged(const TQRect &, int))); } Kicker::~Kicker() @@ -205,7 +205,7 @@ void Kicker::slotStyleChanged() restart(); } -bool Kicker::highlightMenuItem(const QString &menuId) +bool Kicker::highlightMenuItem(const TQString &menuId) { return MenuManager::the()->kmenu()->highlightMenuItem( menuId ); } @@ -215,7 +215,7 @@ void Kicker::showKMenu() MenuManager::the()->showKMenu(); } -void Kicker::popupKMenu(const QPoint &p) +void Kicker::popupKMenu(const TQPoint &p) { MenuManager::the()->popupKMenu(p); } @@ -231,13 +231,13 @@ void Kicker::configure() KickerSettings::self()->readConfig(); - QToolTip::setGloballyEnabled(KickerSettings::showToolTips()); + TQToolTip::setGloballyEnabled(KickerSettings::showToolTips()); if (notFirstConfig) { emit configurationChanged(); { - QByteArray data; + TQByteArray data; emitDCOPSignal("configurationChanged()", data); } } @@ -254,7 +254,7 @@ void Kicker::quit() void Kicker::restart() { // do this on a timer to give us time to return true - QTimer::singleShot(0, this, SLOT(slotRestart())); + TQTimer::singleShot(0, this, TQT_SLOT(slotRestart())); } void Kicker::slotRestart() @@ -267,7 +267,7 @@ void Kicker::slotRestart() char ** o_argv = new char*[2]; o_argv[0] = strdup("kicker"); o_argv[1] = 0L; - execv(QFile::encodeName(locate("exe", "kdeinit_wrapper")), o_argv); + execv(TQFile::encodeName(locate("exe", "kdeinit_wrapper")), o_argv); exit(1); } @@ -282,14 +282,14 @@ bool Kicker::isKioskImmutable() const return config()->isImmutable(); } -void Kicker::addExtension( const QString &desktopFile ) +void Kicker::addExtension( const TQString &desktopFile ) { ExtensionManager::the()->addExtension( desktopFile ); } -QStringList Kicker::configModules(bool controlCenter) +TQStringList Kicker::configModules(bool controlCenter) { - QStringList args; + TQStringList args; if (controlCenter) { @@ -306,39 +306,39 @@ QStringList Kicker::configModules(bool controlCenter) return args; } -QPoint Kicker::insertionPoint() +TQPoint Kicker::insertionPoint() { return m_insertionPoint; } -void Kicker::setInsertionPoint(const QPoint &p) +void Kicker::setInsertionPoint(const TQPoint &p) { m_insertionPoint = p; } -void Kicker::showConfig(const QString& configPath, int page) +void Kicker::showConfig(const TQString& configPath, int page) { if (!m_configDialog) { m_configDialog = new KCMultiDialog(0); - QStringList modules = configModules(false); - QStringList::ConstIterator end(modules.end()); - for (QStringList::ConstIterator it = modules.begin(); it != end; ++it) + TQStringList modules = configModules(false); + TQStringList::ConstIterator end(modules.end()); + for (TQStringList::ConstIterator it = modules.begin(); it != end; ++it) { m_configDialog->addModule(*it); } - connect(m_configDialog, SIGNAL(finished()), SLOT(configDialogFinished())); + connect(m_configDialog, TQT_SIGNAL(finished()), TQT_SLOT(configDialogFinished())); } if (!configPath.isEmpty()) { - QByteArray data; - QDataStream stream(data, IO_WriteOnly); + TQByteArray data; + TQDataStream stream(data, IO_WriteOnly); stream << configPath; - emitDCOPSignal("configSwitchToPanel(QString)", data); + emitDCOPSignal("configSwitchToPanel(TQString)", data); } KWin::setOnDesktop(m_configDialog->winId(), KWin::currentDesktop()); @@ -352,7 +352,7 @@ void Kicker::showConfig(const QString& configPath, int page) void Kicker::showTaskBarConfig() { - showConfig(QString(), 4); + showConfig(TQString(), 4); } void Kicker::configureMenubar() @@ -386,16 +386,16 @@ KWinModule* Kicker::kwinModule() return m_kwinModule; } -QRect Kicker::desktopIconsArea(int screen) const +TQRect Kicker::desktopIconsArea(int screen) const { return ExtensionManager::the()->desktopIconsArea(screen); } -void Kicker::slotDesktopIconsAreaChanged(const QRect &area, int screen) +void Kicker::slotDesktopIconsAreaChanged(const TQRect &area, int screen) { - QByteArray params; - QDataStream stream(params, IO_WriteOnly); + TQByteArray params; + TQDataStream stream(params, IO_WriteOnly); stream << area; stream << screen; - emitDCOPSignal("desktopIconsAreaChanged(QRect, int)", params); + emitDCOPSignal("desktopIconsAreaChanged(TQRect, int)", params); } diff --git a/kicker/kicker/core/kicker.h b/kicker/kicker/core/kicker.h index 9ac1d3eac..6bb071007 100644 --- a/kicker/kicker/core/kicker.h +++ b/kicker/kicker/core/kicker.h @@ -24,7 +24,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #ifndef __kicker_h__ #define __kicker_h__ -#include <qcolor.h> +#include <tqcolor.h> #include <kuniqueapplication.h> #include <kicontheme.h> @@ -49,22 +49,22 @@ k_dcop: void configure(); void quit(); void restart(); - void addExtension( const QString &desktopFile ); - void popupKMenu( const QPoint &globalPos ); + void addExtension( const TQString &desktopFile ); + void popupKMenu( const TQPoint &globalPos ); void clearQuickStartMenu(); - bool highlightMenuItem( const QString &menuId ); + bool highlightMenuItem( const TQString &menuId ); void showKMenu(); void toggleShowDesktop(); bool desktopShowing(); - void showConfig(const QString& config, int page = -1); + void showConfig(const TQString& config, int page = -1); void showTaskBarConfig(); void configureMenubar(); // return the region on the desktop, which is not covered by panels // and therefore allowed to be used by icons placed on the desktop - QRect desktopIconsArea(int screen) const; + TQRect desktopIconsArea(int screen) const; k_dcop_signals: - void desktopIconsAreaChanged(QRect area, int screen); + void desktopIconsAreaChanged(TQRect area, int screen); public: static Kicker* the(); @@ -75,12 +75,12 @@ public: bool isKioskImmutable() const; bool canAddContainers() const { return m_canAddContainers && !isImmutable(); } - static QStringList configModules(bool controlCenter); + static TQStringList configModules(bool controlCenter); /** * Global position where to insert a new item */ - QPoint insertionPoint(); + TQPoint insertionPoint(); /** * Set the global position where to insert a new item @@ -90,14 +90,14 @@ public: * * Kicker::the()->setInsertionPoint(p); * ... - * QPoint where = Kicker::the()->insertionPoint(); + * TQPoint where = Kicker::the()->insertionPoint(); * ... - * Kicker::the()->setInsertionPoint(QPoint()); + * Kicker::the()->setInsertionPoint(TQPoint()); * * this is not pretty, but it's pragmatic and does everything * that is needed */ - void setInsertionPoint(const QPoint &p); + void setInsertionPoint(const TQPoint &p); public slots: @@ -116,7 +116,7 @@ private slots: void slotStyleChanged(); void paletteChanged(); void setCrashHandler(); - void slotDesktopIconsAreaChanged(const QRect &area, int screen); + void slotDesktopIconsAreaChanged(const TQRect &area, int screen); private: static void crashHandler(int signal); @@ -125,7 +125,7 @@ private: KWinModule* m_kwinModule; KCMultiDialog* m_configDialog; bool m_canAddContainers; - QPoint m_insertionPoint; + TQPoint m_insertionPoint; }; #endif diff --git a/kicker/kicker/core/kickerbindings.cpp b/kicker/kicker/core/kickerbindings.cpp index 2134fb975..bc62df231 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), QString::null, key3, key4, target, SLOT(fnSlot) ) + keys->insert( name, i18n(name), TQString::null, key3, key4, target, TQT_SLOT(fnSlot) ) #else # define DEF( name, key3, key4, target, fnSlot ) \ - keys->insert( name, i18n(name), QString::null, key3, key4 ) + keys->insert( name, i18n(name), TQString::null, key3, key4 ) #endif #define WIN KKey::QtWIN diff --git a/kicker/kicker/core/main.cpp b/kicker/kicker/core/main.cpp index aa49f90aa..16090b9af 100644 --- a/kicker/kicker/core/main.cpp +++ b/kicker/kicker/core/main.cpp @@ -51,13 +51,13 @@ static const char version[] = VERSION; static void sighandler(int) { fprintf(stderr, "kicker: sighandler called\n"); - QApplication::exit(); + TQApplication::exit(); } extern "C" KDE_EXPORT int kdemain( int argc, char ** argv ) { { - QCString multiHead = getenv("KDE_MULTIHEAD"); + TQCString multiHead = getenv("KDE_MULTIHEAD"); if (multiHead.lower() == "true") { Display *dpy = XOpenDisplay(NULL); if (! dpy) { @@ -69,14 +69,14 @@ extern "C" KDE_EXPORT int kdemain( int argc, char ** argv ) int number_of_screens = ScreenCount(dpy); kicker_screen_number = DefaultScreen(dpy); int pos; - QCString display_name = XDisplayString(dpy); + TQCString display_name = XDisplayString(dpy); XCloseDisplay(dpy); dpy = 0; if ((pos = display_name.findRev('.')) != -1) display_name.remove(pos, 10); - QCString env; + TQCString env; if (number_of_screens != 1) { for (int i = 0; i < number_of_screens; i++) { if (i != kicker_screen_number && fork() == 0) { @@ -101,7 +101,7 @@ extern "C" KDE_EXPORT int kdemain( int argc, char ** argv ) KGlobal::locale()->setMainCatalogue("kicker"); - QCString appname; + TQCString appname; if (kicker_screen_number == 0) appname = "kicker"; else @@ -140,12 +140,12 @@ extern "C" KDE_EXPORT int kdemain( int argc, char ** argv ) signal(SIGHUP, SIG_IGN); // send it even before KApplication ctor, because ksmserver will launch another app as soon - // as QApplication registers with it + // as TQApplication registers with it DCOPClient* cl = new DCOPClient; cl->attach(); DCOPRef r( "ksmserver", "ksmserver" ); r.setDCOPClient( cl ); - r.send( "suspendStartup", QCString( "kicker" )); + r.send( "suspendStartup", TQCString( "kicker" )); delete cl; Kicker* kicker = new Kicker; int rv = kicker->exec(); diff --git a/kicker/kicker/core/menumanager.cpp b/kicker/kicker/core/menumanager.cpp index 9e4a91f97..908f6bdf9 100644 --- a/kicker/kicker/core/menumanager.cpp +++ b/kicker/kicker/core/menumanager.cpp @@ -21,9 +21,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ******************************************************************/ -#include <qcursor.h> -#include <qpixmap.h> -#include <qtimer.h> +#include <tqcursor.h> +#include <tqpixmap.h> +#include <tqtimer.h> #include <kapplication.h> #include <dcopclient.h> @@ -59,13 +59,13 @@ MenuManager* MenuManager::the() return m_self; } -MenuManager::MenuManager(QObject *parent) - : QObject(parent, "MenuManager"), DCOPObject("MenuManager") +MenuManager::MenuManager(TQObject *parent) + : TQObject(parent, "MenuManager"), DCOPObject("MenuManager") { m_kmenu = new PanelKMenu; kapp->dcopClient()->setNotifications(true); - connect(kapp->dcopClient(), SIGNAL(applicationRemoved(const QCString&)), - this, SLOT(applicationRemoved(const QCString&))); + connect(kapp->dcopClient(), TQT_SIGNAL(applicationRemoved(const TQCString&)), + this, TQT_SLOT(applicationRemoved(const TQCString&))); } MenuManager::~MenuManager() @@ -88,7 +88,7 @@ void MenuManager::showKMenu() m_kmenu->showMenu(); } -void MenuManager::popupKMenu(const QPoint &p) +void MenuManager::popupKMenu(const TQPoint &p) { // kdDebug(1210) << "popupKMenu()" << endl; if (m_kmenu->isVisible()) @@ -97,7 +97,7 @@ void MenuManager::popupKMenu(const QPoint &p) } else if (p.isNull()) { - m_kmenu->popup(QCursor::pos()); + m_kmenu->popup(TQCursor::pos()); } else { @@ -120,7 +120,7 @@ void MenuManager::unregisterKButton(PanelPopupButton *button) m_kbuttons.remove(button); } -PanelPopupButton* MenuManager::findKButtonFor(QPopupMenu* menu) +PanelPopupButton* MenuManager::findKButtonFor(TQPopupMenu* menu) { KButtonList::const_iterator itEnd = m_kbuttons.constEnd(); for (KButtonList::const_iterator it = m_kbuttons.constBegin(); it != itEnd; ++it) @@ -147,37 +147,37 @@ void MenuManager::kmenuAccelActivated() if (m_kbuttons.isEmpty()) { // no button to use, make it behave like a desktop menu - QPoint p; + TQPoint p; // Popup the K-menu at the center of the screen. - QDesktopWidget* desktop = KApplication::desktop(); - QRect r; + TQDesktopWidget* desktop = KApplication::desktop(); + TQRect r; if (desktop->numScreens() < 2) r = desktop->geometry(); else - r = desktop->screenGeometry(desktop->screenNumber(QCursor::pos())); + r = desktop->screenGeometry(desktop->screenNumber(TQCursor::pos())); // kMenu->rect() is not valid before showing, use sizeHint() - p = r.center() - QRect( QPoint( 0, 0 ), m_kmenu->sizeHint()).center(); + p = r.center() - TQRect( TQPoint( 0, 0 ), m_kmenu->sizeHint()).center(); m_kmenu->popup(p); // when the cursor is in the area where the menu pops up, // the item under the cursor gets selected. The single shot // avoids this from happening by allowing the item to be selected // when the event loop is enterred, and then resetting it. - QTimer::singleShot(0, this, SLOT(slotSetKMenuItemActive())); + TQTimer::singleShot(0, this, TQT_SLOT(slotSetKMenuItemActive())); } else { // 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 QSize size = m_kmenu->sizeHint(); + const TQSize size = m_kmenu->sizeHint(); m_kmenu->resize(size.width(),size.height()); PanelPopupButton* button = findKButtonFor(m_kmenu); // let's unhide the panel while we're at it. traverse the widget // hierarchy until we find the panel, if any - QObject* menuParent = button->parent(); + TQObject* menuParent = button->parent(); while (menuParent) { ExtensionContainer* ext = dynamic_cast<ExtensionContainer*>(menuParent); @@ -198,11 +198,11 @@ void MenuManager::kmenuAccelActivated() } } -QCString MenuManager::createMenu(QPixmap icon, QString text) +TQCString MenuManager::createMenu(TQPixmap icon, TQString text) { static int menucount = 0; menucount++; - QCString name; + TQCString name; name.sprintf("kickerclientmenu-%d", menucount ); KickerClientMenu* p = new KickerClientMenu( 0, name ); clientmenus.append(p); @@ -215,7 +215,7 @@ QCString MenuManager::createMenu(QPixmap icon, QString text) return name; } -void MenuManager::removeMenu(QCString menu) +void MenuManager::removeMenu(TQCString menu) { bool iterate = true; ClientMenuList::iterator it = clientmenus.begin(); @@ -234,7 +234,7 @@ void MenuManager::removeMenu(QCString menu) } -void MenuManager::applicationRemoved(const QCString& appRemoved) +void MenuManager::applicationRemoved(const TQCString& appRemoved) { bool iterate = true; ClientMenuList::iterator it = clientmenus.begin(); @@ -252,21 +252,21 @@ void MenuManager::applicationRemoved(const QCString& appRemoved) m_kmenu->adjustSize(); } -bool MenuManager::process(const QCString &fun, const QByteArray &data, - QCString &replyType, QByteArray &replyData) +bool MenuManager::process(const TQCString &fun, const TQByteArray &data, + TQCString &replyType, TQByteArray &replyData) { - if ( fun == "createMenu(QPixmap,QString)" ) { - QDataStream dataStream( data, IO_ReadOnly ); - QPixmap icon; - QString text; + if ( fun == "createMenu(TQPixmap,TQString)" ) { + TQDataStream dataStream( data, IO_ReadOnly ); + TQPixmap icon; + TQString text; dataStream >> icon >> text; - QDataStream reply( replyData, IO_WriteOnly ); + TQDataStream reply( replyData, IO_WriteOnly ); reply << createMenu( icon, text ); - replyType = "QCString"; + replyType = "TQCString"; return true; - } else if ( fun == "removeMenu(QCString)" ) { - QDataStream dataStream( data, IO_ReadOnly ); - QCString menu; + } else if ( fun == "removeMenu(TQCString)" ) { + TQDataStream dataStream( data, IO_ReadOnly ); + TQCString menu; dataStream >> menu; removeMenu( menu ); replyType = "void"; diff --git a/kicker/kicker/core/menumanager.h b/kicker/kicker/core/menumanager.h index ed0e5d225..e9d7dfef4 100644 --- a/kicker/kicker/core/menumanager.h +++ b/kicker/kicker/core/menumanager.h @@ -25,38 +25,38 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define KICKER_MENU_MANAGER_H #include <dcopobject.h> -#include <qvaluelist.h> +#include <tqvaluelist.h> class PanelKMenu; class KickerClientMenu; class PanelPopupButton; -typedef QValueList<PanelPopupButton*> KButtonList; +typedef TQValueList<PanelPopupButton*> KButtonList; /** * The factory for menus created by other applications. Also the owner of these menus. */ -class MenuManager : public QObject, DCOPObject +class MenuManager : public TQObject, DCOPObject { Q_OBJECT public: static MenuManager* the(); // dcop exported - QCString createMenu(QPixmap icon, QString text); - void removeMenu(QCString menu); + TQCString createMenu(TQPixmap icon, TQString text); + void removeMenu(TQCString menu); // dcop internal - bool process(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &reply); + bool process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &reply); // KMenu controls PanelKMenu* kmenu() { return m_kmenu; } void showKMenu(); - void popupKMenu(const QPoint &p); + void popupKMenu(const TQPoint &p); void registerKButton(PanelPopupButton *button); void unregisterKButton(PanelPopupButton *button); - PanelPopupButton* findKButtonFor(QPopupMenu* menu); + PanelPopupButton* findKButtonFor(TQPopupMenu* menu); ~MenuManager(); public slots: @@ -64,15 +64,15 @@ public slots: void kmenuAccelActivated(); protected slots: - void applicationRemoved(const QCString&); + void applicationRemoved(const TQCString&); protected: PanelKMenu* m_kmenu; - typedef QValueList<KickerClientMenu*> ClientMenuList; + typedef TQValueList<KickerClientMenu*> ClientMenuList; ClientMenuList clientmenus; private: - MenuManager(QObject *parent = 0); + MenuManager(TQObject *parent = 0); static MenuManager* m_self; KButtonList m_kbuttons; diff --git a/kicker/kicker/core/panelextension.cpp b/kicker/kicker/core/panelextension.cpp index 70b7b407d..2bd70c82b 100644 --- a/kicker/kicker/core/panelextension.cpp +++ b/kicker/kicker/core/panelextension.cpp @@ -22,11 +22,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ******************************************************************/ -#include <qframe.h> -#include <qvalidator.h> -#include <qlayout.h> -#include <qpainter.h> -#include <qstyle.h> +#include <tqframe.h> +#include <tqvalidator.h> +#include <tqlayout.h> +#include <tqpainter.h> +#include <tqstyle.h> #include <kdebug.h> #include <khelpmenu.h> @@ -53,8 +53,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "panelextension.moc" // KDE4: make these say Panel_(somenumber) -PanelExtension::PanelExtension(const QString& configFile, QWidget *parent, const char *name) - : DCOPObject(QCString("ChildPanel_") + QString::number((ulong)this).latin1()), +PanelExtension::PanelExtension(const TQString& configFile, TQWidget *parent, const char *name) + : DCOPObject(TQCString("ChildPanel_") + TQString::number((ulong)this).latin1()), KPanelExtension(configFile, KPanelExtension::Stretch, 0, parent, name), _opMnu(0), m_panelAddMenu(0), @@ -67,11 +67,11 @@ PanelExtension::PanelExtension(const QString& configFile, QWidget *parent, const setAcceptDrops(!Kicker::the()->isImmutable()); setCustomMenu(opMenu()); - QVBoxLayout* _layout = new QVBoxLayout(this); + TQVBoxLayout* _layout = new TQVBoxLayout(this); // container area _containerArea = new ContainerArea( config(), this, opMenu() ); - connect(_containerArea, SIGNAL(maintainFocus(bool)), this, SIGNAL(maintainFocus(bool))); + connect(_containerArea, TQT_SIGNAL(maintainFocus(bool)), this, TQT_SIGNAL(maintainFocus(bool))); _layout->addWidget(_containerArea); _containerArea->viewport()->installEventFilter(this); @@ -81,15 +81,15 @@ PanelExtension::PanelExtension(const QString& configFile, QWidget *parent, const // beginning. positionChange(position()); - connect(Kicker::the(), SIGNAL(configurationChanged()), - SLOT(configurationChanged())); - connect(Kicker::the(), SIGNAL(immutabilityChanged(bool)), - SLOT(immutabilityChanged(bool))); + connect(Kicker::the(), TQT_SIGNAL(configurationChanged()), + TQT_SLOT(configurationChanged())); + connect(Kicker::the(), TQT_SIGNAL(immutabilityChanged(bool)), + TQT_SLOT(immutabilityChanged(bool))); // we wait to get back to the event loop to start up the container area so that // the main panel in ExtensionManager will be assigned and we can tell in a // relatively non-hackish way that we are (or aren't) the "main panel" - QTimer::singleShot(0, this, SLOT(populateContainerArea())); + TQTimer::singleShot(0, this, TQT_SLOT(populateContainerArea())); } PanelExtension::~PanelExtension() @@ -121,15 +121,15 @@ void PanelExtension::immutabilityChanged(bool) m_opMenuBuilt = false; } -QPopupMenu* PanelExtension::opMenu() +TQPopupMenu* PanelExtension::opMenu() { if (_opMnu) { return _opMnu; } - _opMnu = new QPopupMenu(this); - connect(_opMnu, SIGNAL(aboutToShow()), this, SLOT(slotBuildOpMenu())); + _opMnu = new TQPopupMenu(this); + connect(_opMnu, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotBuildOpMenu())); return _opMnu; } @@ -139,39 +139,39 @@ void PanelExtension::positionChange(Position p) _containerArea->setPosition(p); } -QSize PanelExtension::sizeHint(Position p, QSize maxSize) const +TQSize PanelExtension::sizeHint(Position p, TQSize maxSize) const { - QSize size; + TQSize size; if (p == Left || p == Right) { - size = QSize(sizeInPixels(), + size = TQSize(sizeInPixels(), _containerArea->heightForWidth(sizeInPixels())); } else { - size = QSize(_containerArea->widthForHeight(sizeInPixels()), + size = TQSize(_containerArea->widthForHeight(sizeInPixels()), sizeInPixels()); } return size.boundedTo( maxSize ); } -bool PanelExtension::eventFilter(QObject*, QEvent * e) +bool PanelExtension::eventFilter(TQObject*, TQEvent * e) { - if ( e->type() == QEvent::MouseButtonPress ) + if ( e->type() == TQEvent::MouseButtonPress ) { - QMouseEvent* me = (QMouseEvent*) e; + TQMouseEvent* me = (TQMouseEvent*) e; if ( me->button() == RightButton && kapp->authorize("action/kicker_rmb")) { Kicker::the()->setInsertionPoint(me->globalPos()); opMenu()->exec(me->globalPos()); - Kicker::the()->setInsertionPoint(QPoint()); + Kicker::the()->setInsertionPoint(TQPoint()); return true; } } else - if ( e->type() == QEvent::Resize ) + if ( e->type() == TQEvent::Resize ) { emit updateLayout(); } @@ -211,72 +211,72 @@ void PanelExtension::addWindowListButton() _containerArea->addWindowListButton(); } -void PanelExtension::addURLButton(const QString &url) +void PanelExtension::addURLButton(const TQString &url) { _containerArea->addURLButton(url); } -void PanelExtension::addBrowserButton(const QString &startDir) +void PanelExtension::addBrowserButton(const TQString &startDir) { _containerArea->addBrowserButton(startDir); } -void PanelExtension::addServiceButton(const QString& desktopEntry) +void PanelExtension::addServiceButton(const TQString& desktopEntry) { _containerArea->addServiceButton(desktopEntry); } -void PanelExtension::addServiceMenuButton(const QString &, - const QString& relPath) +void PanelExtension::addServiceMenuButton(const TQString &, + const TQString& relPath) { _containerArea->addServiceMenuButton(relPath); } -void PanelExtension::addNonKDEAppButton(const QString &filePath, - const QString &icon, - const QString &cmdLine, bool inTerm) +void PanelExtension::addNonKDEAppButton(const TQString &filePath, + const TQString &icon, + const TQString &cmdLine, bool inTerm) { - _containerArea->addNonKDEAppButton(filePath, QString::null, filePath, icon, + _containerArea->addNonKDEAppButton(filePath, TQString::null, filePath, icon, cmdLine, inTerm); } -void PanelExtension::addNonKDEAppButton(const QString &title, - const QString &description, - const QString &filePath, - const QString &icon, - const QString &cmdLine, bool inTerm) +void PanelExtension::addNonKDEAppButton(const TQString &title, + const TQString &description, + const TQString &filePath, + const TQString &icon, + const TQString &cmdLine, bool inTerm) { _containerArea->addNonKDEAppButton(title, description, filePath, icon, cmdLine, inTerm); } -void PanelExtension::addApplet(const QString &desktopFile) +void PanelExtension::addApplet(const TQString &desktopFile) { - _containerArea->addApplet(AppletInfo(desktopFile, QString::null, AppletInfo::Applet)); + _containerArea->addApplet(AppletInfo(desktopFile, TQString::null, AppletInfo::Applet)); } -void PanelExtension::addAppletContainer(const QString &desktopFile) +void PanelExtension::addAppletContainer(const TQString &desktopFile) { // KDE4: this appears in the DCOP interface. // but it's such a bad name, can this go away? addApplet(desktopFile); } -bool PanelExtension::insertApplet(const QString& desktopFile, int index) +bool PanelExtension::insertApplet(const TQString& desktopFile, int index) { return _containerArea->addApplet(desktopFile, false, index) != 0; } -bool PanelExtension::insertImmutableApplet(const QString& desktopFile, int index) +bool PanelExtension::insertImmutableApplet(const TQString& desktopFile, int index) { return _containerArea->addApplet(desktopFile, true, index) != 0; } -QStringList PanelExtension::listApplets() +TQStringList PanelExtension::listApplets() { return _containerArea->listContainers(); BaseContainer::List containers = _containerArea->containers("All"); - QStringList names; + TQStringList names; for (BaseContainer::List::const_iterator it = containers.constBegin(); it != containers.constEnd(); @@ -330,7 +330,7 @@ void PanelExtension::slotBuildOpMenu() m_opMenuBuilt = true; bool kickerImmutable = Kicker::the()->isImmutable(); - bool isMenuBar = ExtensionManager::the()->isMenuBar(dynamic_cast<QWidget*>(parent())); + bool isMenuBar = ExtensionManager::the()->isMenuBar(dynamic_cast<TQWidget*>(parent())); if (!kickerImmutable) { @@ -339,7 +339,7 @@ void PanelExtension::slotBuildOpMenu() { _opMnu->insertItem(isMenuBar ? i18n("Add &Applet to Menubar...") : i18n("Add &Applet to Panel..."), - _containerArea, SLOT(showAddAppletDialog())); + _containerArea, TQT_SLOT(showAddAppletDialog())); m_panelAddMenu = new PanelAddButtonMenu(_containerArea, this); _opMnu->insertItem(isMenuBar ? i18n("Add Appli&cation to Menubar") : i18n("Add Appli&cation to Panel"), @@ -362,7 +362,7 @@ void PanelExtension::slotBuildOpMenu() } _opMnu->insertItem(SmallIconSet("lock"), i18n("&Lock Panels"), - Kicker::the(), SLOT(toggleLock())); + Kicker::the(), TQT_SLOT(toggleLock())); } else if (!Kicker::the()->isKioskImmutable()) { @@ -370,20 +370,20 @@ void PanelExtension::slotBuildOpMenu() SmallIconSet("lock"), kickerImmutable ? i18n("Un&lock Panels") : i18n("&Lock Panels"), - Kicker::the(), SLOT(toggleLock())); + Kicker::the(), TQT_SLOT(toggleLock())); } if (!isMenuBar && !Kicker::the()->isKioskImmutable()) { _opMnu->insertItem(SmallIconSet("configure"), i18n("&Configure Panel..."), - this, SLOT(showConfig())); + this, TQT_SLOT(showConfig())); _opMnu->insertSeparator(); } _opMnu->insertItem(SmallIconSet("fork"), i18n("&Launch Process Manager..."), - this, SLOT(showProcessManager())); + this, TQT_SLOT(showProcessManager())); _opMnu->insertSeparator(); if (kapp->authorize("action/help")) @@ -441,7 +441,7 @@ void MenubarExtension::populateContainerArea() if (!m_menubar) { m_menubar = _containerArea->addApplet(AppletInfo("menuapplet.desktop", - QString::null, + TQString::null, AppletInfo::Applet)); } diff --git a/kicker/kicker/core/panelextension.h b/kicker/kicker/core/panelextension.h index 9f50fb9ae..5c753c316 100644 --- a/kicker/kicker/core/panelextension.h +++ b/kicker/kicker/core/panelextension.h @@ -44,10 +44,10 @@ class PanelExtension : public KPanelExtension, virtual public DCOPObject K_DCOP public: - PanelExtension(const QString& configFile, QWidget *parent = 0, const char *name = 0); + PanelExtension(const TQString& configFile, TQWidget *parent = 0, const char *name = 0); virtual ~PanelExtension(); - QPopupMenu* opMenu(); + TQPopupMenu* opMenu(); k_dcop: int panelSize() { return sizeInPixels(); } @@ -58,31 +58,31 @@ k_dcop: void addKMenuButton(); void addDesktopButton(); void addWindowListButton(); - void addURLButton(const QString &url); - void addBrowserButton(const QString &startDir); - void addServiceButton(const QString &desktopEntry); - void addServiceMenuButton(const QString &name, const QString& relPath); - void addNonKDEAppButton(const QString &filePath, const QString &icon, - const QString &cmdLine, bool inTerm); - void addNonKDEAppButton(const QString &title, const QString &description, - const QString &filePath, const QString &icon, - const QString &cmdLine, bool inTerm); - - void addApplet(const QString &desktopFile); - void addAppletContainer(const QString &desktopFile); // KDE4: remove, useless - - bool insertApplet(const QString& desktopFile, int index); - bool insertImmutableApplet(const QString& desktopFile, int index); - QStringList listApplets(); + void addURLButton(const TQString &url); + void addBrowserButton(const TQString &startDir); + void addServiceButton(const TQString &desktopEntry); + void addServiceMenuButton(const TQString &name, const TQString& relPath); + void addNonKDEAppButton(const TQString &filePath, const TQString &icon, + const TQString &cmdLine, bool inTerm); + void addNonKDEAppButton(const TQString &title, const TQString &description, + const TQString &filePath, const TQString &icon, + const TQString &cmdLine, bool inTerm); + + void addApplet(const TQString &desktopFile); + void addAppletContainer(const TQString &desktopFile); // KDE4: remove, useless + + bool insertApplet(const TQString& desktopFile, int index); + bool insertImmutableApplet(const TQString& desktopFile, int index); + TQStringList listApplets(); bool removeApplet(int index); void restart(); // KDE4: remove, moved to Kicker void configure(); // KDE4: remove, moved to Kikcker public: - QSize sizeHint(Position, QSize maxSize) const; + TQSize sizeHint(Position, TQSize maxSize) const; Position preferedPosition() const { return Bottom; } - bool eventFilter( QObject *, QEvent * ); + bool eventFilter( TQObject *, TQEvent * ); protected: void positionChange(Position); @@ -98,12 +98,12 @@ protected slots: virtual void populateContainerArea(); private: - QPopupMenu* _opMnu; - QPopupMenu* m_panelAddMenu; - QPopupMenu* m_removeMnu; - QPopupMenu* m_addExtensionMenu; - QPopupMenu* m_removeExtensionMenu; - QString _configFile; + TQPopupMenu* _opMnu; + TQPopupMenu* m_panelAddMenu; + TQPopupMenu* m_removeMnu; + TQPopupMenu* m_addExtensionMenu; + TQPopupMenu* m_removeExtensionMenu; + TQString _configFile; bool m_opMenuBuilt; }; diff --git a/kicker/kicker/core/pluginmanager.cpp b/kicker/kicker/core/pluginmanager.cpp index e392959ad..81975ccae 100644 --- a/kicker/kicker/core/pluginmanager.cpp +++ b/kicker/kicker/core/pluginmanager.cpp @@ -21,8 +21,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ******************************************************************/ -#include <qfile.h> -#include <qtimer.h> +#include <tqfile.h> +#include <tqtimer.h> #include <kapplication.h> #include <kdebug.h> @@ -54,33 +54,33 @@ PluginManager* PluginManager::the() AppletInfo::List PluginManager::applets(bool sort, AppletInfo::List* list) { - QStringList rel; + TQStringList rel; KGlobal::dirs()->findAllResources("applets", "*.desktop", false, true, rel); return plugins(rel, AppletInfo::Applet, sort, list); } AppletInfo::List PluginManager::extensions(bool sort, AppletInfo::List* list) { - QStringList rel; + TQStringList rel; KGlobal::dirs()->findAllResources("extensions", "*.desktop", false, true, rel); return plugins(rel, AppletInfo::Extension, sort, list); } AppletInfo::List PluginManager::builtinButtons(bool sort, AppletInfo::List* list) { - QStringList rel; + TQStringList rel; KGlobal::dirs()->findAllResources("builtinbuttons", "*.desktop", false, true, rel); return plugins(rel, AppletInfo::BuiltinButton, sort, list); } AppletInfo::List PluginManager::specialButtons(bool sort, AppletInfo::List* list) { - QStringList rel; + TQStringList rel; KGlobal::dirs()->findAllResources("specialbuttons", "*.desktop", false, true, rel); return plugins(rel, AppletInfo::SpecialButton, sort, list); } -AppletInfo::List PluginManager::plugins(const QStringList& desktopFiles, +AppletInfo::List PluginManager::plugins(const TQStringList& desktopFiles, AppletInfo::AppletType type, bool sort, AppletInfo::List* list) @@ -92,10 +92,10 @@ AppletInfo::List PluginManager::plugins(const QStringList& desktopFiles, plugins = *list; } - for (QStringList::ConstIterator it = desktopFiles.constBegin(); + for (TQStringList::ConstIterator it = desktopFiles.constBegin(); it != desktopFiles.constEnd(); ++it) { - AppletInfo info(*it, QString::null, type); + AppletInfo info(*it, TQString::null, type); if (!info.isHidden()) { @@ -123,8 +123,8 @@ PluginManager::~PluginManager() AppletInfo::Dict::const_iterator it = _dict.constBegin(); for (; it != _dict.constEnd(); ++it) { - disconnect(it.key(), SIGNAL(destroyed( QObject*)), - this, SLOT(slotPluginDestroyed(QObject*))); + disconnect(it.key(), TQT_SIGNAL(destroyed( TQObject*)), + this, TQT_SLOT(slotPluginDestroyed(TQObject*))); delete it.data(); } @@ -133,10 +133,10 @@ PluginManager::~PluginManager() } KPanelApplet* PluginManager::loadApplet(const AppletInfo& info, - QWidget* parent ) + TQWidget* parent ) { KLibLoader* loader = KLibLoader::self(); - KLibrary* lib = loader->library( QFile::encodeName(info.library()) ); + KLibrary* lib = loader->library( TQFile::encodeName(info.library()) ); if (!lib) { @@ -145,13 +145,13 @@ KPanelApplet* PluginManager::loadApplet(const AppletInfo& info, return 0; } - KPanelApplet* (*init_ptr)(QWidget *, const QString&); - init_ptr = (KPanelApplet* (*)(QWidget *, const QString&))lib->symbol( "init" ); + KPanelApplet* (*init_ptr)(TQWidget *, const TQString&); + init_ptr = (KPanelApplet* (*)(TQWidget *, const TQString&))lib->symbol( "init" ); if (!init_ptr) { kdWarning() << info.library() << " is not a kicker extension!" << endl; - loader->unloadLibrary( QFile::encodeName(info.library()) ); + loader->unloadLibrary( TQFile::encodeName(info.library()) ); return 0; } @@ -160,15 +160,15 @@ KPanelApplet* PluginManager::loadApplet(const AppletInfo& info, if (applet) { _dict.insert( applet, new AppletInfo( info ) ); - connect( applet, SIGNAL( destroyed( QObject* ) ), - SLOT( slotPluginDestroyed( QObject* ) ) ); + connect( applet, TQT_SIGNAL( destroyed( TQObject* ) ), + TQT_SLOT( slotPluginDestroyed( TQObject* ) ) ); } return applet; } KPanelExtension* PluginManager::loadExtension( - const AppletInfo& info, QWidget* parent ) + const AppletInfo& info, TQWidget* parent ) { if (info.library() == "childpanel_panelextension" /* KDE4? || info.library() == "panel" */) @@ -177,7 +177,7 @@ KPanelExtension* PluginManager::loadExtension( } KLibLoader* loader = KLibLoader::self(); - KLibrary* lib = loader->library( QFile::encodeName(info.library()) ); + KLibrary* lib = loader->library( TQFile::encodeName(info.library()) ); if( !lib ) { kdWarning() << "cannot open extension: " << info.library() @@ -185,12 +185,12 @@ KPanelExtension* PluginManager::loadExtension( return 0; } - KPanelExtension* (*init_ptr)(QWidget *, const QString&); - init_ptr = (KPanelExtension* (*)(QWidget *, const QString&))lib->symbol( "init" ); + KPanelExtension* (*init_ptr)(TQWidget *, const TQString&); + init_ptr = (KPanelExtension* (*)(TQWidget *, const TQString&))lib->symbol( "init" ); if(!init_ptr){ kdWarning() << info.library() << " is not a kicker extension!" << endl; - loader->unloadLibrary( QFile::encodeName(info.library()) ); + loader->unloadLibrary( TQFile::encodeName(info.library()) ); return 0; } @@ -198,8 +198,8 @@ KPanelExtension* PluginManager::loadExtension( if( extension ) { _dict.insert( extension, new AppletInfo( info ) ); - connect( extension, SIGNAL( destroyed( QObject* ) ), - SLOT( slotPluginDestroyed( QObject* ) ) ); + connect( extension, TQT_SIGNAL( destroyed( TQObject* ) ), + TQT_SLOT( slotPluginDestroyed( TQObject* ) ) ); } return extension; @@ -219,7 +219,7 @@ bool PluginManager::hasInstance( const AppletInfo& info ) const return false; } -void PluginManager::slotPluginDestroyed(QObject* object) +void PluginManager::slotPluginDestroyed(TQObject* object) { AppletInfo* info = 0; AppletInfo::Dict::iterator it = _dict.begin(); @@ -243,14 +243,14 @@ void PluginManager::slotPluginDestroyed(QObject* object) } AppletContainer* PluginManager::createAppletContainer( - const QString& desktopFile, + const TQString& desktopFile, bool isStartup, - const QString& configFile, - QPopupMenu* opMenu, - QWidget* parent, + const TQString& configFile, + TQPopupMenu* opMenu, + TQWidget* parent, bool isImmutable) { - QString desktopPath = KGlobal::dirs()->findResource( "applets", desktopFile ); + TQString desktopPath = KGlobal::dirs()->findResource( "applets", desktopFile ); // KDE4: remove // support the old (KDE 2.2) nameing scheme @@ -298,17 +298,17 @@ AppletContainer* PluginManager::createAppletContainer( return container; } -ExtensionContainer* PluginManager::createExtensionContainer(const QString& desktopFile, +ExtensionContainer* PluginManager::createExtensionContainer(const TQString& desktopFile, bool isStartup, - const QString& configFile, - const QString& extensionId) + const TQString& configFile, + const TQString& extensionId) { if (desktopFile.isEmpty()) { return 0; } - QString desktopPath = KGlobal::dirs()->findResource("extensions", desktopFile); + TQString desktopPath = KGlobal::dirs()->findResource("extensions", desktopFile); if (desktopPath.isEmpty()) { return 0; @@ -355,22 +355,22 @@ void PluginManager::clearUntrustedLists() generalGroup.sync(); } -LibUnloader::LibUnloader( const QString &libName, QObject *parent ) - : QObject( parent ), _libName( libName ) +LibUnloader::LibUnloader( const TQString &libName, TQObject *parent ) + : TQObject( parent ), _libName( libName ) { // NOTE: this doesn't work on kicker shutdown because the timer never gets // fired. - QTimer::singleShot( 0, this, SLOT( unload() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( unload() ) ); } -void LibUnloader::unload( const QString &libName ) +void LibUnloader::unload( const TQString &libName ) { (void)new LibUnloader( libName, kapp ); } void LibUnloader::unload() { - KLibLoader::self()->unloadLibrary( QFile::encodeName( _libName ) ); + KLibLoader::self()->unloadLibrary( TQFile::encodeName( _libName ) ); deleteLater(); } diff --git a/kicker/kicker/core/pluginmanager.h b/kicker/kicker/core/pluginmanager.h index bbea87b30..7be94c2ac 100644 --- a/kicker/kicker/core/pluginmanager.h +++ b/kicker/kicker/core/pluginmanager.h @@ -24,9 +24,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #ifndef __PLUGIN_MANAGER_H__ #define __PLUGIN_MANAGER_H__ -#include <qmap.h> -#include <qobject.h> -#include <qstringlist.h> +#include <tqmap.h> +#include <tqobject.h> +#include <tqstringlist.h> #include <kdemacros.h> #include <kstaticdeleter.h> @@ -49,19 +49,19 @@ public: static AppletInfo::List builtinButtons(bool sort = true, AppletInfo::List* list = 0); static AppletInfo::List specialButtons(bool sort = true, AppletInfo::List* list = 0); - AppletContainer* createAppletContainer(const QString& desktopFile, + AppletContainer* createAppletContainer(const TQString& desktopFile, bool isStartup, - const QString& configFile, - QPopupMenu* opMenu, - QWidget* parent, + const TQString& configFile, + TQPopupMenu* opMenu, + TQWidget* parent, bool isImmutable = false); - ExtensionContainer* createExtensionContainer(const QString& desktopFile, + ExtensionContainer* createExtensionContainer(const TQString& desktopFile, bool isStartup, - const QString& configFile, - const QString& extensionId); + const TQString& configFile, + const TQString& extensionId); - KPanelApplet* loadApplet(const AppletInfo& info, QWidget* parent); - KPanelExtension* loadExtension(const AppletInfo& info, QWidget* parent); + KPanelApplet* loadApplet(const AppletInfo& info, TQWidget* parent); + KPanelExtension* loadExtension(const AppletInfo& info, TQWidget* parent); bool hasInstance(const AppletInfo&) const; @@ -69,13 +69,13 @@ public slots: void clearUntrustedLists(); protected: - static AppletInfo::List plugins(const QStringList& desktopFiles, + static AppletInfo::List plugins(const TQStringList& desktopFiles, AppletInfo::AppletType, bool sort, AppletInfo::List* list); private slots: - void slotPluginDestroyed(QObject* plugin); + void slotPluginDestroyed(TQObject* plugin); private: friend class KStaticDeleter<PluginManager>; @@ -84,23 +84,23 @@ private: AppletInfo::Dict _dict; static PluginManager* m_self; - QStringList m_untrustedApplets; - QStringList m_untrustedExtensions; + TQStringList m_untrustedApplets; + TQStringList m_untrustedExtensions; }; class LibUnloader : public QObject { Q_OBJECT public: - static void unload( const QString &libName ); + static void unload( const TQString &libName ); private slots: void unload(); private: - LibUnloader( const QString &libName, QObject *parent ); + LibUnloader( const TQString &libName, TQObject *parent ); - QString _libName; + TQString _libName; }; #endif diff --git a/kicker/kicker/core/showdesktop.cpp b/kicker/kicker/core/showdesktop.cpp index 5575b3b28..7f75ba1b9 100644 --- a/kicker/kicker/core/showdesktop.cpp +++ b/kicker/kicker/core/showdesktop.cpp @@ -40,7 +40,7 @@ ShowDesktop* ShowDesktop::the() } ShowDesktop::ShowDesktop() - : QObject(), + : TQObject(), m_showingDesktop(false) { // This feature is implemented in KWin. Keep old code in Kicker for the case @@ -49,8 +49,8 @@ ShowDesktop::ShowDesktop() m_wmSupport = i.isSupported( NET::WM2ShowingDesktop ); if( m_wmSupport ) { - connect( Kicker::the()->kwinModule(), SIGNAL( showingDesktopChanged( bool )), - SLOT( showingDesktopChanged( bool ))); + connect( Kicker::the()->kwinModule(), TQT_SIGNAL( showingDesktopChanged( bool )), + TQT_SLOT( showingDesktopChanged( bool ))); showingDesktopChanged( m_showingDesktop = Kicker::the()->kwinModule()->showingDesktop()); } } @@ -133,8 +133,8 @@ void ShowDesktop::showDesktop( bool b ) m_activeWindow = Kicker::the()->kwinModule()->activeWindow(); m_iconifiedList.clear(); - const QValueList<WId> windows = Kicker::the()->kwinModule()->windows(); - for (QValueList<WId>::ConstIterator it = windows.begin(); + const TQValueList<WId> windows = Kicker::the()->kwinModule()->windows(); + for (TQValueList<WId>::ConstIterator it = windows.begin(); it != windows.end(); ++it) { @@ -153,7 +153,7 @@ void ShowDesktop::showDesktop( bool b ) // find first, hide later, otherwise transients may get minimized // with the window they're transient for - for (QValueVector<WId>::Iterator it = m_iconifiedList.begin(); + for (TQValueVector<WId>::Iterator it = m_iconifiedList.begin(); it != m_iconifiedList.end(); ++it) { @@ -161,23 +161,23 @@ void ShowDesktop::showDesktop( bool b ) } // on desktop changes or when a window is deiconified, we abort the show desktop mode - connect(Kicker::the()->kwinModule(), SIGNAL(currentDesktopChanged(int)), - SLOT(slotCurrentDesktopChanged(int))); - connect(Kicker::the()->kwinModule(), SIGNAL(windowChanged(WId,unsigned int)), - SLOT(slotWindowChanged(WId,unsigned int))); - connect(Kicker::the()->kwinModule(), SIGNAL(windowAdded(WId)), - SLOT(slotWindowAdded(WId))); + connect(Kicker::the()->kwinModule(), TQT_SIGNAL(currentDesktopChanged(int)), + TQT_SLOT(slotCurrentDesktopChanged(int))); + connect(Kicker::the()->kwinModule(), TQT_SIGNAL(windowChanged(WId,unsigned int)), + TQT_SLOT(slotWindowChanged(WId,unsigned int))); + connect(Kicker::the()->kwinModule(), TQT_SIGNAL(windowAdded(WId)), + TQT_SLOT(slotWindowAdded(WId))); } else { - disconnect(Kicker::the()->kwinModule(), SIGNAL(currentDesktopChanged(int)), - this, SLOT(slotCurrentDesktopChanged(int))); - disconnect(Kicker::the()->kwinModule(), SIGNAL(windowChanged(WId,unsigned int)), - this, SLOT(slotWindowChanged(WId,unsigned int))); - disconnect(Kicker::the()->kwinModule(), SIGNAL(windowAdded(WId)), - this, SLOT(slotWindowAdded(WId))); - - for (QValueVector<WId>::ConstIterator it = m_iconifiedList.begin(); + disconnect(Kicker::the()->kwinModule(), TQT_SIGNAL(currentDesktopChanged(int)), + this, TQT_SLOT(slotCurrentDesktopChanged(int))); + disconnect(Kicker::the()->kwinModule(), TQT_SIGNAL(windowChanged(WId,unsigned int)), + this, TQT_SLOT(slotWindowChanged(WId,unsigned int))); + disconnect(Kicker::the()->kwinModule(), TQT_SIGNAL(windowAdded(WId)), + this, TQT_SLOT(slotWindowAdded(WId))); + + for (TQValueVector<WId>::ConstIterator it = m_iconifiedList.begin(); it != m_iconifiedList.end(); ++it) { diff --git a/kicker/kicker/core/showdesktop.h b/kicker/kicker/core/showdesktop.h index bebf62007..8d4d2546c 100644 --- a/kicker/kicker/core/showdesktop.h +++ b/kicker/kicker/core/showdesktop.h @@ -26,7 +26,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. class KWinModule; -#include <qvaluevector.h> +#include <tqvaluevector.h> /** * Singleton class that handles desktop access (minimizing all windows) @@ -56,7 +56,7 @@ private: ShowDesktop(); bool m_showingDesktop; - QValueVector<WId> m_iconifiedList; + TQValueVector<WId> m_iconifiedList; WId m_activeWindow; bool m_wmSupport; }; diff --git a/kicker/kicker/core/unhidetrigger.cpp b/kicker/kicker/core/unhidetrigger.cpp index bd0e0a0f8..7dcf1a127 100644 --- a/kicker/kicker/core/unhidetrigger.cpp +++ b/kicker/kicker/core/unhidetrigger.cpp @@ -21,8 +21,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ******************************************************************/ -#include <qtimer.h> -#include <qcursor.h> +#include <tqtimer.h> +#include <tqcursor.h> #include <kdebug.h> #include "unhidetrigger.h" @@ -39,8 +39,8 @@ UnhideTrigger::UnhideTrigger() , _lastXineramaScreen( -1 ) , enabledCount( 0 ) { - _timer = new QTimer( this ); - connect( _timer, SIGNAL(timeout()), SLOT(pollMouse()) ); + _timer = new TQTimer( this ); + connect( _timer, TQT_SIGNAL(timeout()), TQT_SLOT(pollMouse()) ); } void UnhideTrigger::setEnabled( bool enable ) @@ -65,10 +65,10 @@ bool UnhideTrigger::isEnabled() const void UnhideTrigger::pollMouse() { - QPoint pos = QCursor::pos(); - for(int s = 0; s < QApplication::desktop()->numScreens(); s++) + TQPoint pos = TQCursor::pos(); + for(int s = 0; s < TQApplication::desktop()->numScreens(); s++) { - QRect r = QApplication::desktop()->screenGeometry(s); + TQRect r = TQApplication::desktop()->screenGeometry(s); if (pos.x() == r.left()) { if (pos.y() == r.top()) diff --git a/kicker/kicker/core/unhidetrigger.h b/kicker/kicker/core/unhidetrigger.h index 7e13a0e1d..af05a43f5 100644 --- a/kicker/kicker/core/unhidetrigger.h +++ b/kicker/kicker/core/unhidetrigger.h @@ -30,7 +30,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #endif -#include <qobject.h> +#include <tqobject.h> class UnhideTrigger : public QObject { @@ -55,7 +55,7 @@ private: void emitTrigger( Trigger t , int XineramaScreen ); Trigger _lastTrigger; int _lastXineramaScreen; - QTimer *_timer; + TQTimer *_timer; int enabledCount; }; diff --git a/kicker/kicker/core/userrectsel.cpp b/kicker/kicker/core/userrectsel.cpp index 5654b1eb3..d4b54f04a 100644 --- a/kicker/kicker/core/userrectsel.cpp +++ b/kicker/kicker/core/userrectsel.cpp @@ -21,14 +21,14 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ******************************************************************/ -#include <qapplication.h> -#include <qpainter.h> +#include <tqapplication.h> +#include <tqpainter.h> #include "userrectsel.h" #include "userrectsel.moc" -UserRectSel::UserRectSel(const RectList& rects, const QPoint& _offset, const QColor& color) - : QWidget(0, 0, WStyle_Customize | WX11BypassWM), +UserRectSel::UserRectSel(const RectList& rects, const TQPoint& _offset, const TQColor& color) + : TQWidget(0, 0, WStyle_Customize | WX11BypassWM), rectangles(rects), offset(_offset) { @@ -44,7 +44,7 @@ UserRectSel::~UserRectSel() delete _frame[i]; } -void UserRectSel::mouseReleaseEvent(QMouseEvent * e) +void UserRectSel::mouseReleaseEvent(TQMouseEvent * e) { if (e->button() == LeftButton) { @@ -52,11 +52,11 @@ void UserRectSel::mouseReleaseEvent(QMouseEvent * e) } } -void UserRectSel::mouseMoveEvent(QMouseEvent * e) +void UserRectSel::mouseMoveEvent(TQMouseEvent * e) { PanelStrut nearest = current; int diff = -1; - QPoint p = e->globalPos(); // + offset; + TQPoint p = e->globalPos(); // + offset; for (RectList::const_iterator it = rectangles.constBegin(); it != rectangles.constEnd(); ++it) @@ -88,12 +88,12 @@ void UserRectSel::paintCurrent() { for (i = 0; i < 4; i++) { - _frame[i] = new QWidget(0, 0, Qt::WStyle_Customize | Qt::WStyle_NoBorder | Qt::WX11BypassWM); + _frame[i] = new TQWidget(0, 0, Qt::WStyle_Customize | Qt::WStyle_NoBorder | Qt::WX11BypassWM); _frame[i]->setPaletteBackgroundColor(Qt::black); } for (i = 4; i < 8; i++) { - _frame[i] = new QWidget(0, 0, Qt::WStyle_Customize | Qt::WStyle_NoBorder | Qt::WX11BypassWM); + _frame[i] = new TQWidget(0, 0, Qt::WStyle_Customize | Qt::WStyle_NoBorder | Qt::WX11BypassWM); _frame[i]->setPaletteBackgroundColor(_color); } } @@ -132,7 +132,7 @@ void UserRectSel::paintCurrent() } -UserRectSel::PanelStrut UserRectSel::select(const RectList& rects, const QPoint& offset, const QColor& color) +UserRectSel::PanelStrut UserRectSel::select(const RectList& rects, const TQPoint& offset, const TQColor& color) { UserRectSel sel(rects, offset, color); sel.show(); diff --git a/kicker/kicker/core/userrectsel.h b/kicker/kicker/core/userrectsel.h index 724f39818..63ba47fd5 100644 --- a/kicker/kicker/core/userrectsel.h +++ b/kicker/kicker/core/userrectsel.h @@ -24,9 +24,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #ifndef __userrectsel_h__ #define __userrectsel_h__ -#include <qwidget.h> -#include <qvaluevector.h> -#include <qcolor.h> +#include <tqwidget.h> +#include <tqvaluevector.h> +#include <tqcolor.h> #include <kpanelextension.h> @@ -47,7 +47,7 @@ class UserRectSel : public QWidget { } - PanelStrut(const QRect& rect, int XineramaScreen, + PanelStrut(const TQRect& rect, int XineramaScreen, KPanelExtension::Position pos, KPanelExtension::Alignment alignment) : m_rect(rect), @@ -69,29 +69,29 @@ class UserRectSel : public QWidget return !(*this == rhs); } - QRect m_rect; + TQRect m_rect; int m_screen; KPanelExtension::Position m_pos; KPanelExtension::Alignment m_alignment; }; - typedef QValueVector<PanelStrut> RectList; - static PanelStrut select(const RectList& rects, const QPoint& _offset, const QColor& color); + typedef TQValueVector<PanelStrut> RectList; + static PanelStrut select(const RectList& rects, const TQPoint& _offset, const TQColor& color); protected: - void mouseReleaseEvent(QMouseEvent *); - void mouseMoveEvent(QMouseEvent *); + void mouseReleaseEvent(TQMouseEvent *); + void mouseMoveEvent(TQMouseEvent *); private: - UserRectSel(const RectList& rects, const QPoint& _offset, const QColor& color); + UserRectSel(const RectList& rects, const TQPoint& _offset, const TQColor& color); ~UserRectSel(); void paintCurrent(); const RectList rectangles; PanelStrut current; - QPoint offset; - QWidget *_frame[8]; - QColor _color; + TQPoint offset; + TQWidget *_frame[8]; + TQColor _color; friend class ShutUpCompiler; }; |