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

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

?? directorylist.cpp

?? Amarok是一款在LINUX或其他類UNIX操作系統中運行的音頻播放器軟件。 經過兩年開發后
?? CPP
字號:
/***************************************************************************                         directorylist.cpp                            -------------------   begin                : Tue Feb 4 2003   copyright            : (C) 2003 Scott Wheeler <wheeler@kde.org>                        : (C) 2004 Max Howell <max.howell@methylblue.com>                        : (C) 2004 Mark Kretschmann <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 "amarokconfig.h"#include "directorylist.h"#include "mountpointmanager.h"#include <kfileitem.h>#include <klocale.h>#include <qfile.h>#include <qlabel.h>#include <qpainter.h>#include <qtooltip.h>CollectionSetup* CollectionSetup::s_instance;CollectionSetup::CollectionSetup( QWidget *parent )        : QVBox( parent, "CollectionSetup" ){    s_instance = this;    (new QLabel( i18n(        "These folders will be scanned for "        "media to make up your collection:"), this ))->setAlignment( Qt::WordBreak );    m_view = new QFixedListView( this );    m_recursive = new QCheckBox( i18n("&Scan folders recursively"), this );    m_monitor   = new QCheckBox( i18n("&Watch folders for changes"), this );    QToolTip::add( m_recursive, i18n( "If selected, Amarok will read all subfolders." ) );    QToolTip::add( m_monitor,   i18n( "If selected, folders will automatically get rescanned when the content is modified, e.g. when a new file was added." ) );    // Read config values    //we have to detect if this is the actual first run and not get the collectionFolders in that case    //there won't be any anyway and accessing them creates a Sqlite database, even if the user wants to    //use another database    //bug 131719 131724    if( !Amarok::config()->readBoolEntry( "First Run", true ) )        m_dirs = MountPointManager::instance()->collectionFolders();    m_recursive->setChecked( AmarokConfig::scanRecursively() );    m_monitor->setChecked( AmarokConfig::monitorChanges() );    m_view->addColumn( QString::null );    m_view->setRootIsDecorated( true );    m_view->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );    m_view->setResizeMode( QListView::LastColumn );    reinterpret_cast<QWidget*>(m_view->header())->hide();    new Collection::Item( m_view );    setSpacing( 6 );}voidCollectionSetup::writeConfig(){    //If we are in recursive mode then we don't need to store the names of the    //subdirectories of the selected directories    if ( recursive() )    {        for ( QStringList::iterator it=m_dirs.begin(); it!=m_dirs.end(); ++it )        {            QStringList::iterator jt=m_dirs.begin();            while ( jt!=m_dirs.end() )            {                if ( it==jt )                {                    ++jt;                    continue;                }                //Note: all directories except "/" lack a trailing '/'.                //If (*jt) is a subdirectory of (*it) it is redundant.                //As all directories are subdirectories of "/", if "/" is selected, we                //can delete everything else.                if ( ( *jt ).startsWith( *it + '/' ) || *it=="/" )                    jt = m_dirs.remove( jt );                else                    ++jt;            }        }    }    MountPointManager::instance()->setCollectionFolders( m_dirs );    AmarokConfig::setScanRecursively( recursive() );    AmarokConfig::setMonitorChanges( monitor() );}//////////////////////////////////////////////////////////////////////////////////////////// CLASS Item//////////////////////////////////////////////////////////////////////////////////////////namespace Collection {Item::Item( QListView *parent )    : QCheckListItem( parent, "/", QCheckListItem::CheckBox  )    , m_lister( true )    , m_url( "file:/" )    , m_listed( false )    , m_fullyDisabled( false ){    //Since we create the "/" checklistitem here, we need to enable it if needed    if ( CollectionSetup::instance()->m_dirs.contains( "/" ) )        static_cast<QCheckListItem*>( this )->setOn(true);    m_lister.setDirOnlyMode( true );    connect( &m_lister, SIGNAL(newItems( const KFileItemList& )), SLOT(newItems( const KFileItemList& )) );    setOpen( true );    setVisible( true );}Item::Item( QListViewItem *parent, const KURL &url , bool full_disable /* default=false */ )    : QCheckListItem( parent, url.fileName(), QCheckListItem::CheckBox )    , m_lister( true )    , m_url( url )    , m_listed( false )    , m_fullyDisabled( full_disable ){    m_lister.setDirOnlyMode( true );    setExpandable( true );    connect( &m_lister, SIGNAL(newItems( const KFileItemList& )), SLOT(newItems( const KFileItemList& )) );    connect( &m_lister, SIGNAL(completed()), SLOT(completed()) );    connect( &m_lister, SIGNAL(canceled()), SLOT(completed()) );}QStringItem::fullPath() const{    QString path;    for( const QListViewItem *item = this; item != listView()->firstChild(); item = item->parent() )    {        path.prepend( item->text( 0 ) );        path.prepend( '/' );    }    return path;}voidItem::setOpen( bool b ){    if ( !m_listed )    {        m_lister.openURL( m_url, true );        m_listed = true;    }    QListViewItem::setOpen( b );}voidItem::stateChange( bool b ){    QStringList &cs_m_dirs = CollectionSetup::instance()->m_dirs;    if ( isFullyDisabled() )        return;    if( CollectionSetup::instance()->recursive() )        for( QListViewItem *item = firstChild(); item; item = item->nextSibling() )            if ( dynamic_cast<Item*>( item ) && !dynamic_cast<Item*>( item )->isFullyDisabled() )               static_cast<QCheckListItem*>(item)->QCheckListItem::setOn( b );    //If it is disabled, allow us to change its appearance (above code) but not add it    //to the list of folders (code below)    if ( isDisabled() )        return;    // Update folder list    QStringList::Iterator it = cs_m_dirs.find( m_url.path() );    if ( isOn() ) {        if ( it == cs_m_dirs.end() )            cs_m_dirs << m_url.path();        // Deselect subdirectories if we are in recursive mode as they are redundant        if ( CollectionSetup::instance()->recursive() )        {            QStringList::Iterator diriter = cs_m_dirs.begin();            while ( diriter != cs_m_dirs.end() )            {                // Since the dir "/" starts with '/', we need a hack to stop it removing                // itself (it being the only path with a trailing '/')                if ( (*diriter).startsWith( m_url.path(1) ) && *diriter != "/" )                    diriter = cs_m_dirs.erase(diriter);                else                    ++diriter;            }        }    }    else {        //Deselect item and recurse through children but only deselect children if they        //do not exist unless we are in recursive mode (where no children should be        //selected if the parent is being unselected)        //Note this does not do anything to the checkboxes, but they should be doing        //the same thing as we are (hopefully)        //Note: all paths lack a trailing '/' except for "/", which must be handled as a        //special case        if ( it != cs_m_dirs.end() )            cs_m_dirs.erase( it );        QStringList::Iterator diriter = cs_m_dirs.begin();        while ( diriter != cs_m_dirs.end() )        {            if ( (*diriter).startsWith( m_url.path(1) ) )   //path(1) adds a trailing '/'            {                if ( CollectionSetup::instance()->recursive() ||                     !QFile::exists( *diriter ) )                {                    diriter = cs_m_dirs.erase(diriter);                }                else                    ++diriter;            }            else                ++diriter;        }    }    // Redraw parent items    listView()->triggerUpdate();}voidItem::activate(){    if( !isDisabled() )        QCheckListItem::activate();}voidItem::newItems( const KFileItemList &list ) //SLOT{    for( KFileItemListIterator it( list ); *it; ++it )    {        //Fully disable (always appears off and grayed-out) if it is "/proc", "/sys" or        //"/dev" or one of their children. This is because we will never scan them, so we        //might as well show that.        //These match up with the skipped dirs in CollectionScanner::readDir.        bool fully_disable=false;        if ( this->m_url.fileName().isEmpty() && ( ( *it )->url().fileName()=="proc"             || ( *it )->url().fileName()=="dev" || ( *it )->url().fileName()=="sys" ) )        {            fully_disable=true;        }        Item *item = new Item( this, (*it)->url() , fully_disable || this->isFullyDisabled() );        if ( !item->isFullyDisabled() )        {            if( CollectionSetup::instance()->recursive() && isOn() ||                CollectionSetup::instance()->m_dirs.contains( item->fullPath() ) )            {                item->setOn( true );            }        }        item->setPixmap( 0, (*it)->pixmap( KIcon::SizeSmall ) );    }}voidItem::paintCell( QPainter * p, const QColorGroup & cg, int column, int width, int align ){    bool dirty = false;    QStringList &cs_m_dirs = CollectionSetup::instance()->m_dirs;    // Figure out if a child folder is activated    for ( QStringList::const_iterator iter = cs_m_dirs.begin(); iter != cs_m_dirs.end();            ++iter )        if ( ( *iter ).startsWith( m_url.path(1) ) )            if ( *iter != "/" ) // "/" should not match as a child of "/"                dirty = true;    // Use a different color if this folder has an activated child folder    const QFont f = p->font();    QColorGroup _cg = cg;    if ( dirty )    {        _cg.setColor( QColorGroup::Text, listView()->colorGroup().link() );        QFont font = p->font();        font.setBold( !font.bold() );        p->setFont( font );    }    QCheckListItem::paintCell( p, isDisabled() ? listView()->palette().disabled() : _cg, column, width, align );    p->setFont( f );}} //namespace Collection#include "directorylist.moc"

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99re66热这里只有精品3直播| 欧美日韩国产三级| 欧美性一二三区| 国产日本欧洲亚洲| 日韩有码一区二区三区| 色综合久久九月婷婷色综合| 精品福利一二区| 日韩激情在线观看| 日本精品一级二级| 国产精品美日韩| 国内精品第一页| 欧美一区三区四区| 亚洲成人激情自拍| 91成人国产精品| 综合亚洲深深色噜噜狠狠网站| 狠狠色丁香婷综合久久| 欧美日本国产一区| 亚洲高清在线精品| 欧美日韩在线亚洲一区蜜芽| 中文字幕亚洲综合久久菠萝蜜| 成人做爰69片免费看网站| 精品福利在线导航| 国产精品一区二区在线观看网站 | 亚洲综合小说图片| 成人网男人的天堂| 国产欧美日韩三级| 国产精品一区二区果冻传媒| 日韩精品一区二区三区三区免费| 免费在线欧美视频| 日韩视频在线你懂得| 久久精工是国产品牌吗| 亚洲丝袜精品丝袜在线| 色美美综合视频| 亚洲一区二区欧美日韩| 在线免费视频一区二区| 亚洲精品视频在线| 欧美在线观看一区| 午夜av电影一区| 日韩一区二区三区av| 九九视频精品免费| 久久亚洲影视婷婷| 99久久国产免费看| 亚洲第一福利一区| 欧美大片拔萝卜| 处破女av一区二区| 一区二区三区国产精华| 在线播放视频一区| 国产一区二区调教| 亚洲视频在线观看一区| 精品污污网站免费看| 久久精品99国产精品日本| 久久精品亚洲麻豆av一区二区| 9l国产精品久久久久麻豆| 依依成人综合视频| 精品乱人伦小说| 99精品久久久久久| 日韩电影在线一区| 中文字幕欧美日韩一区| 欧美在线色视频| 精品一区二区在线观看| 亚洲人成亚洲人成在线观看图片| 欧美疯狂性受xxxxx喷水图片| 国产精品一区在线| 亚洲一区在线观看免费观看电影高清| 777午夜精品免费视频| 国产成人三级在线观看| 亚洲成a人v欧美综合天堂下载| 久久影院午夜论| 色婷婷激情一区二区三区| 精品一二线国产| 一区二区三区加勒比av| 久久亚洲欧美国产精品乐播| 国产亚洲女人久久久久毛片| 欧美色视频在线| 成人av片在线观看| 奇米色777欧美一区二区| 最新热久久免费视频| 日韩欧美一卡二卡| 欧美在线免费播放| 99久久国产综合色|国产精品| 美女mm1313爽爽久久久蜜臀| 亚洲精品日韩一| 欧美激情一区二区三区四区| 欧美一区二区三区四区在线观看| proumb性欧美在线观看| 国精产品一区一区三区mba桃花 | 日本中文在线一区| 最新国产成人在线观看| 久久婷婷国产综合国色天香| 6080yy午夜一二三区久久| 一道本成人在线| 99久久婷婷国产综合精品电影 | 国模冰冰炮一区二区| 国产二区国产一区在线观看| 日韩高清一级片| 亚洲综合在线五月| 国产精品午夜久久| 国产亚洲一区字幕| 久久亚洲一区二区三区明星换脸 | 日韩一区二区三区视频在线| 欧美在线一二三四区| 日本韩国欧美三级| 一本大道av一区二区在线播放| 成人av资源在线观看| 成人综合在线观看| av福利精品导航| 成人福利电影精品一区二区在线观看 | 国产精品久久久久久久久搜平片| 欧美精品一区二区三区在线播放 | 成人毛片老司机大片| 丝袜美腿高跟呻吟高潮一区| 亚洲美女屁股眼交| 悠悠色在线精品| 亚洲一区在线电影| 亚洲不卡在线观看| 五月天网站亚洲| 首页亚洲欧美制服丝腿| 免费人成在线不卡| 久久精品国产秦先生| 韩国精品久久久| 国产精品1024| 99在线热播精品免费| 色欧美88888久久久久久影院| 在线精品视频一区二区| 欧美日本国产一区| 欧美成va人片在线观看| 亚洲精品一区二区三区香蕉| 国产精品污网站| 国产亚洲1区2区3区| 国产清纯在线一区二区www| 国产欧美日韩综合| 日韩理论片网站| 亚洲成人免费视| 美女在线视频一区| 成人综合婷婷国产精品久久| 色8久久精品久久久久久蜜| 6080yy午夜一二三区久久| 久久亚区不卡日本| 一区二区三区鲁丝不卡| 另类欧美日韩国产在线| 国产999精品久久久久久| 91国产免费观看| 欧美大片一区二区三区| 国产精品欧美极品| 日韩电影在线观看一区| 国产 欧美在线| 欧美日韩一区二区三区四区五区| 日韩欧美中文字幕制服| 亚洲欧美偷拍三级| 久久精品国产亚洲高清剧情介绍| 成人教育av在线| 91精品国产高清一区二区三区 | 亚洲第一福利一区| 国产不卡在线视频| 欧美高清激情brazzers| 中文幕一区二区三区久久蜜桃| 午夜精品久久久久久不卡8050| 国产成人鲁色资源国产91色综 | 色综合一个色综合亚洲| 日韩一区二区影院| 亚洲综合激情另类小说区| 欧美日韩一区三区| 国产精品理论在线观看| 美女在线观看视频一区二区| 91小视频在线观看| 国产日韩欧美精品在线| 日本不卡免费在线视频| 91久久精品午夜一区二区| 国产无遮挡一区二区三区毛片日本| 亚洲成精国产精品女| 色哟哟一区二区在线观看| 欧美极品xxx| 国产麻豆精品视频| 日韩免费观看高清完整版| 亚洲h在线观看| 欧美最猛黑人xxxxx猛交| 最新中文字幕一区二区三区| 国产成人午夜精品5599| 久久一日本道色综合| 免费在线观看一区| 欧美老年两性高潮| 亚洲一区二区三区在线| 91网页版在线| 欧美激情自拍偷拍| 国产主播一区二区| 久久尤物电影视频在线观看| 蜜臀久久99精品久久久久宅男| 欧美日韩综合在线免费观看| 一区二区国产视频| 日本韩国视频一区二区| 有码一区二区三区| 欧美影院一区二区| 亚洲一二三区在线观看| 欧美综合色免费| 香蕉成人伊视频在线观看| 欧美日韩国产综合一区二区| 亚洲午夜精品在线| 91精品中文字幕一区二区三区| 青青草国产成人av片免费| 欧美zozozo|