summaryrefslogtreecommitdiffstats
path: root/tdeui/ktabwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tdeui/ktabwidget.cpp')
-rw-r--r--tdeui/ktabwidget.cpp36
1 files changed, 22 insertions, 14 deletions
diff --git a/tdeui/ktabwidget.cpp b/tdeui/ktabwidget.cpp
index d6800ab9a..bcccc4c9a 100644
--- a/tdeui/ktabwidget.cpp
+++ b/tdeui/ktabwidget.cpp
@@ -58,16 +58,16 @@ KTabWidget::KTabWidget( TQWidget *parent, const char *name, WFlags f )
setHoverCloseButtonDelayed(false);
- connect(tabBar(), TQT_SIGNAL(contextMenu( int, const TQPoint & )), TQT_SLOT(contextMenu( int, const TQPoint & )));
- connect(tabBar(), TQT_SIGNAL(mouseDoubleClick( int )), TQT_SLOT(mouseDoubleClick( int )));
- connect(tabBar(), TQT_SIGNAL(mouseMiddleClick( int )), TQT_SLOT(mouseMiddleClick( int )));
- connect(tabBar(), TQT_SIGNAL(initiateDrag( int )), TQT_SLOT(initiateDrag( int )));
- connect(tabBar(), TQT_SIGNAL(testCanDecode(const TQDragMoveEvent *, bool & )), TQT_SIGNAL(testCanDecode(const TQDragMoveEvent *, bool & )));
- 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 )));
+ connect(tabBar(), TQ_SIGNAL(contextMenu( int, const TQPoint & )), TQ_SLOT(contextMenu( int, const TQPoint & )));
+ connect(tabBar(), TQ_SIGNAL(mouseDoubleClick( int )), TQ_SLOT(mouseDoubleClick( int )));
+ connect(tabBar(), TQ_SIGNAL(mouseMiddleClick( int )), TQ_SLOT(mouseMiddleClick( int )));
+ connect(tabBar(), TQ_SIGNAL(initiateDrag( int )), TQ_SLOT(initiateDrag( int )));
+ connect(tabBar(), TQ_SIGNAL(testCanDecode(const TQDragMoveEvent *, bool & )), TQ_SIGNAL(testCanDecode(const TQDragMoveEvent *, bool & )));
+ connect(tabBar(), TQ_SIGNAL(receivedDropEvent( int, TQDropEvent * )), TQ_SLOT(receivedDropEvent( int, TQDropEvent * )));
+ connect(tabBar(), TQ_SIGNAL(moveTab( int, int )), TQ_SLOT(moveTab( int, int )));
+ connect(tabBar(), TQ_SIGNAL(closeRequest( int )), TQ_SLOT(closeRequest( int )));
#ifndef TQT_NO_WHEELEVENT
- connect(tabBar(), TQT_SIGNAL(wheelDelta( int )), TQT_SLOT(wheelDelta( int )));
+ connect(tabBar(), TQ_SIGNAL(wheelDelta( int )), TQ_SLOT(wheelDelta( int )));
#endif
}
@@ -135,6 +135,14 @@ void KTabWidget::setTabColor( TQWidget *w, const TQColor& color )
}
}
+void KTabWidget::resetTabColor( TQWidget *w )
+{
+ TQTab *t = tabBar()->tabAt( indexOf( w ) );
+ if (t) {
+ static_cast<KTabBar*>(tabBar())->resetTabColor( t->identifier() );
+ }
+}
+
TQColor KTabWidget::tabColor( TQWidget *w ) const
{
TQTab *t = tabBar()->tabAt( indexOf( w ) );
@@ -182,7 +190,7 @@ 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().tqsizeFromContents( TQStyle::CT_TabBarTab, this,
+ x += ( tabBar()->style().sizeFromContents( TQStyle::CT_TabBarTab, this,
TQSize( TQMAX( lw + hframe + iw, TQApplication::globalStrut().width() ), 0 ),
TQStyleOption( tab ) ) ).width();
}
@@ -328,7 +336,7 @@ void KTabWidget::dropEvent( TQDropEvent *e )
#ifndef TQT_NO_WHEELEVENT
void KTabWidget::wheelEvent( TQWheelEvent *e )
{
- if ( e->orientation() == Qt::Horizontal )
+ if ( e->orientation() == TQt::Horizontal )
return;
if ( isEmptyTabbarSpace( e->pos() ) )
@@ -357,7 +365,7 @@ void KTabWidget::wheelDelta(int delta)
void KTabWidget::mouseDoubleClickEvent( TQMouseEvent *e )
{
- if( e->button() != Qt::LeftButton )
+ if( e->button() != TQt::LeftButton )
return;
if ( isEmptyTabbarSpace( e->pos() ) ) {
@@ -369,12 +377,12 @@ void KTabWidget::mouseDoubleClickEvent( TQMouseEvent *e )
void KTabWidget::mousePressEvent( TQMouseEvent *e )
{
- if ( e->button() == Qt::RightButton ) {
+ if ( e->button() == TQt::RightButton ) {
if ( isEmptyTabbarSpace( e->pos() ) ) {
emit( contextMenu( mapToGlobal( e->pos() ) ) );
return;
}
- } else if ( e->button() == Qt::MidButton ) {
+ } else if ( e->button() == TQt::MidButton ) {
if ( isEmptyTabbarSpace( e->pos() ) ) {
emit( mouseMiddleClick() );
return;