示例#1
0
void K3b::AudioBurnDialog::showEvent( QShowEvent* e )
{
    // we only show the audio ripping options when there are audio cd track sources
    bool showRipOptions = false;
    if( m_doc->firstTrack() ) {
        K3b::AudioTrack* track = m_doc->firstTrack();
        K3b::AudioDataSource* source = track->firstSource();

        while( source ) {

            if( dynamic_cast<K3b::AudioCdTrackSource*>(source) ) {
                showRipOptions = true;
                break;
            }

            // next source
            source = source->next();
            if( !source ) {
                track = track->next();
                if( track )
                    source = track->firstSource();
            }
        }
    }

    m_audioRippingGroup->setVisible( showRipOptions );

    K3b::ProjectBurnDialog::showEvent(e);
}
示例#2
0
文件: k3baudiodoc.cpp 项目: KDE/k3b
K3b::Msf K3b::AudioDoc::length() const
{
    K3b::Msf length = 0;
    K3b::AudioTrack* track = d->firstTrack;
    while( track ) {
        length += track->length();
        track = track->next();
    }

    return length;
}