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

Method getPosition

src/core/Track.cpp:1305–1312  ·  view source on GitHub ↗

! \brief Return the position of the trackContentWidget in Tacts. * * \param mouseX the mouse's current X position in pixels. */

Source from the content-addressed store, hash-verified

1303 * \param mouseX the mouse's current X position in pixels.
1304 */
1305MidiTime TrackContentWidget::getPosition( int mouseX )
1306{
1307 TrackContainerView * tv = m_trackView->trackContainerView();
1308 return MidiTime( tv->currentPosition() +
1309 mouseX *
1310 MidiTime::ticksPerTact() /
1311 static_cast<int>( tv->pixelsPerTact() ) );
1312}
1313
1314
1315

Callers

nothing calls this directly

Calls 4

MidiTimeClass · 0.85
ticksPerTactFunction · 0.85
trackContainerViewMethod · 0.45
pixelsPerTactMethod · 0.45

Tested by

no test coverage detected