From ffe8a83e053396df448e9413828527613ca3bd46 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:46:43 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1157647 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kparts/statusbarextension.cpp | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'kparts/statusbarextension.cpp') diff --git a/kparts/statusbarextension.cpp b/kparts/statusbarextension.cpp index bd4e09b61..6b0ee3cb2 100644 --- a/kparts/statusbarextension.cpp +++ b/kparts/statusbarextension.cpp @@ -20,8 +20,8 @@ #include "statusbarextension.h" -#include -#include +#include +#include #include #include @@ -41,11 +41,11 @@ class KParts::StatusBarItem { StatusBarItem() // for QValueList : m_widget(0), m_visible(false) {} - StatusBarItem( QWidget * widget, int stretch, bool permanent ) + StatusBarItem( TQWidget * widget, int stretch, bool permanent ) : m_widget(widget), m_stretch(stretch), m_permanent(permanent), m_visible(false) {} - QWidget * widget() const { return m_widget; } + TQWidget * widget() const { return m_widget; } void ensureItemShown( KStatusBar * sb ) { @@ -66,7 +66,7 @@ class KParts::StatusBarItem { } } private: - QWidget * m_widget; + TQWidget * m_widget; int m_stretch; bool m_permanent; bool m_visible; // true when the item has been added to the statusbar @@ -76,7 +76,7 @@ class KParts::StatusBarItem { StatusBarExtension::StatusBarExtension(KParts::ReadOnlyPart *parent, const char* name) - : QObject(parent, name), m_statusBar(0), d(0) + : TQObject(parent, name), m_statusBar(0), d(0) { parent->installEventFilter(this); } @@ -86,15 +86,15 @@ StatusBarExtension::~StatusBarExtension() } -StatusBarExtension *StatusBarExtension::childObject( QObject *obj ) +StatusBarExtension *StatusBarExtension::childObject( TQObject *obj ) { if ( !obj || !obj->children() ) return 0L; // we try to do it on our own, in hope that we are faster than // queryList, which looks kind of big :-) - const QObjectList *children = obj->children(); - QObjectListIt it( *children ); + const TQObjectList *children = obj->children(); + TQObjectListIt it( *children ); for (; it.current(); ++it ) if ( it.current()->inherits( "KParts::StatusBarExtension" ) ) return static_cast( it.current() ); @@ -102,27 +102,27 @@ StatusBarExtension *StatusBarExtension::childObject( QObject *obj ) return 0L; } -bool StatusBarExtension::eventFilter(QObject * watched, QEvent* ev) +bool StatusBarExtension::eventFilter(TQObject * watched, TQEvent* ev) { if ( !GUIActivateEvent::test( ev ) || !watched->inherits("KParts::ReadOnlyPart") ) - return QObject::eventFilter(watched, ev); + return TQObject::eventFilter(watched, ev); KStatusBar * sb = statusBar(); if ( !sb ) - return QObject::eventFilter(watched, ev); + return TQObject::eventFilter(watched, ev); GUIActivateEvent *gae = static_cast(ev); if ( gae->activated() ) { - QValueListIterator it = m_statusBarItems.begin(); + TQValueListIterator it = m_statusBarItems.begin(); for ( ; it != m_statusBarItems.end() ; ++it ) (*it).ensureItemShown( sb ); } else { - QValueListIterator it = m_statusBarItems.begin(); + TQValueListIterator it = m_statusBarItems.begin(); for ( ; it != m_statusBarItems.end() ; ++it ) (*it).ensureItemHidden( sb ); } @@ -134,7 +134,7 @@ bool StatusBarExtension::eventFilter(QObject * watched, QEvent* ev) KStatusBar * StatusBarExtension::statusBar() const { if ( !m_statusBar ) { - QWidget* w = static_cast(parent())->widget(); + TQWidget* w = static_cast(parent())->widget(); KMainWindow* mw = dynamic_cast( w->topLevelWidget() ); if ( mw ) m_statusBar = mw->statusBar(); @@ -147,20 +147,20 @@ void StatusBarExtension::setStatusBar( KStatusBar* status ) m_statusBar = status; } -void StatusBarExtension::addStatusBarItem( QWidget * widget, int stretch, bool permanent ) +void StatusBarExtension::addStatusBarItem( TQWidget * widget, int stretch, bool permanent ) { m_statusBarItems.append( StatusBarItem( widget, stretch, permanent ) ); - QValueListIterator it = m_statusBarItems.fromLast(); + TQValueListIterator it = m_statusBarItems.fromLast(); KStatusBar * sb = statusBar(); Q_ASSERT(sb); if (sb) (*it).ensureItemShown( sb ); } -void StatusBarExtension::removeStatusBarItem( QWidget * widget ) +void StatusBarExtension::removeStatusBarItem( TQWidget * widget ) { KStatusBar * sb = statusBar(); - QValueListIterator it = m_statusBarItems.begin(); + TQValueListIterator it = m_statusBarItems.begin(); for ( ; it != m_statusBarItems.end() ; ++it ) if ( (*it).widget() == widget ) { -- cgit v1.2.1