diff options
Diffstat (limited to 'bibletime/frontend/cmdiarea.cpp')
-rw-r--r-- | bibletime/frontend/cmdiarea.cpp | 84 |
1 files changed, 42 insertions, 42 deletions
diff --git a/bibletime/frontend/cmdiarea.cpp b/bibletime/frontend/cmdiarea.cpp index 1584466..4da250f 100644 --- a/bibletime/frontend/cmdiarea.cpp +++ b/bibletime/frontend/cmdiarea.cpp @@ -24,21 +24,21 @@ #include <klocale.h> //QT includes -#include <qobjectlist.h> -#include <qtimer.h> -#include <qevent.h> -#include <qtimer.h> +#include <tqobjectlist.h> +#include <tqtimer.h> +#include <tqevent.h> +#include <tqtimer.h> #if QT_VERSION < 0x030200 //We need this to close all windows with Qt < 3.2 -#include <qwidgetlist.h> +#include <tqwidgetlist.h> #endif -CMDIArea::CMDIArea(QWidget *parent, const char *name ) -: QWorkspace(parent, name), +CMDIArea::CMDIArea(TQWidget *parent, const char *name ) +: TQWorkspace(parent, name), m_guiOption(Nothing), m_childEvent(false), -m_appCaption(QString::null) { +m_appCaption(TQString::null) { initView(); initConnections(); readSettings(); @@ -52,12 +52,12 @@ void CMDIArea::initView() { /** Initilizes the connectiosn to SIGNALS */ void CMDIArea::initConnections() { - connect(this, SIGNAL(windowActivated(QWidget*)), - this, SLOT(slotClientActivated(QWidget*))); + connect(this, TQT_SIGNAL(windowActivated(TQWidget*)), + this, TQT_SLOT(slotClientActivated(TQWidget*))); } /** Called whan a client window was activated */ -void CMDIArea::slotClientActivated(QWidget* client) { +void CMDIArea::slotClientActivated(TQWidget* client) { if (!client || !isUpdatesEnabled()) { return; } @@ -68,8 +68,8 @@ void CMDIArea::slotClientActivated(QWidget* client) { return; } - QWidgetList windows = windowList(); - for ( QWidget* w = windows.first(); w; w = windows.next() ) { + TQWidgetList windows = windowList(); + for ( TQWidget* w = windows.first(); w; w = windows.next() ) { //Don't use!! It would disable accel enabling for the active window, see CDisplayWindow::windowActivated /* if (w == client) continue; @@ -83,8 +83,8 @@ void CMDIArea::slotClientActivated(QWidget* client) { } /** Reimplementation. Used to make use of the fixedGUIOption part. */ -void CMDIArea::childEvent( QChildEvent * e ) { - QWorkspace::childEvent(e); +void CMDIArea::childEvent( TQChildEvent * e ) { + TQWorkspace::childEvent(e); if ( m_childEvent || !e) { return; @@ -93,7 +93,7 @@ void CMDIArea::childEvent( QChildEvent * e ) { m_childEvent = true; if (!windowList().count()) { - m_appCaption = QString::null; + m_appCaption = TQString::null; emit sigSetToplevelCaption( KApplication::kApplication()->makeStdCaption(m_appCaption) ); emit sigLastPresenterClosed(); } @@ -113,8 +113,8 @@ void CMDIArea::childEvent( QChildEvent * e ) { } /** Reimplementation */ -void CMDIArea::resizeEvent(QResizeEvent* e) { - QWorkspace::resizeEvent(e); +void CMDIArea::resizeEvent(TQResizeEvent* e) { + TQWorkspace::resizeEvent(e); if (isUpdatesEnabled()) { triggerWindowUpdate(); @@ -132,7 +132,7 @@ void CMDIArea::deleteAll() { #if QT_VERSION >= 0x030200 closeAllWindows(); #else - QWidgetListIt it(windowList()); + TQWidgetListIt it(windowList()); while (it.current() != 0){ it.current()->close(); ++it; @@ -154,15 +154,15 @@ void CMDIArea::myTileVertical() { return; } - QPtrList<QWidget> windows = usableWindowList(); + TQPtrList<TQWidget> windows = usableWindowList(); if ((windows.count() == 1) && windows.at(0)) { m_appCaption = windows.at(0)->caption(); windows.at(0)->showMaximized(); } else { - QWidget* active = activeWindow(); - QWorkspace::tile(); + TQWidget* active = activeWindow(); + TQWorkspace::tile(); active->setFocus(); } } @@ -172,7 +172,7 @@ void CMDIArea::myTileHorizontal() { return; } - QPtrList<QWidget> windows = usableWindowList(); + TQPtrList<TQWidget> windows = usableWindowList(); if ((windows.count() == 1) && windows.at(0)) { m_appCaption = windows.at(0)->caption(); @@ -180,7 +180,7 @@ void CMDIArea::myTileHorizontal() { } else { - QWidget* active = activeWindow(); + TQWidget* active = activeWindow(); if (active->isMaximized()) { active->showNormal(); } @@ -190,9 +190,9 @@ void CMDIArea::myTileHorizontal() { int heightForEach = height() / windows.count(); int y = 0; for ( int i = 0; i < int(windows.count()); ++i ) { - QWidget *window = windows.at(i); + TQWidget *window = windows.at(i); window->parentWidget()->showNormal(); - qApp->sendPostedEvents( 0, QEvent::ShowNormal ); + qApp->sendPostedEvents( 0, TQEvent::ShowNormal ); const int preferredHeight = window->minimumHeight() + window->parentWidget()->baseSize().height(); const int actHeight = QMAX(heightForEach, preferredHeight); @@ -214,7 +214,7 @@ void CMDIArea::myCascade() { return; } - QPtrList<QWidget> windows = usableWindowList(); + TQPtrList<TQWidget> windows = usableWindowList(); if ( !windows.count() ) { return; } @@ -232,7 +232,7 @@ void CMDIArea::myCascade() { int x = 0; int y = 0; - QWidget* const active = activeWindow(); + TQWidget* const active = activeWindow(); if (active->isMaximized()) { active->showNormal(); } @@ -241,7 +241,7 @@ void CMDIArea::myCascade() { setUpdatesEnabled(false); for (int i(0); i < int(windows.count()); ++i) { - QWidget* window = windows.at(i); + TQWidget* window = windows.at(i); if (window == active) { //leave out the active window which should be the top window continue; } @@ -281,11 +281,11 @@ void CMDIArea::emitWindowCaptionChanged() { /*! \fn CMDIArea::usableWindowsCount() */ -QPtrList<QWidget> CMDIArea::usableWindowList() { - QPtrList<QWidget> ret; +TQPtrList<TQWidget> CMDIArea::usableWindowList() { + TQPtrList<TQWidget> ret; - QWidgetList windows = windowList(); - for ( QWidget* w = windows.first(); w; w = windows.next() ) { + TQWidgetList windows = windowList(); + for ( TQWidget* w = windows.first(); w; w = windows.next() ) { if (w->isMinimized() || w->isHidden()) { //not usable for us continue; } @@ -296,15 +296,15 @@ QPtrList<QWidget> CMDIArea::usableWindowList() { return ret; } -bool CMDIArea::eventFilter( QObject *o, QEvent *e ) { +bool CMDIArea::eventFilter( TQObject *o, TQEvent *e ) { Q_ASSERT(o); Q_ASSERT(e); - QWidget* w = dynamic_cast<QWidget*>( o ); - bool ret = QWorkspace::eventFilter(o,e); + TQWidget* w = dynamic_cast<TQWidget*>( o ); + bool ret = TQWorkspace::eventFilter(o,e); #if QT_VERSION >= 0x030300 - if ( w && (e->type() == QEvent::WindowStateChange) ) { + if ( w && (e->type() == TQEvent::WindowStateChange) ) { if (o->inherits("CDisplayWindow") && ((w->windowState() & Qt::WindowMinimized) || w->isHidden())) { //window was minimized, trigger a tile/cascade update if necessary triggerWindowUpdate(); ret = false; @@ -317,8 +317,8 @@ bool CMDIArea::eventFilter( QObject *o, QEvent *e ) { } #else if (w && o->inherits("CDisplayWindow")){ - if ((e->type() == QEvent::ShowMinimized) || - (e->type() == QEvent::Hide)){ + if ((e->type() == TQEvent::ShowMinimized) || + (e->type() == TQEvent::Hide)){ triggerWindowUpdate(); ret = false; } @@ -342,13 +342,13 @@ void CMDIArea::triggerWindowUpdate() { if (isUpdatesEnabled() && usableWindowList().count() ) { switch (m_guiOption) { case autoTileVertical: - QTimer::singleShot(0, this, SLOT(myTileVertical())); + TQTimer::singleShot(0, this, TQT_SLOT(myTileVertical())); break; case autoTileHorizontal: - QTimer::singleShot(0, this, SLOT(myTileHorizontal())); + TQTimer::singleShot(0, this, TQT_SLOT(myTileHorizontal())); break; case autoCascade: - QTimer::singleShot(0, this, SLOT(myCascade())); + TQTimer::singleShot(0, this, TQT_SLOT(myCascade())); break; default: qDebug("CMDIArea::triggerWindowUpdate: no known m_guiType"); |