| 174 | |
| 175 | |
| 176 | void AutomatableModelViewSlots::execConnectionDialog() |
| 177 | { |
| 178 | // TODO[pg]: Display a dialog with list of controllers currently in the song |
| 179 | // in addition to any system MIDI controllers |
| 180 | AutomatableModel* m = m_amv->modelUntyped(); |
| 181 | |
| 182 | m->displayName(); |
| 183 | ControllerConnectionDialog d( gui->mainWindow(), m ); |
| 184 | |
| 185 | if( d.exec() == 1 ) |
| 186 | { |
| 187 | // Actually chose something |
| 188 | if( d.chosenController() ) |
| 189 | { |
| 190 | // Update |
| 191 | if( m->controllerConnection() ) |
| 192 | { |
| 193 | m->controllerConnection()->setController( d.chosenController() ); |
| 194 | } |
| 195 | // New |
| 196 | else |
| 197 | { |
| 198 | ControllerConnection* cc = new ControllerConnection( d.chosenController() ); |
| 199 | m->setControllerConnection( cc ); |
| 200 | //cc->setTargetName( m->displayName() ); |
| 201 | } |
| 202 | } |
| 203 | // no controller, so delete existing connection |
| 204 | else |
| 205 | { |
| 206 | removeConnection(); |
| 207 | } |
| 208 | } |
| 209 | } |
| 210 | |
| 211 | |
| 212 |
nothing calls this directly
no test coverage detected