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

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

?? playerwindow.cpp

?? Amarok是一款在LINUX或其他類UNIX操作系統中運行的音頻播放器軟件。 經過兩年開發后
?? CPP
?? 第 1 頁 / 共 3 頁
字號:
/***************************************************************************                     playerwidget.cpp  -  description                        -------------------begin                : Mit Nov 20 2002copyright            : (C) 2002 by Mark Kretschmannemail                : markey@web.de***************************************************************************//*************************************************************************** *                                                                         * *   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.                                   * *                                                                         * ***************************************************************************/#include "actionclasses.h"#include "amarok.h"#include "amarokconfig.h"#include "analyzerbase.h"#include "debug.h"#include "enginecontroller.h"#include "metabundle.h"      //setScroll()#include "playerwindow.h"#include "sliderwidget.h"#include "tracktooltip.h"    //setScroll()#include <qaccel.h>          //our quit shortcut in the ctor#include <qevent.h>          //various events#include <qfont.h>#include <qhbox.h>#include <qlabel.h>#include <qpainter.h>#include <qpixmap.h>#include <qstringlist.h>#include <qtimer.h>#include <qtooltip.h>        //analyzer tooltip#include <kapplication.h>#include <klocale.h>#include <kmessagebox.h>#include <kpushbutton.h>#include <kstandarddirs.h>#include <kurldrag.h>#include <kwin.h>            //eventFilter()//simple function for fetching amarok imagesnamespace Amarok{    //TODO remove these, they suck, do a generic getImage    QPixmap getPNG( const QString &filename )    {        QString file = !filename.endsWith( ".png", false ) ? "amarok/images/%1.png" : "amarok/images/%1";        return QPixmap( locate( "data", file.arg( filename ) ), "PNG" );    }    QPixmap getJPG( const QString &filename )    {        QString file = !filename.endsWith( ".jpg", false ) ? "amarok/images/%1.jpg" : "amarok/images/%1";        return QPixmap( locate( "data", QString( "amarok/images/%1.jpg" ).arg( filename ) ), "JPEG" );    }}using Amarok::getPNG;//fairly pointless template which was designed to make the ctor clearer,//but probably achieves the opposite. Still, the code is neater..template<class W> static inline W*createWidget( const QRect &r, QWidget *parent, const char *name = 0, Qt::WFlags f = 0 ){    W *w = new W( parent, name, f );    w->setGeometry( r );    return w;}PlayerWidget::PlayerWidget( QWidget *parent, const char *name, bool enablePlaylist )    : QWidget( parent, name, Qt::WType_TopLevel )    , EngineObserver( EngineController::instance() )    , m_minimalView( false )    , m_pAnimTimer( new QTimer( this ) )    , m_scrollBuffer( 291, 16 )    , m_plusPixmap( getPNG( "time_plus" ) )    , m_minusPixmap( getPNG( "time_minus" ) )    , m_pAnalyzer( 0 ){    //the createWidget template function is used here    //createWidget just creates a widget which has it's geometry set too    // Sets caption and icon correctly (needed e.g. for GNOME)    kapp->setTopWidget( this );    parent->installEventFilter( this ); //for hidePLaylistWithMainWindow mode    //if this is the first time we have ever been run we let KWin place us    if ( AmarokConfig::playerPos() != QPoint(-1,-1) )        move( AmarokConfig::playerPos() );    setModifiedPalette();    setFixedSize( 311, 140 );    setCaption( "Amarok" );    setAcceptDrops( true );    //another quit shortcut because the other window has all the accels    QAccel *accel = new QAccel( this );    accel->insertItem( CTRL + Key_Q );    connect( accel, SIGNAL( activated( int ) ), kapp, SLOT( quit() ) );    QFont font;    font.setBold( true );    font.setPixelSize( 10 );    setFont( font );    { //<NavButtons>        //NOTE we use a layout for the buttons so resizing will be possible        m_pFrameButtons = createWidget<QHBox>( QRect(0, 118, 311, 22), this );        KActionCollection *ac =Amarok::actionCollection();        //FIXME change the names of the icons to reflect kde names so we can fall back to them if necessary                         new NavButton( m_pFrameButtons, "prev", ac->action( "prev" ) );        m_pButtonPlay  = new NavButton( m_pFrameButtons, "play", ac->action( "play" ) );        m_pButtonPause = new NavButton( m_pFrameButtons, "pause", ac->action( "pause" ) );                         new NavButton( m_pFrameButtons, "stop", ac->action( "stop" ) );                         new NavButton( m_pFrameButtons, "next", ac->action( "next" ) );        KPushButton *switchView = new KPushButton( KGuiItem( "", "mini_dock" ), m_pFrameButtons );        switchView->setSizePolicy( QSizePolicy::Maximum, QSizePolicy::Preferred ); // too big!        switchView->setFocusPolicy( QWidget::NoFocus );        connect( switchView, SIGNAL( clicked() ), SLOT( toggleView() ) );        m_pButtonPlay->setToggleButton( true );        m_pButtonPause->setToggleButton( true );    } //</NavButtons>    { //<Sliders>        m_pSlider    = new Amarok::PrettySlider( Qt::Horizontal,                                                 Amarok::PrettySlider::Pretty, this );        m_pVolSlider = new Amarok::PrettySlider( Qt::Vertical,                                                 Amarok::PrettySlider::Pretty, this,                                                 Amarok::VOLUME_MAX );        m_pSlider->setGeometry( 4,103, 303, 12 );        m_pVolSlider->setGeometry( 294,18, 12,79 );        m_pVolSlider->setValue( AmarokConfig::masterVolume() );        EngineController* const ec = EngineController::instance();        connect( m_pSlider, SIGNAL(sliderReleased( int )), ec, SLOT(seek( int )) );        connect( m_pSlider, SIGNAL(valueChanged( int )), SLOT(timeDisplay( int )) );        connect( m_pVolSlider, SIGNAL(sliderMoved( int )), ec, SLOT(setVolume( int )) );        connect( m_pVolSlider, SIGNAL(sliderReleased( int )), ec, SLOT(setVolume( int )) );    } //<Sliders>    { //<Scroller>        font.setPixelSize( 11 );        const int fontHeight = QFontMetrics( font ).height(); //the real height is more like 13px        m_pScrollFrame = createWidget<QFrame>( QRect(6,18, 285,fontHeight), this );        m_pScrollFrame->setFont( font );    { //</Scroller>    } //<TimeLabel>        font.setPixelSize( 18 );        m_pTimeLabel = createWidget<QLabel>( QRect(16,36, 9*12+2,18), this, 0, Qt::WNoAutoErase );        m_pTimeLabel->setFont( font );        m_timeBuffer.resize( m_pTimeLabel->size() );        m_timeBuffer.fill( backgroundColor() );    } //<TimeLabel>    m_pButtonEq = new IconButton( this, "eq", this, SLOT(slotShowEqualizer( bool )) );    m_pButtonEq->setGeometry( 34,85, 28,13 );    //TODO set isOn()    m_pPlaylistButton = new IconButton( this, "pl", SIGNAL(playlistToggled( bool )) );    m_pPlaylistButton->setGeometry( 5,85, 28,13 );    m_pPlaylistButton->setOn( parent->isShown() || enablePlaylist );    m_pDescription = createWidget<QLabel>( QRect(4,6, 250,10), this );    m_pTimeSign    = createWidget<QLabel>( QRect(6,40, 10,10), this, 0, Qt::WRepaintNoErase );    m_pVolSign     = createWidget<QLabel>( QRect(295,7, 9,8),  this );    m_pDescription->setText( i18n( "Artist-Title|Album|Length" ) );    m_pVolSign    ->setPixmap( getPNG( "vol_speaker" ) );    //do before we set the widget's state    applySettings();    //set interface to correct state    engineStateChanged( EngineController::engine()->state() );    createAnalyzer( 0 );    //so we get circulation events to x11Event()    //XSelectInput( x11Display(), winId(), StructureNotifyMask );    //Yagami mode!    //KWin::setState( winId(), NET::KeepBelow | NET::SkipTaskbar | NET::SkipPager );    //KWin::setType( winId(), NET::Override );    //KWin::setOnAllDesktops( winId(), true );    connect( m_pAnimTimer, SIGNAL( timeout() ), SLOT( drawScroll() ) );    TrackToolTip::instance()->addToWidget( m_pScrollFrame );}PlayerWidget::~PlayerWidget(){    AmarokConfig::setPlayerPos( pos() );    AmarokConfig::setPlaylistWindowEnabled( m_pPlaylistButton->isOn() );    TrackToolTip::instance()->removeFromWidget( m_pScrollFrame );}// METHODS ----------------------------------------------------------------void PlayerWidget::setScroll( const QStringList &list ){    QString text;    QStringList list2( list );    QStringList::Iterator end( list2.end() );    for( QStringList::Iterator it = list2.begin(); it != end; )    {        if( !(*it).isEmpty() )        {            text.append( *it );            ++it;        }        else it = list2.remove( it );    }    //FIXME empty QString would crash due to NULL Pixmaps    if( text.isEmpty() ) text = i18n( "Please report this message to amarok@kde.org, thanks!" );    QFont font( m_pScrollFrame->font() );    QFontMetrics fm( font );    const uint separatorWidth = 21;    const uint baseline = font.pixelSize(); //the font actually extends below its pixelHeight    const uint separatorYPos = baseline - fm.boundingRect( "x" ).height() + 1;    m_scrollTextPixmap.resize( fm.width( text ) + list2.count() * separatorWidth, m_pScrollFrame->height() );    m_scrollTextPixmap.fill( backgroundColor() );    QPainter p( &m_scrollTextPixmap );    p.setPen( foregroundColor() );    p.setFont( font );    uint x = 0;    for( QStringList::ConstIterator it = list2.constBegin();         it != list2.constEnd();         ++it )    {        p.drawText( x, baseline, *it );        x += fm.width( *it );        p.fillRect( x + 8, separatorYPos, 4, 4, Amarok::ColorScheme::Foreground );        x += separatorWidth;    }    drawScroll();}void PlayerWidget::drawScroll(){    static uint phase = 0;    QPixmap* const buffer = &m_scrollBuffer;    QPixmap* const scroll = &m_scrollTextPixmap;    const uint topMargin  = 0; //moved margins into widget placement    const uint leftMargin = 0; //as this makes it easier to fiddle    const uint w = m_scrollTextPixmap.width();    const uint h = m_scrollTextPixmap.height();    phase += SCROLL_RATE;    if( phase >= w ) phase = 0;    int subs = 0;    int dx = leftMargin;    uint phase2 = phase;    while( dx < m_pScrollFrame->width() )    {        subs = -m_pScrollFrame->width() + topMargin;        subs += dx + ( w - phase2 );        if( subs < 0 ) subs = 0;        bitBlt( buffer, dx, topMargin, scroll, phase2, 0, w - phase2 - subs, h, Qt::CopyROP );        dx     += w - phase2;        phase2 += w - phase2;        if( phase2 >= w ) phase2 = 0;    }    bitBlt( m_pScrollFrame, 0, 0, buffer );}void PlayerWidget::engineStateChanged( Engine::State state, Engine::State /*oldState*/ ){    DEBUG_BLOCK    switch( state )    {        case Engine::Empty:            m_pButtonPlay->setOn( false );            m_pButtonPause->setOn( false );

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美性视频一区二区三区| 成人免费在线视频| 亚洲精品视频免费看| 久久精品免费观看| 欧美日韩1234| 亚洲视频香蕉人妖| 国产成人夜色高潮福利影视| 欧美日韩综合一区| 中文字幕在线一区二区三区| 久草这里只有精品视频| 9191成人精品久久| 亚洲制服丝袜av| 色婷婷精品大在线视频| 中文字幕国产一区| 国产成人在线观看| 精品久久久久久久久久久久久久久| 亚洲午夜免费视频| 色激情天天射综合网| 国产精品毛片无遮挡高清| 国产福利一区二区三区视频在线 | 国产98色在线|日韩| 91精品国产美女浴室洗澡无遮挡| 亚洲精品乱码久久久久久久久| 粉嫩aⅴ一区二区三区四区| 精品人在线二区三区| 五月天激情小说综合| 欧美日韩精品一区二区三区四区| 亚洲免费在线视频一区 二区| 成人免费观看视频| 国产精品福利影院| www.66久久| 日本午夜精品一区二区三区电影 | 成人午夜av影视| 久久久91精品国产一区二区三区| 久久精品国产99久久6| 欧美一区国产二区| 黄色小说综合网站| 国产欧美日韩中文久久| 成人午夜在线播放| 亚洲精品日韩一| 欧美写真视频网站| 欧美aa在线视频| 久久亚洲精品小早川怜子| 国产高清不卡一区二区| 中文字幕在线观看一区二区| av高清久久久| 亚洲一区影音先锋| 日韩一区二区麻豆国产| 国内精品免费在线观看| 国产精品三级久久久久三级| 欧洲精品一区二区| 日韩av电影免费观看高清完整版| 精品国产在天天线2019| 成人激情开心网| 亚洲午夜一区二区| 精品日韩一区二区三区免费视频| 国产成人一区在线| 亚洲免费在线观看| 日韩精品一区二区在线| 成人激情动漫在线观看| 肉肉av福利一精品导航| 久久久久久久综合日本| 欧美综合色免费| 精品一区二区三区影院在线午夜| 国产精品伦一区二区三级视频| 欧美中文字幕一区二区三区亚洲| 经典三级在线一区| 亚洲女人****多毛耸耸8| 日韩欧美一级二级三级| 91片在线免费观看| 久久av老司机精品网站导航| 综合中文字幕亚洲| 日韩欧美不卡在线观看视频| 色综合欧美在线| 国内精品免费在线观看| 亚洲国产wwwccc36天堂| 国产欧美日韩不卡免费| 在线成人免费视频| 99精品视频在线观看免费| 美女www一区二区| 亚洲精品国产a久久久久久 | 国产精品一区二区三区99| 亚洲国产一区视频| 国产精品毛片无遮挡高清| 日韩免费观看高清完整版在线观看| 91丨porny丨在线| 国产精品一级在线| 狂野欧美性猛交blacked| 亚洲综合网站在线观看| 中文欧美字幕免费| 欧美电影免费观看高清完整版| 色域天天综合网| 不卡欧美aaaaa| 国产一区二区三区高清播放| 午夜激情一区二区| 亚洲一二三四在线| 国产精品乱码人人做人人爱 | 激情综合亚洲精品| 亚洲成人资源网| 亚洲乱码中文字幕| 成人欧美一区二区三区视频网页| 日韩欧美成人午夜| 欧美一区二区不卡视频| 欧美日本高清视频在线观看| 一本大道综合伊人精品热热| 成人h精品动漫一区二区三区| 国产一二精品视频| 国模少妇一区二区三区| 久久精品国产一区二区三 | 一二三四社区欧美黄| 亚洲欧美一区二区不卡| 亚洲日韩欧美一区二区在线| 中文字幕中文字幕中文字幕亚洲无线| 国产欧美日韩另类视频免费观看 | 亚洲综合在线免费观看| 成人欧美一区二区三区小说| 亚洲女人小视频在线观看| 亚洲女女做受ⅹxx高潮| 亚洲午夜久久久久久久久电影网 | 国产一本一道久久香蕉| 国产一区二区三区国产| 丁香亚洲综合激情啪啪综合| 成人一区在线观看| 99久久久精品| 欧美在线不卡一区| 91麻豆精品久久久久蜜臀| 日韩午夜av电影| 亚洲精品一区在线观看| 国产日韩欧美精品在线| 中文字幕一区二区三区不卡在线| 中文字幕视频一区二区三区久| 亚洲乱码一区二区三区在线观看| 亚洲电影中文字幕在线观看| 日本中文字幕一区二区视频| 久久国产精品无码网站| 福利一区二区在线观看| 一本色道a无线码一区v| 欧美一卡二卡在线| 国产午夜精品久久久久久免费视| 亚洲视频 欧洲视频| 视频在线观看91| 国产成人欧美日韩在线电影| 一本色道亚洲精品aⅴ| 欧美一级夜夜爽| 中文字幕乱码一区二区免费| 亚洲一卡二卡三卡四卡| 久99久精品视频免费观看| 成人黄色软件下载| 欧美日韩亚洲综合一区二区三区 | 成人激情校园春色| 欧美三级韩国三级日本一级| 精品88久久久久88久久久| 亚洲色图在线播放| 激情成人综合网| 在线看日韩精品电影| 精品国产制服丝袜高跟| 亚洲精品一二三| 韩国女主播一区| 欧美天堂亚洲电影院在线播放| 亚洲精品一区二区三区蜜桃下载 | 中文字幕视频一区| 久久不见久久见中文字幕免费| 91丨porny丨首页| wwwwxxxxx欧美| 亚洲成人动漫精品| 成人av网址在线| 日韩欧美国产精品| 亚洲一区电影777| 不卡电影一区二区三区| 欧美大片在线观看| 亚洲小说欧美激情另类| 成人精品视频网站| 欧美不卡在线视频| 天堂在线一区二区| 色视频成人在线观看免| 亚洲国产精品v| 激情五月激情综合网| 在线综合亚洲欧美在线视频| 亚洲老妇xxxxxx| 99国产欧美另类久久久精品| 国产亚洲欧美日韩在线一区| 麻豆精品久久久| 69堂成人精品免费视频| 亚洲成人一二三| 色综合久久久久久久| 综合亚洲深深色噜噜狠狠网站| 国产91丝袜在线播放| 久久午夜电影网| 黑人巨大精品欧美一区| 欧美成人欧美edvon| 毛片不卡一区二区| 欧美一区二区黄| 蜜臀久久99精品久久久久久9| 欧美日韩国产在线播放网站| 夜夜操天天操亚洲| 欧美三级午夜理伦三级中视频| 夜夜亚洲天天久久| 欧美性高清videossexo| 亚洲第一电影网| 555夜色666亚洲国产免|