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

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

?? playlistbrowser.cpp

?? Amarok是一款在LINUX或其他類UNIX操作系統中運行的音頻播放器軟件。 經過兩年開發后
?? CPP
?? 第 1 頁 / 共 5 頁
字號:
/*************************************************************************** * copyright            : (c) 2004 Pierpaolo Di Panfilo                    * *                        (c) 2004 Mark Kretschmann <markey@web.de>        * *                        (c) 2005-2006 Seb Ruiz <me@sebruiz.net>          * *                        (c) 2005 Gábor Lehel <illissius@gmail.com>       * *                        (c) 2005 Christian Muehlhaeuser <chris@chris.de> * *                        (c) 2006 Alexandre Oliveira <aleprj@gmail.com>   * *                        (c) 2006 Adam Pigg <adam@piggz.co.uk>            * * See COPYING file for licensing information                              * ***************************************************************************/#define DEBUG_PREFIX "PlaylistBrowser"#include "amarok.h"            //actionCollection()#include "browserToolBar.h"#include "collectiondb.h"      //smart playlists#include "debug.h"#include "htmlview.h"#include "k3bexporter.h"#include "mediabrowser.h"#include "dynamicmode.h"#include "lastfm.h"#include "playlist.h"#include "playlistbrowser.h"#include "playlistbrowseritem.h"#include "playlistselection.h"#include "podcastbundle.h"#include "podcastsettings.h"#include "scancontroller.h"#include "smartplaylisteditor.h"#include "tagdialog.h"         //showContextMenu()#include "threadmanager.h"#include "statusbar.h"#include "contextbrowser.h"#include "xspfplaylist.h"#include <qevent.h>            //customEvent()#include <qheader.h>           //mousePressed()#include <qlabel.h>#include <qpainter.h>          //paintCell()#include <qpixmap.h>           //paintCell()#include <qtextstream.h>       //loadPlaylists(), saveM3U(), savePLS()#include <kaction.h>#include <kactionclasses.h>#include <kactioncollection.h>#include <kapplication.h>#include <kfiledialog.h>       //openPlaylist()#include <kio/job.h>           //deleteSelectedPlaylists()#include <kiconloader.h>       //smallIcon#include <kinputdialog.h>#include <klineedit.h>         //rename()#include <klocale.h>#include <kmessagebox.h>       //renamePlaylist(), deleteSelectedPlaylist()#include <kmimetype.h>#include <kmultipledrag.h>     //dragObject()#include <kpopupmenu.h>#include <kpushbutton.h>#include <kstandarddirs.h>     //KGlobal::dirs()#include <kurldrag.h>          //dragObject()#include <cstdio>              //rename() in renamePlaylist()namespace Amarok {    QListViewItem*    findItemByPath( QListView *view, QString name )    {        const static QString escaped( "\\/" );        const static QChar sep( '/' );        debug() << "Searching " << name << endl;        QStringList path = splitPath( name );        QListViewItem *prox = view->firstChild();        QListViewItem *item = 0;        foreach( path ) {            item = prox;            QString text( *it );            text.replace( escaped, sep );            for ( ; item; item = item->nextSibling() ) {                if ( text == item->text(0) ) {                    break;                }            }            if ( !item )                return 0;            prox = item->firstChild();        }        return item;    }    QStringList    splitPath( QString path ) {        QStringList list;        const static QChar sep( '/' );        int bOffset = 0, sOffset = 0;        int pos = path.find( sep, bOffset );        while ( pos != -1 ) {            if ( pos > sOffset && pos <= (int)path.length() ) {                if ( pos > 0 && path[pos-1] != '\\' ) {                    list << path.mid( sOffset, pos - sOffset );                    sOffset = pos + 1;                }            }            bOffset = pos + 1;            pos = path.find( sep, bOffset );        }        int length = path.length() - 1;        if ( path.mid( sOffset, length - sOffset + 1 ).length() > 0 )            list << path.mid( sOffset, length - sOffset + 1 );        return list;    }}inline QStringfileExtension( const QString &fileName ){    return Amarok::extension( fileName );}PlaylistBrowser *PlaylistBrowser::s_instance = 0;PlaylistBrowser::PlaylistBrowser( const char *name )        : QVBox( 0, name )        , m_polished( false )        , m_playlistCategory( 0 )        , m_streamsCategory( 0 )        , m_smartCategory( 0 )        , m_dynamicCategory( 0 )        , m_podcastCategory( 0 )        , m_coolStreams( 0 )        , m_smartDefaults( 0 )        , m_lastfmCategory( 0 )        , m_shoutcastCategory( 0 )        , m_lastPlaylist( 0 )        , m_coolStreamsOpen( false )        , m_smartDefaultsOpen( false )        , m_lastfmOpen( false )        , m_ac( new KActionCollection( this ) )        , m_podcastTimer( new QTimer( this ) ){    s_instance = this;    QVBox *browserBox = new QVBox( this );    browserBox->setSpacing( 3 );    //<Toolbar>    addMenuButton  = new KActionMenu( i18n("Add"), Amarok::icon( "add_playlist" ), m_ac );    addMenuButton->setDelayed( false );    KPopupMenu *playlistMenu = new KPopupMenu( this );    playlistMenu->insertItem( i18n("New..."), PLAYLIST );    playlistMenu->insertItem( i18n("Import Existing..."), PLAYLIST_IMPORT );    connect( playlistMenu, SIGNAL( activated(int) ), SLOT( slotAddPlaylistMenu(int) ) );    KPopupMenu *addMenu  = addMenuButton->popupMenu();    addMenu->insertItem( i18n("Playlist"), playlistMenu );    addMenu->insertItem( i18n("Smart Playlist..."), SMARTPLAYLIST );    addMenu->insertItem( i18n("Dynamic Playlist..."), ADDDYNAMIC);    addMenu->insertItem( i18n("Radio Stream..."), STREAM );    addMenu->insertItem( i18n("Podcast..."), PODCAST );    connect( addMenu, SIGNAL( activated(int) ), SLOT( slotAddMenu(int) ) );    renameButton   = new KAction( i18n("Rename"), "editclear", 0, this, SLOT( renameSelectedItem() ), m_ac );    removeButton   = new KAction( i18n("Delete"), Amarok::icon( "remove" ), 0, this, SLOT( removeSelectedItems() ), m_ac );    m_toolbar = new Browser::ToolBar( browserBox );    m_toolbar->setIconText( KToolBar::IconTextRight, false ); //we want the open button to have text on right    addMenuButton->plug( m_toolbar );    m_toolbar->setIconText( KToolBar::IconOnly, false );      //default appearance    m_toolbar->insertLineSeparator();    renameButton->plug( m_toolbar);    removeButton->plug( m_toolbar );    renameButton->setEnabled( false );    removeButton->setEnabled( false );    //</Toolbar>    m_splitter = new QSplitter( Qt::Vertical, browserBox );    m_splitter->setChildrenCollapsible( false ); // hiding the InfoPane entirely can only be confusing    m_listview = new PlaylistBrowserView( m_splitter );    int sort = Amarok::config( "PlaylistBrowser" )->readNumEntry( "Sorting", Qt::Ascending );    m_listview->setSorting( 0, sort == Qt::Ascending ? true : false );    m_podcastTimerInterval = Amarok::config( "PlaylistBrowser" )->readNumEntry( "Podcast Interval", 14400000 );    connect( m_podcastTimer, SIGNAL(timeout()), this, SLOT(scanPodcasts()) );    // signals and slots connections    connect( m_listview, SIGNAL( contextMenuRequested( QListViewItem *, const QPoint &, int ) ),             this,         SLOT( showContextMenu( QListViewItem *, const QPoint &, int ) ) );    connect( m_listview, SIGNAL( doubleClicked( QListViewItem *, const QPoint &, int ) ),             this,         SLOT( invokeItem( QListViewItem *, const QPoint &, int ) ) );    connect( m_listview, SIGNAL( itemRenamed( QListViewItem*, const QString&, int ) ),             this,         SLOT( renamePlaylist( QListViewItem*, const QString&, int ) ) );    connect( m_listview, SIGNAL( currentChanged( QListViewItem * ) ),             this,         SLOT( currentItemChanged( QListViewItem * ) ) );    connect( CollectionDB::instance(), SIGNAL( scanDone( bool ) ), SLOT( collectionScanDone() ) );    setMinimumWidth( m_toolbar->sizeHint().width() );    m_infoPane = new InfoPane( m_splitter );    m_podcastCategory = loadPodcasts();    setSpacing( 4 );    setFocusProxy( m_listview );}voidPlaylistBrowser::polish(){    // we make startup faster by doing the slow bits for this    // only when we are shown on screen    DEBUG_FUNC_INFO    Amarok::OverrideCursor cursor;//     blockSignals( true );//     BrowserBar::instance()->restoreWidth();//     blockSignals( false );    QVBox::polish();    /// Podcasting is always initialised in the ctor because of autoscanning    m_polished = true;    m_playlistCategory = loadPlaylists();    if( !CollectionDB::instance()->isEmpty() )    {        m_smartCategory = loadSmartPlaylists();        loadDefaultSmartPlaylists();    }#define config Amarok::config( "PlaylistBrowser" )    m_dynamicCategory = loadDynamics();    m_randomDynamic   = new DynamicEntry( m_dynamicCategory, 0, i18n("Random Mix") );    m_randomDynamic->setKept( false ); //don't save it    m_randomDynamic->setCycleTracks(   config->readBoolEntry( "Dynamic Random Remove Played", true ) );    m_randomDynamic->setUpcomingCount( config->readNumEntry ( "Dynamic Random Upcoming Count", 15 ) );    m_randomDynamic->setPreviousCount( config->readNumEntry ( "Dynamic Random Previous Count", 5 ) );    m_suggestedDynamic = new DynamicEntry( m_dynamicCategory, m_randomDynamic, i18n("Suggested Songs" ) );    m_suggestedDynamic->setKept( false ); //don't save it    m_suggestedDynamic->setAppendType( DynamicMode::SUGGESTION );    m_suggestedDynamic->setCycleTracks(   config->readBoolEntry( "Dynamic Suggest Remove Played", true ) );    m_suggestedDynamic->setUpcomingCount( config->readNumEntry ( "Dynamic Suggest Upcoming Count", 15 ) );    m_suggestedDynamic->setPreviousCount( config->readNumEntry ( "Dynamic Suggest Previous Count", 5 ) );#undef config    m_streamsCategory  = loadStreams();    loadCoolStreams();    m_shoutcastCategory = new ShoutcastBrowser( m_streamsCategory );    if( !AmarokConfig::scrobblerUsername().isEmpty() )    {        const bool subscriber = Amarok::config( "Scrobbler" )->readBoolEntry( "Subscriber", false );        loadLastfmStreams( subscriber );    }    markDynamicEntries();    // ListView item state restoration:    // First we check if the number of items in the listview is the same as it was on last    // application exit. If true, we iterate over all items and restore their open/closed state.    // Note: We ignore podcast items, because they are added dynamically added to the ListView.    QValueList<int> stateList = Amarok::config( "PlaylistBrowser" )->readIntListEntry( "Item State" );    QListViewItemIterator it( m_listview );    uint count = 0;    while ( it.current() ) {        if( !isPodcastEpisode( it.current() ) )            ++count;        ++it;    }    if ( count == stateList.count() ) {        uint index = 0;        it = QListViewItemIterator( m_listview );        while ( it.current() ) {            if( !isPodcastEpisode( it.current() ) ) {                it.current()->setOpen( stateList[index] );                ++index;            }            ++it;        }    }    // Set height of InfoPane    m_infoPane->setStoredHeight( Amarok::config( "PlaylistBrowser" )->readNumEntry( "InfoPane Height", 200 ) );}PlaylistBrowser::~PlaylistBrowser(){    DEBUG_BLOCK    s_instance = 0;    if( m_polished )    {        savePlaylists();        saveSmartPlaylists();        saveDynamics();        saveStreams();        saveLastFm();        savePodcastFolderStates( m_podcastCategory );        QStringList list;        for( uint i=0; i < m_dynamicEntries.count(); i++ )        {            QListViewItem *item = m_dynamicEntries.at( i );            list.append( item->text(0) );        }        Amarok::config( "PlaylistBrowser" )->writeEntry( "Sorting", m_listview->sortOrder() );        Amarok::config( "PlaylistBrowser" )->writeEntry( "Podcast Interval", m_podcastTimerInterval );        Amarok::config( "PlaylistBrowser" )->writeEntry( "Podcast Folder Open", m_podcastCategory->isOpen() );        Amarok::config( "PlaylistBrowser" )->writeEntry( "InfoPane Height", m_infoPane->getHeight() );    }}voidPlaylistBrowser::setInfo( const QString &title, const QString &info ){    m_infoPane->setInfo( title, info );}voidPlaylistBrowser::resizeEvent( QResizeEvent * ){    if( static_cast<QWidget*>( m_infoPane->child( "container" ) )->isShown() )        m_infoPane->setMaximumHeight( ( int )( m_splitter->height() / 1.5 ) );}voidPlaylistBrowser::markDynamicEntries(){    if( Amarok::dynamicMode() )    {        QStringList playlists = Amarok::dynamicMode()->items();        for( uint i=0; i < playlists.count(); i++ )        {            PlaylistBrowserEntry *item = dynamic_cast<PlaylistBrowserEntry*>( Amarok::findItemByPath( m_listview, playlists[i]  ) );            if( item )            {                m_dynamicEntries.append( item );                if( item->rtti() == PlaylistEntry::RTTI )                     static_cast<PlaylistEntry*>( item )->setDynamic( true );                if( item->rtti() == SmartPlaylist::RTTI )                     static_cast<SmartPlaylist*>( item )->setDynamic( true );            }        }    }}/** ************************************************************************* *  STREAMS ************************************************************************* **/QString PlaylistBrowser::streamBrowserCache() const{    return Amarok::saveLocation() + "streambrowser_save.xml";}PlaylistCategory* PlaylistBrowser::loadStreams(){    QFile file( streamBrowserCache() );    QTextStream stream( &file );    stream.setEncoding( QTextStream::UnicodeUTF8 );

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人丝袜美腿| 国内精品伊人久久久久影院对白| 亚洲乱码一区二区三区在线观看| 亚洲一二三四区| 国产经典欧美精品| 91成人免费在线| 国产亚洲综合色| 亚洲成在人线在线播放| 成人小视频免费观看| 欧美精品色一区二区三区| 国产日韩欧美一区二区三区乱码| 亚洲v日本v欧美v久久精品| 成人免费观看男女羞羞视频| 欧美一区二区在线看| 亚洲男人的天堂一区二区| 激情国产一区二区| 91极品美女在线| 亚洲国产成人在线| 美女网站视频久久| 欧美日韩亚洲丝袜制服| 亚洲视频一区二区在线| 国产精品亚洲第一| 精品黑人一区二区三区久久| 婷婷中文字幕综合| 欧美日韩在线播放三区四区| 日韩一区在线看| 国产成人精品在线看| 日韩一区二区在线看片| 亚洲国产精品久久不卡毛片 | 另类人妖一区二区av| 日本道色综合久久| 亚洲欧美综合网| 99精品久久久久久| 国产精品美日韩| 成人黄页毛片网站| 久久精品视频一区二区| 国产精品一区久久久久| 久久夜色精品一区| 国产剧情一区在线| 久久久久亚洲蜜桃| 国产成人免费高清| 国产亚洲欧美激情| 成人综合在线观看| 国产精品你懂的| 99久久99久久综合| 亚洲乱码一区二区三区在线观看| 一本一道久久a久久精品| 亚洲视频精选在线| 在线观看网站黄不卡| 亚洲一区二区av电影| 欧美日韩国产成人在线91| 午夜欧美在线一二页| 91麻豆精品91久久久久同性| 蜜臀av国产精品久久久久| 日韩美一区二区三区| 国产精品白丝jk黑袜喷水| 欧美极品美女视频| 色国产综合视频| 亚洲国产欧美一区二区三区丁香婷| 欧美日韩国产在线观看| 久久国产生活片100| 国产精品午夜在线观看| 91丨九色丨蝌蚪富婆spa| 久草精品在线观看| 久久亚洲综合色一区二区三区| 国产成人精品影院| 亚洲曰韩产成在线| 日韩免费看的电影| 99在线热播精品免费| 偷偷要91色婷婷| 久久理论电影网| 色婷婷综合五月| 寂寞少妇一区二区三区| 国产精品传媒在线| 欧美日韩国产影片| 成人午夜视频免费看| 亚洲va在线va天堂| 久久久蜜臀国产一区二区| 色婷婷激情一区二区三区| 日韩福利电影在线观看| 国产欧美一区二区三区网站| 欧美亚洲动漫精品| 国产精品亚洲专一区二区三区| 亚洲一线二线三线视频| 久久九九国产精品| 欧美日韩国产乱码电影| 成人黄色在线看| 蜜桃久久久久久久| 一区二区三区欧美日韩| 国产片一区二区| 日韩一区二区在线免费观看| 99国产欧美久久久精品| 麻豆成人久久精品二区三区红 | 欧美一级一区二区| 91亚洲午夜精品久久久久久| 九九精品视频在线看| 亚洲一区二区在线免费看| 国产午夜精品久久久久久免费视| 欧美亚洲丝袜传媒另类| 成人听书哪个软件好| 久久精品国产久精国产| 五月天激情小说综合| 亚洲人成网站影音先锋播放| 国产女主播在线一区二区| 日韩三级免费观看| 欧美日韩免费不卡视频一区二区三区| 丁香六月综合激情| 国产一区二区伦理片| 日本成人在线一区| 天天影视涩香欲综合网| 一区二区三区免费网站| 亚洲素人一区二区| 亚洲欧洲日韩一区二区三区| 久久精品一级爱片| 26uuu国产在线精品一区二区| 91精品黄色片免费大全| 欧美日本在线播放| 欧美日韩dvd在线观看| 欧美丝袜自拍制服另类| 在线观看日产精品| 欧美三级电影在线看| 在线观看一区日韩| 欧美日韩免费在线视频| 欧美变态tickle挠乳网站| 欧美美女一区二区在线观看| 精品视频色一区| 欧美日韩精品电影| 欧美精品粉嫩高潮一区二区| 欧美猛男男办公室激情| 91精品国产日韩91久久久久久| 欧美三级欧美一级| 91精品国产欧美一区二区成人| 欧美高清激情brazzers| 日韩视频免费观看高清完整版| 精品毛片乱码1区2区3区| 久久久电影一区二区三区| 亚洲国产精品成人综合| 亚洲人妖av一区二区| 亚洲国产精品影院| 裸体歌舞表演一区二区| 国产不卡视频在线播放| 91免费在线看| 欧美精品xxxxbbbb| 欧美不卡一区二区| 国产精品九色蝌蚪自拍| 亚洲一区在线观看网站| 久草在线在线精品观看| 成人免费高清在线观看| 欧美在线影院一区二区| 欧美v国产在线一区二区三区| 亚洲国产精品国自产拍av| 一区二区三区波多野结衣在线观看| 亚洲电影激情视频网站| 激情综合一区二区三区| 91在线一区二区三区| 欧美肥妇free| 国产色爱av资源综合区| 亚洲午夜一二三区视频| 国产在线精品一区二区夜色| 91免费看片在线观看| 欧美一级xxx| 一区二区三区四区在线播放| 久久精品国产精品亚洲红杏| 91片黄在线观看| 精品国产人成亚洲区| 亚洲三级在线免费观看| 日韩成人精品在线| 91免费看`日韩一区二区| 精品久久久久一区二区国产| 亚洲免费在线电影| 国产精品自拍一区| 9191成人精品久久| 综合色天天鬼久久鬼色| 激情小说亚洲一区| 欧美三级电影网站| 亚洲欧洲日本在线| 国产成人夜色高潮福利影视| 欧美电影在哪看比较好| 中文字幕视频一区| 国内精品国产成人| 欧美色老头old∨ideo| 欧美国产国产综合| 国产在线精品一区二区| 欧美电影影音先锋| 亚洲伊人色欲综合网| 不卡的电视剧免费网站有什么| 日韩久久久久久| 天堂成人国产精品一区| 色呦呦国产精品| 国产精品毛片大码女人| 国产麻豆成人传媒免费观看| 欧美一二三区在线| 一区二区三区在线影院| www.久久精品| 国产精品乱子久久久久| 国产成人免费xxxxxxxx| 亚洲精品一区二区三区精华液| 日本伊人色综合网| 91麻豆精品国产自产在线| 亚洲综合偷拍欧美一区色|