| | 226 | |
| | 227 | |
| | 228 | |
| | 229 | void AudioFileBrowser::on_m_pPathHometoolButton_clicked() |
| | 230 | { |
| | 231 | pathLineEdit->setText( QDir::homePath() ); |
| | 232 | tree->setRootIndex( model->index( QDir::homePath() ) ); |
| | 233 | } |
| | 234 | |
| | 235 | |
| | 236 | |
| | 237 | void 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 | } |