MCPcopy Create free account
hub / github.com/LMMS/lmms / execConnectionDialog

Method execConnectionDialog

src/gui/AutomatableModelView.cpp:176–209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174
175
176void 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

Callers

nothing calls this directly

Calls 4

chosenControllerMethod · 0.80
displayNameMethod · 0.45
setControllerMethod · 0.45

Tested by

no test coverage detected