Changeset 524
- Timestamp:
- 09/27/08 06:21:18 (2 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/audiofilebrowser/gui/src/AudioFileBrowser/AudioFileBrowser.cpp
r522 r524 59 59 60 60 m_pPlayBtn->setEnabled( false ); 61 m_pStopBtn->setEnabled( false ); 61 62 openBTN->setEnabled( false ); 62 63 … … 89 90 AudioFileBrowser::~AudioFileBrowser() 90 91 { 92 Sample *pNewSample = Sample::load( sEmptySampleFilename ); 93 AudioEngine::get_instance()->get_sampler()->preview_sample( pNewSample, 100 ); 91 94 INFOLOG ( "DESTROY" ); 92 95 } … … 120 123 updateModelIndex(); //with this you have a navigation like konqueror 121 124 122 if ( model->isDir( index ) ) 123 return; 125 if ( model->isDir( index ) ){ 126 m_pPlayBtn->setEnabled( false ); 127 return; 128 } 124 129 125 130 QString name = path.section( '/', -1 ); … … 186 191 m_pSampleWaveDisplay->updateDisplay( sEmptySampleFilename ); 187 192 m_pPlayBtn->setEnabled( false ); 193 m_pStopBtn->setEnabled( false ); 188 194 openBTN->setEnabled( false ); 189 195 m_psamplefilename = ""; … … 198 204 if( QFile( m_psamplefilename ).exists() == false ) 199 205 return; 206 m_pStopBtn->setEnabled( true ); 200 207 Sample *pNewSample = Sample::load( m_psamplefilename ); 201 208 if ( pNewSample ){ … … 206 213 207 214 215 void AudioFileBrowser::on_m_pStopBtn_clicked() 216 { 217 Sample *pNewSample = Sample::load( sEmptySampleFilename ); 218 AudioEngine::get_instance()->get_sampler()->preview_sample( pNewSample, 100 ); 219 m_pStopBtn->setEnabled( false ); 220 } 221 208 222 209 223 … … 213 227 m_pselectedFile = ""; 214 228 reject(); 229 215 230 } 216 231 branches/audiofilebrowser/gui/src/AudioFileBrowser/AudioFileBrowser.h
r506 r524 57 57 void clicked( const QModelIndex& index ); 58 58 void on_m_pPlayBtn_clicked(); 59 void on_m_pStopBtn_clicked(); 59 60 void updateModelIndex(); 60 61 void on_m_pPathHometoolButton_clicked(); branches/audiofilebrowser/gui/src/AudioFileBrowser/AudioFileBrowser_UI.ui
r501 r524 44 44 <enum>QFrame::Raised</enum> 45 45 </property> 46 <widget class="QWidget" name=" " >46 <widget class="QWidget" name="layoutWidget" > 47 47 <property name="geometry" > 48 48 <rect> … … 95 95 </property> 96 96 <property name="text" > 97 <string>Pla y samples by clicking</string>98 </property> 99 </widget> 100 <widget class="QWidget" name="layoutWidget " >97 <string>Pla&y samples by clicking</string> 98 </property> 99 </widget> 100 <widget class="QWidget" name="layoutWidget2" > 101 101 <property name="geometry" > 102 102 <rect> … … 114 114 <widget class="QToolButton" name="m_pPathUptoolButton" > 115 115 <property name="text" > 116 <string> Up</string>116 <string>&Up</string> 117 117 </property> 118 118 </widget> … … 121 121 <widget class="QToolButton" name="m_pPathHometoolButton" > 122 122 <property name="text" > 123 <string> Home</string>123 <string>&Home</string> 124 124 </property> 125 125 </widget> … … 132 132 <x>360</x> 133 133 <y>490</y> 134 <width> 121</width>134 <width>91</width> 135 135 <height>26</height> 136 136 </rect> 137 137 </property> 138 138 <property name="text" > 139 <string> Play Sample</string>140 </property> 141 </widget> 142 <widget class="QWidget" name=" " >139 <string>&Play Sample</string> 140 </property> 141 </widget> 142 <widget class="QWidget" name="layoutWidget3" > 143 143 <property name="geometry" > 144 144 <rect> … … 162 162 </layout> 163 163 </widget> 164 <widget class="QWidget" name=" " >164 <widget class="QWidget" name="layoutWidget4" > 165 165 <property name="geometry" > 166 166 <rect> … … 175 175 <widget class="QCheckBox" name="useNameCheckBox" > 176 176 <property name="text" > 177 <string> Filename to instrument name</string>177 <string>&Filename to instrument name</string> 178 178 </property> 179 179 </widget> … … 199 199 </layout> 200 200 </widget> 201 <widget class="QPushButton" name="m_pStopBtn" > 202 <property name="geometry" > 203 <rect> 204 <x>460</x> 205 <y>490</y> 206 <width>75</width> 207 <height>26</height> 208 </rect> 209 </property> 210 <property name="text" > 211 <string>&Stop</string> 212 </property> 213 </widget> 201 214 </widget> 202 215 <tabstops> 203 216 <tabstop>pathLineEdit</tabstop> 217 <tabstop>m_pPathUptoolButton</tabstop> 218 <tabstop>m_pPathHometoolButton</tabstop> 204 219 <tabstop>treeView</tabstop> 205 220 <tabstop>filelineedit</tabstop> 221 <tabstop>m_pPlayBtn</tabstop> 222 <tabstop>m_pStopBtn</tabstop> 223 <tabstop>useNameCheckBox</tabstop> 206 224 <tabstop>playSamplescheckBox</tabstop> 207 225 <tabstop>openBTN</tabstop> 226 <tabstop>cancelBTN</tabstop> 208 227 </tabstops> 209 228 <resources/>
