Show
Ignore:
Timestamp:
09/17/08 09:47:22 (5 years ago)
Author:
wolke
Message:

small audio file browser enhancement

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/audiofilebrowser/gui/src/AudioFileBrowser/AudioFileBrowser.cpp

    r489 r490  
    102102        filelineedit->setText( path ); 
    103103        m_pSampleWaveDisplay->updateDisplay( NULL ); 
     104 
     105        updateModelIndex(); //with this you have a navigation like konqueror  
    104106         
    105107        if ( model->isDir( index ) ) 
     
    120122        pathLineEdit->setText( onlypath ); 
    121123 
     124        updateModelIndex(); //with this you have a navigation like konqueror 
    122125 
    123126        if      ( 
     
    221224        return m_pselectedFile; 
    222225} 
     226 
     227 
     228 
     229void AudioFileBrowser::on_m_pPathHometoolButton_clicked() 
     230{ 
     231        pathLineEdit->setText( QDir::homePath() ); 
     232        tree->setRootIndex( model->index( QDir::homePath() ) ); 
     233} 
     234 
     235 
     236 
     237void AudioFileBrowser::on_m_pPathUptoolButton_clicked() 
     238{ 
     239        QString toremove = ""; 
     240        QString path = pathLineEdit->text(); 
     241 
     242        if ( path.length() <=1 )  
     243                return; 
     244 
     245        if ( path.endsWith( '/') ) { 
     246                toremove = path.section( '/', -2 ); 
     247        }else 
     248        { 
     249                toremove = path.section( '/', -1 ); 
     250        } 
     251         
     252        QString updir =  path.replace( toremove, "" ); 
     253        pathLineEdit->setText( updir ); 
     254        tree->setRootIndex( model->index( updir ) ); 
     255}