summaryrefslogtreecommitdiffstats
path: root/knights/tabbox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'knights/tabbox.cpp')
-rw-r--r--knights/tabbox.cpp74
1 files changed, 37 insertions, 37 deletions
diff --git a/knights/tabbox.cpp b/knights/tabbox.cpp
index bc8baed..bc103f4 100644
--- a/knights/tabbox.cpp
+++ b/knights/tabbox.cpp
@@ -20,22 +20,22 @@
#include "resource.h"
#include "accel.h"
#include <klocale.h>
-#include <qstyle.h>
-#include <qtabwidget.h>
+#include <tqstyle.h>
+#include <tqtabwidget.h>
-TabBox::TabBox( resource *rsrc ) : QVBox(0,"TabBox",Qt::WDestructiveClose)
+TabBox::TabBox( resource *rsrc ) : TQVBox(0,"TabBox",TQt::WDestructiveClose)
{
myResource = rsrc;
- setMargin( QApplication::style().defaultFrameWidth() );
+ setMargin( TQApplication::tqstyle().defaultFrameWidth() );
- myTabs = new QTabWidget( this, "myTabs" );
- myTabs->setTabShape( QTabWidget::Rounded );
- myTabs->setTabPosition( QTabWidget::Top );
+ myTabs = new TQTabWidget( this, "myTabs" );
+ myTabs->setTabShape( TQTabWidget::Rounded );
+ myTabs->setTabPosition( TQTabWidget::Top );
myAccel = new Accel( this, myResource->myAccel );
- connect( myTabs, SIGNAL( currentChanged( QWidget* ) ), this, SLOT( changeMyCaption( QWidget* ) ) );
- connect( this, SIGNAL( focus( const QChar& ) ), myResource->myAccel, SIGNAL( focus( const QChar& ) ) );
+ connect( myTabs, TQT_SIGNAL( currentChanged( TQWidget* ) ), this, TQT_SLOT( changeMyCaption( TQWidget* ) ) );
+ connect( this, TQT_SIGNAL( focus( const TQChar& ) ), myResource->myAccel, TQT_SIGNAL( focus( const TQChar& ) ) );
}
TabBox::~TabBox()
{
@@ -50,11 +50,11 @@ TabBox::~TabBox()
// TabBox::keyPressEvent
//
///////////////////////////////////////
-void TabBox::keyPressEvent( QKeyEvent *e )
+void TabBox::keyPressEvent( TQKeyEvent *e )
{
- QChar input;
+ TQChar input;
- if( ( e->state() | Qt::ShiftButton ) == Qt::ShiftButton )
+ if( ( e->state() | TQt::ShiftButton ) == TQt::ShiftButton )
{
input = e->text().at(0);
if( input.isLetterOrNumber() )
@@ -71,26 +71,26 @@ void TabBox::keyPressEvent( QKeyEvent *e )
// TabBox::addTab
//
///////////////////////////////////////
-void TabBox::addTab( QWidget *child, const QString &caption )
+void TabBox::addTab( TQWidget *child, const TQString &caption )
{
- if( QString( child->className() ) == "TabPage" )
+ if( TQString( child->className() ) == "TabPage" )
{
myTabs->addTab( child, caption );
myTabs->showPage( child );
changeMyCaption( child );
- connect( child, SIGNAL( newParent( TabBox* ) ), this, SIGNAL( newTabBox( TabBox* ) ) );
- connect( child, SIGNAL( requestDestruction() ), this, SLOT( destroyChild() ) );
+ connect( child, TQT_SIGNAL( newParent( TabBox* ) ), this, TQT_SIGNAL( newTabBox( TabBox* ) ) );
+ connect( child, TQT_SIGNAL( requestDestruction() ), this, TQT_SLOT( destroyChild() ) );
}
else
{
- TabPage *newPage = new TabPage( (QWidget*)this, child, myResource );
+ TabPage *newPage = new TabPage( (TQWidget*)this, child, myResource );
newPage->setCaption( caption );
myTabs->addTab( newPage, caption );
myTabs->showPage( newPage );
changeMyCaption( newPage );
- connect( newPage, SIGNAL( newParent( TabBox* ) ), this, SIGNAL( newTabBox( TabBox* ) ) );
- connect( newPage, SIGNAL( requestDestruction() ), this, SLOT( destroyChild() ) );
+ connect( newPage, TQT_SIGNAL( newParent( TabBox* ) ), this, TQT_SIGNAL( newTabBox( TabBox* ) ) );
+ connect( newPage, TQT_SIGNAL( requestDestruction() ), this, TQT_SLOT( destroyChild() ) );
}
}
///////////////////////////////////////
@@ -98,17 +98,17 @@ void TabBox::addTab( QWidget *child, const QString &caption )
// TabBox::removeTab
//
///////////////////////////////////////
-void TabBox::removeTab( QWidget *child, bool deleteChild )
+void TabBox::removeTab( TQWidget *child, bool deleteChild )
{
- if( QString( child->className() ) == "TabPage" )
+ if( TQString( child->className() ) == "TabPage" )
{
- emit saveTabGeometry( QString( ((TabPage*)child)->getChild()->className() ), size() );
+ emit saveTabGeometry( TQString( ((TabPage*)child)->getChild()->className() ), size() );
myTabs->removePage( child );
}
else
{
- emit saveTabGeometry( QString( child->className() ), size() );
- myTabs->removePage( child->parentWidget() );
+ emit saveTabGeometry( TQString( child->className() ), size() );
+ myTabs->removePage( child->tqparentWidget() );
}
/* Delete it if requested */
@@ -122,10 +122,10 @@ void TabBox::removeTab( QWidget *child, bool deleteChild )
// TabBox::showTab
//
///////////////////////////////////////
-void TabBox::showTab( QWidget *child )
+void TabBox::showTab( TQWidget *child )
{
if( isChild( child ) )
- myTabs->showPage( child->parentWidget() );
+ myTabs->showPage( child->tqparentWidget() );
}
///////////////////////////////////////
//
@@ -134,22 +134,22 @@ void TabBox::showTab( QWidget *child )
///////////////////////////////////////
void TabBox::destroyChild( void )
{
- QObject *child = ((QObject*)sender());
+ TQObject *child = ((TQObject*)sender());
/* Be careful... make sure we have a valid child calling us */
if( child == NULL )
return;
if( !child->isWidgetType() )
return;
- if( !isChild( ((QWidget*)child) ) )
+ if( !isChild( ((TQWidget*)child) ) )
return;
/* Nuke it */
- removeTab( ((QWidget*)child), TRUE );
+ removeTab( ((TQWidget*)child), TRUE );
if( count() == 0 )
{
- /* TabManager will be notified of the delete via QObject::destroyed(QObject*) */
+ /* TabManager will be notified of the delete via TQObject::destroyed(TQObject*) */
delete this;
}
}
@@ -158,9 +158,9 @@ void TabBox::destroyChild( void )
// TabBox::changeMyCaption
//
///////////////////////////////////////
-void TabBox::changeMyCaption( QWidget *child )
+void TabBox::changeMyCaption( TQWidget *child )
{
- setCaption( i18n("%1 - Knights").arg( myTabs->tabLabel( child ) ) );
+ setCaption( i18n("%1 - Knights").tqarg( myTabs->tabLabel( child ) ) );
}
///////////////////////////////////////
//
@@ -176,7 +176,7 @@ int TabBox::count( void )
// TabBox::isChild
//
///////////////////////////////////////
-bool TabBox::isChild( QWidget *child )
+bool TabBox::isChild( TQWidget *child )
{
for( int tmp=0; tmp < myTabs->count(); tmp++ )
{
@@ -192,17 +192,17 @@ bool TabBox::isChild( QWidget *child )
// TabBox::changeCaption
//
///////////////////////////////////////
-void TabBox::changeCaption( QWidget *child, const QString &caption )
+void TabBox::changeCaption( TQWidget *child, const TQString &caption )
{
- if( QString( child->className() ) == "TabPage" )
+ if( TQString( child->className() ) == "TabPage" )
{
((TabPage*)child)->setCaption( caption );
myTabs->setTabLabel( child, caption );
}
else if( isChild( child ) )
{
- ((TabPage*)child->parentWidget())->setCaption( caption );
- myTabs->setTabLabel( child->parentWidget(), caption );
+ ((TabPage*)child->tqparentWidget())->setCaption( caption );
+ myTabs->setTabLabel( child->tqparentWidget(), caption );
}
changeMyCaption( myTabs->currentPage() );
}