diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-16 09:55:29 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-16 09:55:29 -0600 |
commit | 708e0debf366cbe6a2c966a3127ba82a9fdc07e5 (patch) | |
tree | 07f554e6804d9f39c420329bee10497248886c41 /amarok/src/statusbar | |
parent | 2d3d921590b44ae1e8864104f3e36d022bec0308 (diff) | |
download | amarok-708e0debf366cbe6a2c966a3127ba82a9fdc07e5.tar.gz amarok-708e0debf366cbe6a2c966a3127ba82a9fdc07e5.zip |
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 2d3d921590b44ae1e8864104f3e36d022bec0308.
Diffstat (limited to 'amarok/src/statusbar')
-rw-r--r-- | amarok/src/statusbar/overlayWidget.cpp | 4 | ||||
-rw-r--r-- | amarok/src/statusbar/popupMessage.cpp | 14 | ||||
-rw-r--r-- | amarok/src/statusbar/popupMessage.h | 4 | ||||
-rw-r--r-- | amarok/src/statusbar/progressBar.cpp | 10 | ||||
-rw-r--r-- | amarok/src/statusbar/progressBar.h | 2 | ||||
-rw-r--r-- | amarok/src/statusbar/queueLabel.cpp | 32 | ||||
-rw-r--r-- | amarok/src/statusbar/selectLabel.h | 6 | ||||
-rw-r--r-- | amarok/src/statusbar/squeezedtextlabel.cpp | 16 | ||||
-rw-r--r-- | amarok/src/statusbar/squeezedtextlabel.h | 6 | ||||
-rw-r--r-- | amarok/src/statusbar/statusBarBase.cpp | 34 | ||||
-rw-r--r-- | amarok/src/statusbar/statusBarBase.h | 8 | ||||
-rw-r--r-- | amarok/src/statusbar/statusbar.cpp | 36 | ||||
-rw-r--r-- | amarok/src/statusbar/timeLabel.h | 2 | ||||
-rw-r--r-- | amarok/src/statusbar/toggleLabel.h | 2 |
14 files changed, 88 insertions, 88 deletions
diff --git a/amarok/src/statusbar/overlayWidget.cpp b/amarok/src/statusbar/overlayWidget.cpp index 7f120a53..3298056f 100644 --- a/amarok/src/statusbar/overlayWidget.cpp +++ b/amarok/src/statusbar/overlayWidget.cpp @@ -49,10 +49,10 @@ OverlayWidget::reposition() p.setY( -height() ); // Position in the toplevelwidget's coordinates - TQPoint pTopLevel = m_anchor->mapTo( topLevelWidget(), p ); + TQPoint pTopLevel = m_anchor->mapTo( tqtopLevelWidget(), p ); // Position in the widget's parentWidget coordinates - TQPoint pParent = parentWidget() ->mapFrom( topLevelWidget(), pTopLevel ); + TQPoint pParent = parentWidget() ->mapFrom( tqtopLevelWidget(), pTopLevel ); // keep it on the screen if( pParent.x() < 0 ) pParent.rx() = 0; diff --git a/amarok/src/statusbar/popupMessage.cpp b/amarok/src/statusbar/popupMessage.cpp index 00c24c1c..58855c14 100644 --- a/amarok/src/statusbar/popupMessage.cpp +++ b/amarok/src/statusbar/popupMessage.cpp @@ -62,9 +62,9 @@ PopupMessage::PopupMessage( TQWidget *parent, TQWidget *anchor, int timeout, con TQLabel *label; KActiveLabel *alabel; - m_layout = new TQVBoxLayout( this, 9 /*margin*/, 6 /*spacing*/ ); + m_tqlayout = new TQVBoxLayout( this, 9 /*margin*/, 6 /*spacing*/ ); - hbox = new TQHBoxLayout( m_layout, 12 ); + hbox = new TQHBoxLayout( m_tqlayout, 12 ); hbox->addWidget( m_countdownFrame = new TQFrame( this, "counterVisual" ) ); m_countdownFrame->setFixedWidth( fontMetrics().width( "X" ) ); @@ -76,12 +76,12 @@ PopupMessage::PopupMessage( TQWidget *parent, TQWidget *anchor, int timeout, con alabel = new KActiveLabel( this, "label" ); alabel->setTextFormat( TQt::RichText ); - alabel->setSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::Preferred ); + alabel->tqsetSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::Preferred ); alabel->setPalette( p ); hbox->add( alabel ); - hbox = new TQHBoxLayout( m_layout ); + hbox = new TQHBoxLayout( m_tqlayout ); hbox->addItem( new TQSpacerItem( 4, 4, TQSizePolicy::Expanding, TQSizePolicy::Preferred ) ); hbox->add( new KPushButton( KStdGuiItem::close(), this, "closeButton" ) ); @@ -91,7 +91,7 @@ PopupMessage::PopupMessage( TQWidget *parent, TQWidget *anchor, int timeout, con void PopupMessage::addWidget( TQWidget *widget ) { - m_layout->add( widget ); + m_tqlayout->add( widget ); adjustSize(); } @@ -191,7 +191,7 @@ void PopupMessage::countDown() TQFrame *&h = m_countdownFrame; if( m_counter < h->height() - 3 ) - TQPainter( h ).fillRect( 2, 2, h->width() - 4, m_counter, palette().active().highlight() ); + TQPainter( h ).fillRect( 2, 2, h->width() - 4, m_counter, tqpalette().active().highlight() ); if( !hasMouse() ) m_counter++; @@ -213,7 +213,7 @@ void PopupMessage::dissolveMask() { if( m_stage == 1 ) { - repaint( false ); + tqrepaint( false ); TQPainter maskPainter(&m_mask); m_mask.fill(TQt::black); diff --git a/amarok/src/statusbar/popupMessage.h b/amarok/src/statusbar/popupMessage.h index eec8125d..e23b7a39 100644 --- a/amarok/src/statusbar/popupMessage.h +++ b/amarok/src/statusbar/popupMessage.h @@ -28,7 +28,7 @@ #include "overlayWidget.h" #include <tqbitmap.h> -#include <layout.h> +#include <tqlayout.h> #include <tqpixmap.h> namespace KDE @@ -85,7 +85,7 @@ namespace KDE void slideMask(); private: - TQVBoxLayout *m_layout; + TQVBoxLayout *m_tqlayout; TQFrame *m_countdownFrame; TQWidget *m_anchor; TQWidget *m_parent; diff --git a/amarok/src/statusbar/progressBar.cpp b/amarok/src/statusbar/progressBar.cpp index 9b6d1415..2e69bf19 100644 --- a/amarok/src/statusbar/progressBar.cpp +++ b/amarok/src/statusbar/progressBar.cpp @@ -38,7 +38,7 @@ ProgressBar::ProgressBar( TQWidget *parent, TQLabel *label ) { DEBUG_FUNC_INFO - m_label->setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum ); + m_label->tqsetSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum ); m_abort = new KPushButton( KStdGuiItem::cancel(), parent ); m_abort->hide(); m_abort->setText( i18n("Abort") ); @@ -61,7 +61,7 @@ ProgressBar::setDescription( const TQString &text ) } ProgressBar& -ProgressBar::setStatus( const TQString &text ) +ProgressBar::settqStatus( const TQString &text ) { TQString s = m_description; s += " ["; @@ -100,11 +100,11 @@ ProgressBar::setDone() if( !m_done ) { m_done = true; m_abort->setEnabled( false ); - setStatus( i18n("Done") ); + settqStatus( i18n("Done") ); } else // then we we're aborted - setStatus( i18n("Aborted") ); + settqStatus( i18n("Aborted") ); } void @@ -114,7 +114,7 @@ ProgressBar::hide() m_done = true; m_abort->setEnabled( false ); - setStatus( i18n("Aborting...") ); + settqStatus( i18n("Aborting...") ); } } diff --git a/amarok/src/statusbar/progressBar.h b/amarok/src/statusbar/progressBar.h index fdb8ad85..a3f5f1b7 100644 --- a/amarok/src/statusbar/progressBar.h +++ b/amarok/src/statusbar/progressBar.h @@ -44,7 +44,7 @@ namespace KDE ProgressBar &setDescription( const TQString &text ); /** @param text eg. Scanning, Reading. The state of the operation */ - ProgressBar &setStatus( const TQString &text ); + ProgressBar &settqStatus( const TQString &text ); /** set the recipient slot for the abort button */ ProgressBar &setAbortSlot( TQObject *receiver, const char *slot ); diff --git a/amarok/src/statusbar/queueLabel.cpp b/amarok/src/statusbar/queueLabel.cpp index c25431f2..d78869a0 100644 --- a/amarok/src/statusbar/queueLabel.cpp +++ b/amarok/src/statusbar/queueLabel.cpp @@ -99,27 +99,27 @@ void QueueLabel::setNum( int num ) TQPixmap pix( w, h ); TQPainter p( &pix ); - p.setBrush( colorGroup().background() ); - p.setPen( colorGroup().background() ); + p.setBrush( tqcolorGroup().background() ); + p.setPen( tqcolorGroup().background() ); p.drawRect( pix.rect() ); - p.setBrush( colorGroup().highlight() ); - p.setPen( colorGroup().highlight().dark() ); + p.setBrush( tqcolorGroup().highlight() ); + p.setPen( tqcolorGroup().highlight().dark() ); if( w > h ) { p.drawPie( 0, 0, h, h, 90*16, 180*16 ); p.drawPie( w-1 -h, 0, h, h, -90*16, 180*16 ); p.drawLine( h/2-1, 0, w-1 - h/2, 0 ); p.drawLine( h/2-1, h-1, w-1 - h/2, h-1 ); - p.setPen( colorGroup().highlight() ); + p.setPen( tqcolorGroup().highlight() ); p.drawRect( h/2-1, 1, w - h + 1, h-2 ); } else p.drawEllipse( pix.rect() ); p.setFont( f ); - p.setPen( colorGroup().highlightedText() ); - p.setBrush( colorGroup().highlight().dark() ); + p.setPen( tqcolorGroup().highlightedText() ); + p.setBrush( tqcolorGroup().highlight().dark() ); p.drawText( pix.rect(), TQt::AlignCenter | TQt::SingleLine, text ); p.end(); @@ -175,7 +175,7 @@ void QueueLabel::mousePressEvent( TQMouseEvent* mouseEvent ) const uint count = queue.count(); if( length ) menu->insertTitle( i18n( "1 Queued Track (%1)", "%n Queued Tracks (%1)", count ) - .arg( MetaBundle::prettyLength( length, true ) ) ); + .tqarg( MetaBundle::prettyLength( length, true ) ) ); else menu->insertTitle( i18n( "1 Queued Track", "%n Queued Tracks", count ) ); Amarok::actionCollection()->action( "queue_manager" )->plug( menu ); @@ -191,7 +191,7 @@ void QueueLabel::mousePressEvent( TQMouseEvent* mouseEvent ) { for( uint n = kMin( i + MAX_TO_SHOW - 1, count ); i <= n; ++i, ++it ) menu->insertItem( - KStringHandler::rsqueeze( i18n( "%1. %2" ).arg( i ).arg( veryNiceTitle( *it ) ), 50 ), i ); + KStringHandler::rsqueeze( i18n( "%1. %2" ).tqarg( i ).tqarg( veryNiceTitle( *it ) ), 50 ), i ); if( i < count ) { @@ -205,8 +205,8 @@ void QueueLabel::mousePressEvent( TQMouseEvent* mouseEvent ) menu = menus.getFirst(); int mx, my; - const int mw = menu->sizeHint().width(), - mh = menu->sizeHint().height(), + const int mw = menu->tqsizeHint().width(), + mh = menu->tqsizeHint().height(), sy = mapFrom( Amarok::StatusBar::instance(), TQPoint( 0, 0 ) ).y(), sheight = Amarok::StatusBar::instance()->height(); const TQRect dr = TQApplication::desktop()->availableGeometry( this ); @@ -264,11 +264,11 @@ void QueueLabel::showToolTip() } if( length ) text += TQString("<center>%1</center>") - .arg( i18n( "1 track (%1)", "%n tracks (%1)", count ) - .arg( MetaBundle::prettyLength( length, true ) ) ); + .tqarg( i18n( "1 track (%1)", "%n tracks (%1)", count ) + .tqarg( MetaBundle::prettyLength( length, true ) ) ); } - text += i18n( "Next: %1" ).arg( veryNiceTitle( item, true /*bold*/ ) ); + text += i18n( "Next: %1" ).tqarg( veryNiceTitle( item, true /*bold*/ ) ); m_tooltip = new KDE::PopupMessage( parentWidget()->parentWidget(), this, 0 ); m_tooltip->setShowCloseButton( false ); @@ -296,9 +296,9 @@ TQString QueueLabel::veryNiceTitle( PlaylistItem* item, bool bold ) const const TQString artist = item->artist()->stripWhiteSpace(), title = item->title().stripWhiteSpace(); if( !artist.isEmpty() && !title.isEmpty() ) - return ( bold ? i18n( "<b>%1</b> by <b>%2</b>" ) : i18n( "%1 by %2" ) ).arg( title ).arg( artist ); + return ( bold ? i18n( "<b>%1</b> by <b>%2</b>" ) : i18n( "%1 by %2" ) ).tqarg( title ).tqarg( artist ); else - return TQString( "<b>%1</b>" ).arg( MetaBundle::prettyTitle( item->filename() ) ); + return TQString( "<b>%1</b>" ).tqarg( MetaBundle::prettyTitle( item->filename() ) ); } diff --git a/amarok/src/statusbar/selectLabel.h b/amarok/src/statusbar/selectLabel.h index 6e819a1c..596834a4 100644 --- a/amarok/src/statusbar/selectLabel.h +++ b/amarok/src/statusbar/selectLabel.h @@ -126,8 +126,8 @@ class SelectLabel : public TQLabel m_tooltipShowing = true; TQString tip = i18n("%1: %2") - .arg( m_action->text().remove( '&' ) ) - .arg( m_action->currentText().remove( '&' ) ); + .tqarg( m_action->text().remove( '&' ) ) + .tqarg( m_action->currentText().remove( '&' ) ); if( !isEnabled() ) tip += i18n(" <br> <i>Disabled</i>"); @@ -136,7 +136,7 @@ class SelectLabel : public TQLabel { KSelectAction *a = static_cast<KSelectAction*>( Amarok::actionCollection()->action( "favor_tracks" ) ); tip += TQString("<br><br>") + i18n("%1: %2") - .arg( a->text().remove( '&' ), a->currentText().remove( '&' ) ); + .tqarg( a->text().remove( '&' ), a->currentText().remove( '&' ) ); } tip += " "; diff --git a/amarok/src/statusbar/squeezedtextlabel.cpp b/amarok/src/statusbar/squeezedtextlabel.cpp index 4d6c842c..caca939a 100644 --- a/amarok/src/statusbar/squeezedtextlabel.cpp +++ b/amarok/src/statusbar/squeezedtextlabel.cpp @@ -28,30 +28,30 @@ namespace KDE { SqueezedTextLabel::SqueezedTextLabel( const TQString &text , TQWidget *parent, const char *name ) : TQLabel ( parent, name ) { - setSizePolicy(TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed )); + tqsetSizePolicy(TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed )); fullText = text; squeezeTextToLabel(); } SqueezedTextLabel::SqueezedTextLabel( TQWidget *parent, const char *name ) : TQLabel ( parent, name ) { - setSizePolicy(TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed )); + tqsetSizePolicy(TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed )); } void SqueezedTextLabel::resizeEvent( TQResizeEvent * ) { squeezeTextToLabel(); } -TQSize SqueezedTextLabel::minimumSizeHint() const +TQSize SqueezedTextLabel::tqminimumSizeHint() const { - TQSize sh = TQLabel::minimumSizeHint(); + TQSize sh = TQLabel::tqminimumSizeHint(); sh.setWidth(-1); return sh; } -TQSize SqueezedTextLabel::sizeHint() const +TQSize SqueezedTextLabel::tqsizeHint() const { - return TQSize(contentsRect().width(), TQLabel::sizeHint().height()); + return TQSize(contentsRect().width(), TQLabel::tqsizeHint().height()); } void SqueezedTextLabel::setText( const TQString &text ) { @@ -127,11 +127,11 @@ void SqueezedTextLabel::squeezeTextToLabel() } } -void SqueezedTextLabel::setAlignment( int alignment ) +void SqueezedTextLabel::tqsetAlignment( int tqalignment ) { // save fullText and restore it TQString tmpFull(fullText); - TQLabel::setAlignment(alignment); + TQLabel::tqsetAlignment(tqalignment); fullText = tmpFull; } diff --git a/amarok/src/statusbar/squeezedtextlabel.h b/amarok/src/statusbar/squeezedtextlabel.h index 121c18ab..a5cdbb0c 100644 --- a/amarok/src/statusbar/squeezedtextlabel.h +++ b/amarok/src/statusbar/squeezedtextlabel.h @@ -35,9 +35,9 @@ public: SqueezedTextLabel( TQWidget *parent, const char *name = 0 ); SqueezedTextLabel( const TQString &text, TQWidget *parent, const char *name = 0 ); - virtual TQSize minimumSizeHint() const; - virtual TQSize sizeHint() const; - virtual void setAlignment( int ); + virtual TQSize tqminimumSizeHint() const; + virtual TQSize tqsizeHint() const; + virtual void tqsetAlignment( int ); public slots: void setText( const TQString & ); diff --git a/amarok/src/statusbar/statusBarBase.cpp b/amarok/src/statusbar/statusBarBase.cpp index d13acd18..e2373936 100644 --- a/amarok/src/statusbar/statusBarBase.cpp +++ b/amarok/src/statusbar/statusBarBase.cpp @@ -37,11 +37,11 @@ #include <tqfile.h> //writeLogFile() #include <tqpushbutton.h> #include <tqlabel.h> -#include <layout.h> +#include <tqlayout.h> #include <tqmessagebox.h> #include <tqobjectlist.h> //polish() #include <tqpainter.h> -#include <palette.h> +#include <tqpalette.h> #include <tqprogressbar.h> #include <tqstyle.h> //class CloseButton #include <tqtimer.h> @@ -86,10 +86,10 @@ StatusBar::StatusBar( TQWidget *parent, const char *name ) : TQWidget( parent, name ) , m_logCounter( -1 ) { - TQBoxLayout *mainlayout = new TQHBoxLayout( this, 2, /*spacing*/5 ); + TQBoxLayout *maintqlayout = new TQHBoxLayout( this, 2, /*spacing*/5 ); //we need extra spacing due to the way we paint the surrounding boxes - TQBoxLayout *layout = new TQHBoxLayout( mainlayout, /*spacing*/5 ); + TQBoxLayout *tqlayout = new TQHBoxLayout( maintqlayout, /*spacing*/5 ); TQHBox *statusBarTextBox = new TQHBox( this, "statusBarTextBox" ); m_mainTextLabel = new KDE::SqueezedTextLabel( statusBarTextBox, "mainTextLabel" ); @@ -103,15 +103,15 @@ StatusBar::StatusBar( TQWidget *parent, const char *name ) mainProgressBarBox->setSpacing( 2 ); mainProgressBarBox->hide(); - layout->add( statusBarTextBox ); - layout->add( mainProgressBarBox ); - layout->setStretchFactor( statusBarTextBox, 3 ); - layout->setStretchFactor( mainProgressBarBox, 1 ); + tqlayout->add( statusBarTextBox ); + tqlayout->add( mainProgressBarBox ); + tqlayout->setStretchFactor( statusBarTextBox, 3 ); + tqlayout->setStretchFactor( mainProgressBarBox, 1 ); - m_otherWidgetLayout = new TQHBoxLayout( mainlayout, /*spacing*/5 ); + m_otherWidgetLayout = new TQHBoxLayout( maintqlayout, /*spacing*/5 ); - mainlayout->setStretchFactor( layout, 6 ); - mainlayout->setStretchFactor( m_otherWidgetLayout, 4 ); + maintqlayout->setStretchFactor( tqlayout, 6 ); + maintqlayout->setStretchFactor( m_otherWidgetLayout, 4 ); shortLongButton->setIconSet( SmallIconSet( "edit_add" ) ); TQToolTip::add( shortLongButton, i18n( "Show details" ) ); @@ -129,7 +129,7 @@ StatusBar::StatusBar( TQWidget *parent, const char *name ) m_popupProgress->setMargin( 1 ); m_popupProgress->setFrameStyle( TQFrame::Panel | TQFrame::Raised ); m_popupProgress->setFrameShape( TQFrame::StyledPanel ); - m_popupProgress->setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum ); + m_popupProgress->tqsetSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum ); (new TQGridLayout( m_popupProgress, 1 /*rows*/, 3 /*cols*/, 6, 3 ))->setAutoAdd( true ); } @@ -151,7 +151,7 @@ StatusBar::polish() TQObjectList *list = queryList( TQWIDGET_OBJECT_NAME_STRING, 0, false, false ); for( TQObject * o = list->first(); o; o = list->next() ) { - int _h = TQT_TQWIDGET( o ) ->minimumSizeHint().height(); + int _h = TQT_TQWIDGET( o ) ->tqminimumSizeHint().height(); if ( _h > h ) h = _h; @@ -185,7 +185,7 @@ StatusBar::paintEvent( TQPaintEvent* ) TQStyle::PE_StatusBarSection, &p, TQRect( w->x() - 1, w->y() - 1, w->width() + 2, w->height() + 2 ), - colorGroup(), + tqcolorGroup(), TQStyle::Style_Default, TQStyleOption( w ) ); } @@ -541,12 +541,12 @@ StatusBar::incrementProgressTotalSteps( const TQObject *owner, int inc ) } void -StatusBar::setProgressStatus( const TQObject *owner, const TQString &text ) +StatusBar::setProgresstqStatus( const TQObject *owner, const TQString &text ) { if ( !m_progressMap.contains( owner ) ) return ; - m_progressMap[owner]->setStatus( text ); + m_progressMap[owner]->settqStatus( text ); } void StatusBar::incrementProgress() @@ -669,7 +669,7 @@ StatusBar::writeLogFile( const TQString &text ) TQTextStream stream( &file ); stream.setEncoding( TQTextStream::UnicodeUTF8 ); - stream << "[" << KGlobal::locale()->formatDateTime( TQDateTime::currentDateTime() ) << "] " << text << endl; + stream << "[" << KGlobal::locale()->formatDateTime( TQDateTime::tqcurrentDateTime() ) << "] " << text << endl; } } //namespace KDE diff --git a/amarok/src/statusbar/statusBarBase.h b/amarok/src/statusbar/statusBarBase.h index 8bfe392d..e71f5071 100644 --- a/amarok/src/statusbar/statusBarBase.h +++ b/amarok/src/statusbar/statusBarBase.h @@ -52,7 +52,7 @@ namespace KDE * * statusbar->newProgressOperation( myObject ) * .setDescription( i18n("MyProgressOperation") ) - * .setStatus( i18n("Stage1") ) + * .settqStatus( i18n("Stage1") ) * .setAbortSlot( myObject, TQT_SLOT(abort()) ) * .setTotalSteps( 100 ); * @@ -93,7 +93,7 @@ namespace KDE * @return the progressBar so you can configure its parameters * @see setProgress( TQObject*, int ) * @see incrementProgress( TQObject* ) - * @see setProgressStatus( const TQObject*, const TQString& ) + * @see setProgresstqStatus( const TQObject*, const TQString& ) */ ProgressBar &newProgressOperation( TQObject *owner ); @@ -104,7 +104,7 @@ namespace KDE void incrementProgressTotalSteps( const TQObject *owner, int inc = 1 ); void incrementProgress( const TQObject *owner ); - void setProgressStatus( const TQObject *owner, const TQString &text ); + void setProgresstqStatus( const TQObject *owner, const TQString &text ); public slots: /** @@ -187,7 +187,7 @@ namespace KDE /** * You must parent the widget to the statusbar, we won't do that - * for you! The widget will be added to the right of the layout. + * for you! The widget will be added to the right of the tqlayout. * Currently you must add widgets before the statusbar gets shown * for the first time, because we are not currently very flexible. */ diff --git a/amarok/src/statusbar/statusbar.cpp b/amarok/src/statusbar/statusbar.cpp index b191aa23..6d2c1e37 100644 --- a/amarok/src/statusbar/statusbar.cpp +++ b/amarok/src/statusbar/statusbar.cpp @@ -32,7 +32,7 @@ #include <klocale.h> #include <tqhbox.h> -#include <layout.h> +#include <tqlayout.h> #include <tqtimer.h> // stuff that must be included last @@ -65,8 +65,8 @@ StatusBar::StatusBar( TQWidget *parent, const char *name ) // total songs count m_itemCountLabel = new TQLabel( this ); - m_itemCountLabel->setAlignment( TQt::AlignCenter ); - m_itemCountLabel->setSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Fixed ); + m_itemCountLabel->tqsetAlignment( TQt::AlignCenter ); + m_itemCountLabel->tqsetSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Fixed ); //positionBox TQWidget *positionBox = new TQWidget( this, "positionBox" ); @@ -85,12 +85,12 @@ StatusBar::StatusBar( TQWidget *parent, const char *name ) // TODO Both labels need tooltips (string freeze?) TQWidget *hbox = new TQWidget( this ); - TQBoxLayout *layout = new TQHBoxLayout( hbox, 0, 2 ); - layout->addSpacing( 3 ); - layout->addWidget( m_queueLabel = new QueueLabel( hbox ) ); - layout->addWidget( new SelectLabel( static_cast<Amarok::SelectAction*>( Amarok::action( "repeat" ) ), hbox ) ); - layout->addWidget( new SelectLabel( static_cast<Amarok::SelectAction*>( Amarok::action( "random_mode" ) ), hbox ) ); - layout->addSpacing( 3 ); + TQBoxLayout *tqlayout = new TQHBoxLayout( hbox, 0, 2 ); + tqlayout->addSpacing( 3 ); + tqlayout->addWidget( m_queueLabel = new QueueLabel( hbox ) ); + tqlayout->addWidget( new SelectLabel( static_cast<Amarok::SelectAction*>( Amarok::action( "repeat" ) ), hbox ) ); + tqlayout->addWidget( new SelectLabel( static_cast<Amarok::SelectAction*>( Amarok::action( "random_mode" ) ), hbox ) ); + tqlayout->addSpacing( 3 ); //TODO reimplement insertChild() instead addWidget( m_itemCountLabel ); @@ -183,16 +183,16 @@ StatusBar::engineNewMetaData( const MetaBundle &bundle, bool /*trackChanged*/ ) // ugly because of translation requirements if( !title.isEmpty() && !artist.isEmpty() && !album.isEmpty() ) title = i18n( "track by artist on album", "<b>%1</b> by <b>%2</b> on <b>%3</b>" ) - .arg( title, artist, album ); + .tqarg( title, artist, album ); else if( !title.isEmpty() && !artist.isEmpty() ) title = i18n( "track by artist", "<b>%1</b> by <b>%2</b>" ) - .arg( title, artist ); + .tqarg( title, artist ); else if( !album.isEmpty() ) // we try for pretty title as it may come out better title = i18n( "track on album", "<b>%1</b> on <b>%2</b>" ) - .arg( prettyTitle, album ); + .tqarg( prettyTitle, album ); else title = "<b>" + prettyTitle + "</b>"; @@ -206,7 +206,7 @@ StatusBar::engineNewMetaData( const MetaBundle &bundle, bool /*trackChanged*/ ) title += ')'; } - setMainText( i18n( "Playing: %1" ).arg( title ) ); + setMainText( i18n( "Playing: %1" ).tqarg( title ) ); m_slider->newBundle( bundle ); engineTrackLengthChanged( bundle.length() ); @@ -220,10 +220,10 @@ StatusBar::slotItemCountChanged( int newCount, int newLength, //total const bool hasSel = ( selCount > 1 ), hasVis = ( visCount != newCount ); TQString text = ( hasSel && hasVis ) ? i18n( "%1 selected of %2 visible tracks" ) - .arg( selCount ).arg( visCount ) + .tqarg( selCount ).tqarg( visCount ) : ( hasVis && newCount == 1 ) ? i18n( "0 visible of 1 track" ) - : ( hasVis ) ? i18n( "%1 visible of %2 tracks" ).arg( visCount).arg( newCount ) - : ( hasSel ) ? i18n( "%1 selected of %2 tracks" ).arg( selCount ).arg( newCount ) + : ( hasVis ) ? i18n( "%1 visible of %2 tracks" ).tqarg( visCount).tqarg( newCount ) + : ( hasSel ) ? i18n( "%1 selected of %2 tracks" ).tqarg( selCount ).tqarg( newCount ) : i18n( "1 track", "%n tracks", newCount ); int getValue = 0; @@ -238,11 +238,11 @@ StatusBar::slotItemCountChanged( int newCount, int newLength, //total getValue = newLength; if( getValue ) - m_itemCountLabel->setText( i18n( "X visible/selected tracks (time) ", "%1 (%2)" ).arg( text, MetaBundle::fuzzyTime( getValue ) ) ); + m_itemCountLabel->setText( i18n( "X visible/selected tracks (time) ", "%1 (%2)" ).tqarg( text, MetaBundle::fuzzyTime( getValue ) ) ); else m_itemCountLabel->setText( text ); - TQToolTip::add( m_itemCountLabel, i18n( "Play-time: %1" ).arg( MetaBundle::veryPrettyTime( getValue ) ) ); + TQToolTip::add( m_itemCountLabel, i18n( "Play-time: %1" ).tqarg( MetaBundle::veryPrettyTime( getValue ) ) ); } void diff --git a/amarok/src/statusbar/timeLabel.h b/amarok/src/statusbar/timeLabel.h index ec703b93..1acd0d3b 100644 --- a/amarok/src/statusbar/timeLabel.h +++ b/amarok/src/statusbar/timeLabel.h @@ -28,7 +28,7 @@ public: TimeLabel( TQWidget *parent ) : TQLabel( " 0:00:00 ", parent ) { setFont( KGlobalSettings::fixedFont() ); - setSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Fixed ); + tqsetSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Fixed ); } virtual void mousePressEvent( TQMouseEvent * ) diff --git a/amarok/src/statusbar/toggleLabel.h b/amarok/src/statusbar/toggleLabel.h index 0ff74243..f1ba257a 100644 --- a/amarok/src/statusbar/toggleLabel.h +++ b/amarok/src/statusbar/toggleLabel.h @@ -123,7 +123,7 @@ class ToggleLabel : public TQLabel m_tooltip->setShowCloseButton( false ); m_tooltip->setShowCounter( false ); m_tooltip->setMaskEffect( KDE::PopupMessage::Plain ); - m_tooltip->setText( tip.arg(m_action->text().remove('&') ) ); + m_tooltip->setText( tip.tqarg(m_action->text().remove('&') ) ); m_tooltip->setImage( path ); m_tooltip->reposition(); |