Changeset 490

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

small audio file browser enhancement

Location:
branches/audiofilebrowser/gui/src/AudioFileBrowser
Files:
3 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} 
  • branches/audiofilebrowser/gui/src/AudioFileBrowser/AudioFileBrowser.h

    r488 r490  
    5858                void on_m_pPlayBtn_clicked(); 
    5959                void updateModelIndex(); 
     60                void on_m_pPathHometoolButton_clicked(); 
     61                void on_m_pPathUptoolButton_clicked(); 
     62 
    6063 
    6164        private: 
  • branches/audiofilebrowser/gui/src/AudioFileBrowser/AudioFileBrowser_UI.ui

    r488 r490  
    183183     <widget class="QToolButton" name="m_pPathUptoolButton" > 
    184184      <property name="text" > 
    185        <string>up</string> 
     185       <string>Up</string> 
    186186      </property> 
    187187     </widget> 
    188188    </item> 
    189189    <item> 
    190      <widget class="QPushButton" name="m_pPathHometoolButton" > 
     190     <widget class="QToolButton" name="m_pPathHometoolButton" > 
    191191      <property name="text" > 
    192192       <string>Home</string>