summaryrefslogtreecommitdiffstats
path: root/src/kchmviewwindowmgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/kchmviewwindowmgr.cpp')
-rw-r--r--src/kchmviewwindowmgr.cpp66
1 files changed, 33 insertions, 33 deletions
diff --git a/src/kchmviewwindowmgr.cpp b/src/kchmviewwindowmgr.cpp
index dd6a984..7c40b94 100644
--- a/src/kchmviewwindowmgr.cpp
+++ b/src/kchmviewwindowmgr.cpp
@@ -19,7 +19,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#include <qaccel.h>
+#include <tqaccel.h>
#include "kchmconfig.h"
#include "kchmmainwindow.h"
@@ -34,22 +34,22 @@
#endif
-KCHMViewWindowMgr::KCHMViewWindowMgr( QWidget *parent )
- : QTabWidget( parent ) //QTabWidget
+KCHMViewWindowMgr::KCHMViewWindowMgr( TQWidget *tqparent )
+ : TQTabWidget( tqparent ) //TQTabWidget
{
m_MenuWindow = 0;
// on current tab changed
- connect( this, SIGNAL( currentChanged(QWidget *) ), this, SLOT( onTabChanged(QWidget *) ) );
+ connect( this, TQT_SIGNAL( currentChanged(TQWidget *) ), this, TQT_SLOT( onTabChanged(TQWidget *) ) );
// Create an iconset for the button
- QIconSet iset( *gIconStorage.getCloseWindowIcon() );
+ TQIconSet iset( *gIconStorage.getCloseWindowIcon() );
// Create a pushbutton
- m_closeButton = new QPushButton( iset, QString::null, this );
+ m_closeButton = new TQPushButton( iset, TQString(), this );
m_closeButton->setFlat( true );
m_closeButton->setEnabled( false );
- connect( m_closeButton, SIGNAL( clicked() ), this, SLOT( closeCurrentWindow() ) );
+ connect( m_closeButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( closeCurrentWindow() ) );
setCornerWidget( m_closeButton, TopRight);
}
@@ -58,20 +58,20 @@ KCHMViewWindowMgr::~KCHMViewWindowMgr( )
{
}
-void KCHMViewWindowMgr::createMenu( KCHMMainWindow * parent )
+void KCHMViewWindowMgr::createMenu( KCHMMainWindow * tqparent )
{
// Create the approptiate menu entries in 'View' main menu
- m_MenuWindow = new KQPopupMenu( parent );
- parent->menuBar()->insertItem( i18n( "&Window"), m_MenuWindow );
+ m_MenuWindow = new KTQPopupMenu( tqparent );
+ tqparent->menuBar()->insertItem( i18n( "&Window"), m_MenuWindow );
- m_menuIdClose = m_MenuWindow->insertItem( i18n( "&Close"), this, SLOT( closeCurrentWindow()), CTRL+Key_W );
+ m_menuIdClose = m_MenuWindow->insertItem( i18n( "&Close"), this, TQT_SLOT( closeCurrentWindow()), CTRL+Key_W );
m_MenuWindow->insertSeparator();
- //connect( m_MenuWindow, SIGNAL( activated(int) ), this, SLOT ( onCloseWindow(int) ));
- connect( m_MenuWindow, SIGNAL( activated(int) ), this, SLOT ( onActiveWindow(int) ));
+ //connect( m_MenuWindow, TQT_SIGNAL( activated(int) ), this, TQT_SLOT ( onCloseWindow(int) ));
+ connect( m_MenuWindow, TQT_SIGNAL( activated(int) ), this, TQT_SLOT ( onActiveWindow(int) ));
}
-void KCHMViewWindowMgr::invalidate()
+void KCHMViewWindowMgr::tqinvalidate()
{
deleteAllWindows();
addNewTab( true );
@@ -80,10 +80,10 @@ void KCHMViewWindowMgr::invalidate()
KCHMViewWindow * KCHMViewWindowMgr::current()
{
- QWidget * w = currentPage();
+ TQWidget * w = currentPage();
WindowsIterator it;
- if ( !w || (it = m_Windows.find( w )) == m_Windows.end() )
+ if ( !w || (it = m_Windows.tqfind( w )) == m_Windows.end() )
qFatal( "KCHMViewWindowMgr::current called without any windows!" );
return it.data().window;
@@ -94,13 +94,13 @@ KCHMViewWindow * KCHMViewWindowMgr::addNewTab( bool set_active )
KCHMViewWindow * viewvnd;
#if defined (USE_KDE)
- if ( !appConfig.m_kdeUseQTextBrowser )
+ if ( !appConfig.m_kdeUseTQTextBrowser )
viewvnd = new KCHMViewWindow_KHTMLPart( this );
else
#endif
viewvnd = new KCHMViewWindow_QTextBrowser( this );
- QWidget * widget = viewvnd->getQWidget();
+ TQWidget * widget = viewvnd->getTQWidget();
m_Windows[widget].window = viewvnd;
m_Windows[widget].menuitem = 0;
m_Windows[widget].widget = widget;
@@ -114,7 +114,7 @@ KCHMViewWindow * KCHMViewWindowMgr::addNewTab( bool set_active )
showPage( widget );
// Handle clicking on link in browser window
- connect( viewvnd->getQObject(), SIGNAL( signalLinkClicked (const QString &, bool &) ), ::mainWindow, SLOT( slotLinkClicked(const QString &, bool &) ) );
+ connect( viewvnd->getTQObject(), TQT_SIGNAL( signalLinkClicked (const TQString &, bool &) ), ::mainWindow, TQT_SLOT( slotLinkClicked(const TQString &, bool &) ) );
return viewvnd;
}
@@ -128,18 +128,18 @@ void KCHMViewWindowMgr::deleteAllWindows( )
void KCHMViewWindowMgr::setTabName( KCHMViewWindow * window )
{
- WindowsIterator it = m_Windows.find( window->getQWidget() );
+ WindowsIterator it = m_Windows.tqfind( window->getTQWidget() );
if ( it == m_Windows.end() )
qFatal( "KCHMViewWindowMgr::setTabName called with unknown window!" );
- QString title = window->getTitle();
+ TQString title = window->getTitle();
// Trim too long string
if ( title.length() > 25 )
title = title.left( 22 ) + "...";
- setTabLabel( window->getQWidget(), title );
+ setTabLabel( window->getTQWidget(), title );
if ( it.data().menuitem == 0 )
{
@@ -154,14 +154,14 @@ void KCHMViewWindowMgr::setTabName( KCHMViewWindow * window )
else
menuid = m_Windows.size();
- QString menutitle = "&" + QString::number(menuid) + " " + title;
+ TQString menutitle = "&" + TQString::number(menuid) + " " + title;
it.data().menuitem = menuid;
m_MenuWindow->insertItem(menutitle, menuid);
updateTabAccel();
}
else
{
- QString menutitle = "&" + QString::number(it.data().menuitem) + " " + title;
+ TQString menutitle = "&" + TQString::number(it.data().menuitem) + " " + title;
m_MenuWindow->changeItem( it.data().menuitem, menutitle );
}
@@ -174,10 +174,10 @@ void KCHMViewWindowMgr::closeCurrentWindow( )
if ( m_Windows.size() == 1 )
return;
- QWidget * w = currentPage();
+ TQWidget * w = currentPage();
WindowsIterator it;
- if ( !w || (it = m_Windows.find( w )) == m_Windows.end() )
+ if ( !w || (it = m_Windows.tqfind( w )) == m_Windows.end() )
qFatal( "KCHMViewWindowMgr::closeCurrentWindow called without any windows!" );
closeWindow( it.data() );
@@ -185,7 +185,7 @@ void KCHMViewWindowMgr::closeCurrentWindow( )
void KCHMViewWindowMgr::closeWindow( const tab_window_t & tab )
{
- WindowsIterator it = m_Windows.find( tab.widget );
+ WindowsIterator it = m_Windows.tqfind( tab.widget );
if ( it == m_Windows.end() )
qFatal( "KCHMViewWindowMgr::closeWindow called with unknown widget!" );
@@ -224,7 +224,7 @@ void KCHMViewWindowMgr::onActiveWindow(int id)
if ( it.data().menuitem != id )
continue;
- QWidget *widget = it.data().widget;
+ TQWidget *widget = it.data().widget;
showPage(widget);
break;
}
@@ -252,8 +252,8 @@ void KCHMViewWindowMgr::saveSettings( KCHMSettings::viewindow_saved_settings_t &
for ( int i = 0; i < count(); i++ )
{
- QWidget * p = page( i );
- WindowsIterator it = m_Windows.find( p );
+ TQWidget * p = page( i );
+ WindowsIterator it = m_Windows.tqfind( p );
if ( it == m_Windows.end() )
qFatal( "KCHMViewWindowMgr::saveSettings: could not find widget!" );
@@ -272,9 +272,9 @@ void KCHMViewWindowMgr::updateCloseButtons( )
m_closeButton->setEnabled( m_Windows.size() > 1 );
}
-void KCHMViewWindowMgr::onTabChanged( QWidget * newtab )
+void KCHMViewWindowMgr::onTabChanged( TQWidget * newtab )
{
- WindowsIterator it = m_Windows.find( newtab );
+ WindowsIterator it = m_Windows.tqfind( newtab );
if ( it == m_Windows.end() )
qFatal( "KCHMViewWindowMgr::onTabChanged called with unknown widget!" );
@@ -304,7 +304,7 @@ void KCHMViewWindowMgr::updateTabAccel()
}
}
-QKeySequence KCHMViewWindowMgr::key(int i)
+TQKeySequence KCHMViewWindowMgr::key(int i)
{
switch (i)
{