亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? statusbar.cpp

?? Amarok是一款在LINUX或其他類UNIX操作系統中運行的音頻播放器軟件。 經過兩年開發后
?? CPP
字號:
/*************************************************************************** *   Copyright (C) 2005 Max Howell <max.howell@methylblue.com>             * *             (C) 2004 Frederik Holljen <fh@ez.no>                        * *             (C) 2005 Gábor Lehel <illissius@gmail.com>                  * *                                                                         * *   This program is free software; you can redistribute it and/or modify  * *   it under the terms of the GNU General Public License as published by  * *   the Free Software Foundation; either version 2 of the License, or     * *   (at your option) any later version.                                   * *                                                                         * *   This program is distributed in the hope that it will be useful,       * *   but WITHOUT ANY WARRANTY; without even the implied warranty of        * *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         * *   GNU General Public License for more details.                          * *                                                                         * *   You should have received a copy of the GNU General Public License     * *   along with this program; if not, write to the                         * *   Free Software Foundation, Inc.,                                       * *   51 Franklin Steet, Fifth Floor, Boston, MA  02111-1307, USA.             * ***************************************************************************/#include "amarok.h"#include "amarokcore/amarokconfig.h"#include "debug.h"#include "enginecontroller.h"#include "queueLabel.h"#include "metabundle.h"#include "sliderwidget.h"#include "statusbar.h"#include <kiconloader.h>#include <klocale.h>#include <qhbox.h>#include <qlayout.h>#include <qtimer.h>// stuff that must be included last//#include "startupTips.h"#include "timeLabel.h"#include "toggleLabel.h"#include "toggleLabel.moc"#include "selectLabel.h"#include "selectLabel.moc"namespace Amarok {KAction *action( const char *name ) { return Amarok::actionCollection()->action( name ); }//TODO disable hide statusbar? or show when required? that sucks though.StatusBar* StatusBar::s_instance = 0;StatusBar::StatusBar( QWidget *parent, const char *name )        : KDE::StatusBar( parent, name )        , EngineObserver( EngineController::instance() )        , m_timeLength( 9 )        , m_pauseTimer( new QTimer( this ) ){    s_instance = this; //static member    // total songs count    m_itemCountLabel = new QLabel( this );    m_itemCountLabel->setAlignment( Qt::AlignCenter );    m_itemCountLabel->setSizePolicy( QSizePolicy::Maximum, QSizePolicy::Fixed );    //positionBox    QWidget *positionBox = new QWidget( this, "positionBox" );    QBoxLayout *box = new QHBoxLayout( positionBox, 1, 3 );    m_slider = new Amarok::PrettySlider( Qt::Horizontal, Amarok::PrettySlider::Normal,					 positionBox );    // the two time labels. m_timeLable is the left one,    // m_timeLabel2 the right one.    m_timeLabel = new TimeLabel( positionBox );    m_slider->setMinimumWidth( m_timeLabel->width() );    m_timeLabel2 = new TimeLabel( positionBox );    m_slider->setMinimumWidth( m_timeLabel2->width() );    // TODO Both labels need tooltips (string freeze?)    QWidget *hbox = new QWidget( this );    QBoxLayout *layout = new QHBoxLayout( 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 );    //TODO reimplement insertChild() instead    addWidget( m_itemCountLabel );    addWidget( hbox );    addWidget( positionBox );    box->addSpacing( 3 );    box->addWidget( m_timeLabel );    box->addWidget( m_slider );    box->addWidget( m_timeLabel2 );#ifdef Q_WS_MAC    // don't overlap the resize handle with the time display    box->addSpacing( 12 );#endif    if( !AmarokConfig::leftTimeDisplayEnabled() )        m_timeLabel->hide();     connect( m_slider, SIGNAL(sliderReleased( int )), EngineController::instance(), SLOT(seek( int )) );    connect( m_slider, SIGNAL(valueChanged( int )), SLOT(drawTimeDisplay( int )) );    // set us up the bomb    engineStateChanged( Engine::Empty );    //slotItemCountChanged( 0 );    // for great justice!    connect( m_pauseTimer, SIGNAL(timeout()), SLOT(slotPauseTimer()) );    slotItemCountChanged( 0, 0, 0, 0, 0, 0 );    //see statupTips.h    //KDE::showNextTip( this );    //session stuff    //setShown( AmarokConfig::showStatusBar() );}voidStatusBar::engineStateChanged( Engine::State state, Engine::State /*oldState*/ ){    m_pauseTimer->stop();    switch ( state ) {    case Engine::Empty:        m_slider->setEnabled( false );        m_slider->setMinValue( 0 ); //needed because setMaxValue() calls with bogus values can change minValue        m_slider->setMaxValue( 0 );	m_slider->newBundle( MetaBundle() ); // Set an empty bundle        m_timeLabel->setEnabled( false ); //must be done after the setValue() above, due to a signal connection        m_timeLabel2->setEnabled( false );        setMainText( QString::null );        break;    case Engine::Paused:        m_mainTextLabel->setText( i18n( "Amarok is paused" ) ); // display TEMPORARY message        m_pauseTimer->start( 300 );        break;    case Engine::Playing:        DEBUG_LINE_INFO        resetMainText(); // if we were paused, this is necessary        m_timeLabel->setEnabled( true );        m_timeLabel2->setEnabled( true );        break;    case Engine::Idle:        ; //just do nothing, idle is temporary and a limbo state    }}voidStatusBar::engineNewMetaData( const MetaBundle &bundle, bool /*trackChanged*/ ){    #define escapeHTML(s) QString(s).replace( "&", "&amp;" ).replace( "<", "&lt;" ).replace( ">", "&gt;" )    QString title       = escapeHTML( bundle.title() );    QString prettyTitle = escapeHTML( bundle.prettyTitle() );    QString artist      = escapeHTML( bundle.artist() );    QString album       = escapeHTML( bundle.album() );    QString length      = escapeHTML( bundle.prettyLength() );    #undef escapeHTML    if ( bundle.artist() == "Mike Oldfield" && bundle.title() == "Amarok" ) {        longMessage( i18n(                "<p>One of Mike Oldfield's best pieces of work, Amarok, inspired the name behind "                "the audio-player you are currently using. Thanks for choosing Amarok!</p>"                "<p align=right>Mark Kretschmann<br>Max Howell<br>Chris Muehlhaeuser<br>"                "The many other people who have helped make Amarok what it is</p>" ), KDE::StatusBar::Information );    }    // 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 );    else if( !title.isEmpty() && !artist.isEmpty() )        title = i18n( "track by artist", "<b>%1</b> by <b>%2</b>" )                .arg( 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 );    else        title = "<b>" + prettyTitle + "</b>";    if( title.isEmpty() )        title = i18n( "Unknown track" );    // don't show '-' or '?'    if( length.length() > 1 ) {        title += " (";        title += length;        title += ')';    }    setMainText( i18n( "Playing: %1" ).arg( title ) );    m_slider->newBundle( bundle );    engineTrackLengthChanged( bundle.length() );}voidStatusBar::slotItemCountChanged( int newCount, int newLength,  //total                                 int visCount, int visLength,  //visible                                 int selCount, int selLength ) //selected{    const bool hasSel = ( selCount > 1 ), hasVis = ( visCount != newCount );    QString text = ( hasSel && hasVis ) ? i18n( "%1 selected of %2 visible tracks" )                                          .arg( selCount ).arg( 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 )                 : i18n( "1 track", "%n tracks", newCount );    int getValue = 0;    if( hasSel )        getValue = selLength;    else if( hasVis )        getValue = visLength;    else        getValue = newLength;    if( getValue )        m_itemCountLabel->setText( i18n( "X visible/selected tracks (time) ", "%1 (%2)" ).arg( text, MetaBundle::fuzzyTime( getValue ) ) );    else        m_itemCountLabel->setText( text );    QToolTip::add( m_itemCountLabel,  i18n( "Play-time: %1" ).arg( MetaBundle::veryPrettyTime( getValue ) ) );}voidStatusBar::engineTrackPositionChanged( long position, bool /*userSeek*/ ){    m_slider->setValue( position );    if ( !m_slider->isEnabled() )        drawTimeDisplay( position );}voidStatusBar::engineTrackLengthChanged( long length ){    m_slider->setMinValue( 0 );    m_slider->setMaxValue( length * 1000 );    m_slider->setEnabled( length > 0 );    m_timeLength = MetaBundle::prettyTime( length ).length()+1; // account for - in remaining time}voidStatusBar::drawTimeDisplay( int ms )  //SLOT{    int seconds = ms / 1000;    int seconds2 = seconds; // for the second label.    const uint trackLength = EngineController::instance()->bundle().length();    if( AmarokConfig::leftTimeDisplayEnabled() )        m_timeLabel->show();    else        m_timeLabel->hide();    // when the left label shows the remaining time and it's not a stream    if( AmarokConfig::leftTimeDisplayRemaining() && trackLength > 0 )    {        seconds2 = seconds;        seconds = trackLength - seconds;    // when the left label shows the remaining time and it's a stream    } else if( AmarokConfig::leftTimeDisplayRemaining() && trackLength == 0 )    {        seconds2 = seconds;        seconds = 0; // for streams    // when the right label shows the remaining time and it's not a stream    } else if( !AmarokConfig::leftTimeDisplayRemaining() && trackLength > 0 )    {        seconds2 = trackLength - seconds;    // when the right label shows the remaining time and it's a stream    } else if( !AmarokConfig::leftTimeDisplayRemaining() && trackLength == 0 )    {        seconds2 = 0;    }    QString s1 = MetaBundle::prettyTime( seconds );    QString s2 = MetaBundle::prettyTime( seconds2 );    // when the left label shows the remaining time and it's not a stream    if( AmarokConfig::leftTimeDisplayRemaining() && trackLength > 0 ) {        s1.prepend( '-' );    // when the right label shows the remaining time and it's not a stream    } else if( !AmarokConfig::leftTimeDisplayRemaining() && trackLength > 0 )    {        s2.prepend( '-' );    }    while( (int)s1.length() < m_timeLength )        s1.prepend( ' ' );    while( (int)s2.length() < m_timeLength )        s2.prepend( ' ' );    s1 += ' ';    s2 += ' ';    m_timeLabel->setText( s1 );    m_timeLabel2->setText( s2 );    if( AmarokConfig::leftTimeDisplayRemaining() && trackLength == 0 )    {        m_timeLabel->setEnabled( false );        m_timeLabel2->setEnabled( true );    } else if( !AmarokConfig::leftTimeDisplayRemaining() && trackLength == 0 )    {        m_timeLabel->setEnabled( true );        m_timeLabel2->setEnabled( false );    } else    {        m_timeLabel->setEnabled( true );        m_timeLabel2->setEnabled( true );    }}voidStatusBar::slotPauseTimer()  //slot{    static uint counter = 0;    if ( counter == 0 )    {        m_timeLabel->erase();        m_timeLabel2->erase();    } else    {        m_timeLabel->update();        m_timeLabel2->update();    }    ++counter &= 3;}/////////////////////MessageQueue///////////////////MessageQueue::MessageQueue()    : m_queueMessages(true){}MessageQueue*MessageQueue::instance(){    static MessageQueue mq;    return &mq;}voidMessageQueue::addMessage(const QString& message){    if(m_queueMessages)        m_messages.push(message);    else        StatusBar::instance()->longMessage(message);}voidMessageQueue::sendMessages(){     m_queueMessages = false;     while(! m_messages.isEmpty())     {        StatusBar::instance()->longMessage(m_messages.pop());     }}} //namespace Amarok#include "statusbar.moc"

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91精品国产综合久久福利软件| 在线观看视频一区二区欧美日韩| 成人免费在线播放视频| 精品欧美久久久| 日韩一区二区三区视频在线观看| 欧美日本精品一区二区三区| 欧美无砖砖区免费| 欧美精选一区二区| 欧美一区二区精美| 宅男在线国产精品| 日韩精品最新网址| 久久先锋影音av鲁色资源网| 亚洲精品一区二区三区福利| www日韩大片| 国产欧美一二三区| 亚洲色图一区二区三区| 亚洲一二三区在线观看| 午夜av电影一区| 久久国产视频网| 日本午夜精品一区二区三区电影| 免费观看一级欧美片| 久久av中文字幕片| 从欧美一区二区三区| 97se狠狠狠综合亚洲狠狠| 色域天天综合网| 欧美乱妇15p| 国产校园另类小说区| 亚洲男人的天堂在线aⅴ视频| 亚洲精品欧美激情| 久久精品国产秦先生| 丁香桃色午夜亚洲一区二区三区| av动漫一区二区| 欧美性猛交xxxx黑人交| 日韩欧美123| 中文字幕 久热精品 视频在线 | 韩国一区二区在线观看| 豆国产96在线|亚洲| 欧美性一二三区| 国产亚洲欧洲一区高清在线观看| 亚洲天堂a在线| 奇米精品一区二区三区在线观看| 成人毛片老司机大片| 欧美日韩国产综合一区二区| 国产欧美精品国产国产专区| 天天综合色天天综合| 国产成人精品午夜视频免费| 3atv一区二区三区| 中文字幕一区不卡| 久久99精品久久久久久国产越南 | 欧美日韩美女一区二区| 久久久久久99久久久精品网站| 亚洲一区免费观看| 成人午夜视频在线观看| 欧美一区二区三区影视| 中文字幕一区二区不卡| 国产精品2024| 精品乱码亚洲一区二区不卡| 亚洲成a天堂v人片| 在线观看免费视频综合| 国产精品美女久久久久久久网站| 久久国产精品99久久人人澡| 欧美色欧美亚洲另类二区| 中文字幕av免费专区久久| 国产精品一二三| 日韩美女主播在线视频一区二区三区 | 亚洲国产一区在线观看| 91亚洲午夜精品久久久久久| 久久精品一区四区| 国产精品一级二级三级| 日韩欧美成人一区二区| 麻豆国产精品一区二区三区 | 中文字幕乱码久久午夜不卡| 久久国产尿小便嘘嘘尿| 日韩一区二区视频| 看国产成人h片视频| 5566中文字幕一区二区电影 | 精品国产乱码久久久久久久久| 视频一区国产视频| 日韩一区二区三区免费看| 天天色 色综合| 91.com视频| 日本午夜精品一区二区三区电影| 91精品国产aⅴ一区二区| 日日嗨av一区二区三区四区| 欧美一区二区在线看| 青椒成人免费视频| 精品国产免费久久| 国产麻豆一精品一av一免费| 久久精品无码一区二区三区| 国产大陆a不卡| 亚洲婷婷综合色高清在线| 91论坛在线播放| 亚洲电影第三页| 欧美一二三在线| 国产一区二区三区免费| 国产精品日日摸夜夜摸av| 91原创在线视频| 亚洲高清免费视频| 日韩写真欧美这视频| 国产不卡在线一区| 亚洲欧美另类久久久精品| 欧美日韩亚洲丝袜制服| 久久69国产一区二区蜜臀| 久久久久久久国产精品影院| 97国产一区二区| 日韩电影免费在线观看网站| 久久久噜噜噜久久人人看 | 欧美久久久久中文字幕| 国产老肥熟一区二区三区| 亚洲免费观看视频| 欧美电影免费观看高清完整版 | 一区二区三区精品在线| 3atv一区二区三区| 成人avav在线| 日本视频免费一区| 中文字幕免费一区| 91精品免费在线观看| k8久久久一区二区三区| 日本视频中文字幕一区二区三区| 国产精品乱码一区二三区小蝌蚪| 欧美日韩亚洲综合在线| 成人永久aaa| 视频一区二区三区在线| 亚洲欧美综合色| 欧美mv和日韩mv的网站| 在线免费视频一区二区| 国产精品一区2区| 日韩国产在线观看一区| 亚洲欧美日韩一区二区三区在线观看| 日韩一区二区不卡| 欧美制服丝袜第一页| 国产一区二区三区免费播放 | 中文字幕精品一区二区精品绿巨人 | 中文字幕一区二区三区精华液| 欧美一区二区久久久| 精品婷婷伊人一区三区三| 成人免费av资源| 国内精品在线播放| 奇米一区二区三区av| 亚洲一区在线观看网站| 中文字幕亚洲在| 国产亚洲欧美在线| 欧美电影免费观看完整版| 欧美精品tushy高清| 欧美午夜免费电影| 在线观看视频一区| 91影院在线观看| 97久久超碰国产精品电影| 成人手机电影网| 粉嫩一区二区三区性色av| 国产精品亚洲第一| 国产麻豆精品在线| 国产精品一区久久久久| 国产乱码精品1区2区3区| 国产米奇在线777精品观看| 美女诱惑一区二区| 捆绑紧缚一区二区三区视频| 久久国产精品第一页| 国产在线精品一区在线观看麻豆| 美国欧美日韩国产在线播放| 免费欧美日韩国产三级电影| 久久成人av少妇免费| 国产一区二区调教| 国产成人av福利| 国产成人一区在线| 丰满白嫩尤物一区二区| 91在线免费播放| 精品视频色一区| 日韩一级二级三级| 久久精品亚洲国产奇米99| 国产精品久久久久久户外露出| 亚洲欧洲av色图| 亚洲aⅴ怡春院| 韩国午夜理伦三级不卡影院| 成人aa视频在线观看| 欧美午夜影院一区| 欧美男生操女生| 久久久久久久久97黄色工厂| 国产精品美女久久久久久| 亚洲柠檬福利资源导航| 免费欧美在线视频| 成人黄色软件下载| 欧美视频日韩视频| 精品久久久久99| 亚洲欧美日韩国产成人精品影院| 亚洲午夜电影在线| 国产一区美女在线| 日本高清成人免费播放| 日韩精品专区在线| 国产精品国产三级国产aⅴ入口| 亚洲午夜激情网页| 国产激情精品久久久第一区二区| 91看片淫黄大片一级在线观看| 91精品麻豆日日躁夜夜躁| 中文字幕av不卡| 奇米影视7777精品一区二区| 95精品视频在线| 精品国产乱码久久久久久久| 亚洲精品五月天| 国产成人午夜电影网|