summaryrefslogtreecommitdiffstats
path: root/lib/compatibility/kmdi/qextmdi/ktabwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/compatibility/kmdi/qextmdi/ktabwidget.cpp')
-rw-r--r--lib/compatibility/kmdi/qextmdi/ktabwidget.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/lib/compatibility/kmdi/qextmdi/ktabwidget.cpp b/lib/compatibility/kmdi/qextmdi/ktabwidget.cpp
index 21ed3e82..eab93b48 100644
--- a/lib/compatibility/kmdi/qextmdi/ktabwidget.cpp
+++ b/lib/compatibility/kmdi/qextmdi/ktabwidget.cpp
@@ -48,8 +48,8 @@ public:
}
};
-KTabWidget::KTabWidget( TQWidget *parent, const char *name, WFlags f )
- : TQTabWidget( parent, name, f )
+KTabWidget::KTabWidget( TQWidget *tqparent, const char *name, WFlags f )
+ : TQTabWidget( tqparent, name, f )
{
d = new KTabWidgetPrivate;
setTabBar( new KTabBar(this, "tabbar") );
@@ -63,7 +63,7 @@ KTabWidget::KTabWidget( TQWidget *parent, const char *name, WFlags f )
connect(tabBar(), TQT_SIGNAL(receivedDropEvent( int, TQDropEvent * )), TQT_SLOT(receivedDropEvent( int, TQDropEvent * )));
connect(tabBar(), TQT_SIGNAL(moveTab( int, int )), TQT_SLOT(moveTab( int, int )));
connect(tabBar(), TQT_SIGNAL(closeRequest( int )), TQT_SLOT(closeRequest( int )));
-#ifndef QT_NO_WHEELEVENT
+#ifndef TQT_NO_WHEELEVENT
connect(tabBar(), TQT_SIGNAL(wheelDelta( int )), TQT_SLOT(wheelDelta( int )));
#endif
}
@@ -160,8 +160,8 @@ bool KTabWidget::tabCloseActivatePrevious() const
unsigned int KTabWidget::tabBarWidthForMaxChars( uint maxLength )
{
int hframe, overlap;
- hframe = tabBar()->style().pixelMetric( TQStyle::PM_TabBarTabHSpace, tabBar() );
- overlap = tabBar()->style().pixelMetric( TQStyle::PM_TabBarTabOverlap, tabBar() );
+ hframe = tabBar()->tqstyle().tqpixelMetric( TQStyle::PM_TabBarTabHSpace, tabBar() );
+ overlap = tabBar()->tqstyle().tqpixelMetric( TQStyle::PM_TabBarTabOverlap, tabBar() );
TQFontMetrics fm = tabBar()->fontMetrics();
int x = 0;
@@ -174,8 +174,8 @@ unsigned int KTabWidget::tabBarWidthForMaxChars( uint maxLength )
int iw = 0;
if ( tab->iconSet() )
iw = tab->iconSet()->pixmap( TQIconSet::Small, TQIconSet::Normal ).width() + 4;
- x += ( tabBar()->style().sizeFromContents( TQStyle::CT_TabBarTab, this,
- TQSize( QMAX( lw + hframe + iw, TQApplication::globalStrut().width() ), 0 ),
+ x += ( tabBar()->tqstyle().tqsizeFromContents( TQStyle::CT_TabBarTab, this,
+ TQSize( TQMAX( lw + hframe + iw, TQApplication::globalStrut().width() ), 0 ),
TQStyleOption( tab ) ) ).width();
}
return x;
@@ -211,7 +211,7 @@ TQString KTabWidget::label( int index ) const
if ( index >= 0 && index < count() )
return d->m_tabNames[ index ];
else
- return TQString::null;
+ return TQString();
}
else
return TQTabWidget::label( index );
@@ -222,7 +222,7 @@ TQString KTabWidget::tabLabel( TQWidget * w ) const
if ( d->m_automaticResizeTabs ) {
int index = indexOf( w );
if ( index == -1 )
- return TQString::null;
+ return TQString();
else
return d->m_tabNames[ index ];
}
@@ -250,11 +250,11 @@ void KTabWidget::resizeTabs( int changeTabIndex )
newMaxLength=d->m_maxLength;
uint lcw=0, rcw=0;
- int tabBarHeight = tabBar()->sizeHint().height();
+ int tabBarHeight = tabBar()->tqsizeHint().height();
if ( cornerWidget( TopLeft ) && cornerWidget( TopLeft )->isVisible() )
- lcw = QMAX( cornerWidget( TopLeft )->width(), tabBarHeight );
+ lcw = TQMAX( cornerWidget( TopLeft )->width(), tabBarHeight );
if ( cornerWidget( TopRight ) && cornerWidget( TopRight )->isVisible() )
- rcw = QMAX( cornerWidget( TopRight )->width(), tabBarHeight );
+ rcw = TQMAX( cornerWidget( TopRight )->width(), tabBarHeight );
uint maxTabBarWidth = width() - lcw - rcw;
@@ -284,7 +284,7 @@ void KTabWidget::updateTab( int index )
setTabToolTip( page( index ), title );
title = KStringHandler::rsqueeze( title, d->m_CurrentMaxLength ).leftJustify( d->m_minLength, ' ' );
- title.replace( '&', "&&" );
+ title.tqreplace( '&', "&&" );
if ( TQTabWidget::label( index ) != title )
TQTabWidget::setTabLabel( page( index ), title );
@@ -294,7 +294,7 @@ void KTabWidget::dragMoveEvent( TQDragMoveEvent *e )
{
if ( isEmptyTabbarSpace( e->pos() ) ) {
bool accept = false;
- // The receivers of the testCanDecode() signal has to adjust
+ // The tqreceivers of the testCanDecode() signal has to adjust
// 'accept' accordingly.
emit testCanDecode( e, accept);
e->accept( accept );
@@ -313,10 +313,10 @@ void KTabWidget::dropEvent( TQDropEvent *e )
TQTabWidget::dropEvent( e );
}
-#ifndef QT_NO_WHEELEVENT
+#ifndef TQT_NO_WHEELEVENT
void KTabWidget::wheelEvent( TQWheelEvent *e )
{
- if ( e->orientation() == Horizontal )
+ if ( e->orientation() ==Qt::Horizontal )
return;
if ( isEmptyTabbarSpace( e->pos() ) )
@@ -344,7 +344,7 @@ void KTabWidget::wheelDelta( int delta )
void KTabWidget::mouseDoubleClickEvent( TQMouseEvent *e )
{
- if( e->button() != LeftButton )
+ if( e->button() != Qt::LeftButton )
return;
if ( isEmptyTabbarSpace( e->pos() ) ) {
@@ -356,12 +356,12 @@ void KTabWidget::mouseDoubleClickEvent( TQMouseEvent *e )
void KTabWidget::mousePressEvent( TQMouseEvent *e )
{
- if ( e->button() == RightButton ) {
+ if ( e->button() == Qt::RightButton ) {
if ( isEmptyTabbarSpace( e->pos() ) ) {
emit( contextMenu( mapToGlobal( e->pos() ) ) );
return;
}
- } else if ( e->button() == MidButton ) {
+ } else if ( e->button() == Qt::MidButton ) {
if ( isEmptyTabbarSpace( e->pos() ) ) {
emit( mouseMiddleClick() );
return;
@@ -413,9 +413,9 @@ void KTabWidget::moveTab( int from, int to )
TQTabWidget::insertTab( w, t, to );
if ( d->m_automaticResizeTabs ) {
if ( to < 0 || to >= count() )
- d->m_tabNames.append( TQString::null );
+ d->m_tabNames.append( TQString() );
else
- d->m_tabNames.insert( d->m_tabNames.at( to ), TQString::null );
+ d->m_tabNames.insert( d->m_tabNames.at( to ), TQString() );
}
w = page( to );
@@ -445,7 +445,7 @@ void KTabWidget::removePage( TQWidget * w ) {
bool KTabWidget::isEmptyTabbarSpace( const TQPoint &p ) const
{
TQPoint point( p );
- TQSize size( tabBar()->sizeHint() );
+ TQSize size( tabBar()->tqsizeHint() );
if ( ( tabPosition()==Top && point.y()< size.height() ) || ( tabPosition()==Bottom && point.y()>(height()-size.height() ) ) ) {
TQWidget *rightcorner = cornerWidget( TopRight );
if ( rightcorner ) {