proposed fix 821 Range-select in Song Editor

This commit is contained in:
Dave French
2015-01-18 19:16:43 +00:00
parent ebf68d57a9
commit b3d943920c
3 changed files with 40 additions and 2 deletions

View File

@@ -35,6 +35,7 @@ class QPixmap;
class QToolBar;
class NStateButton;
class TextFloat;
class SongEditor;
class TimeLineWidget : public QWidget, public JournallingObject
@@ -171,6 +172,8 @@ private:
TextFloat * m_hint;
SongEditor *m_songEditor;
int m_initalXSelect;
enum actions
@@ -178,7 +181,8 @@ private:
NoAction,
MovePositionMarker,
MoveLoopBegin,
MoveLoopEnd
MoveLoopEnd,
SelectSongTCO,
} m_action;
int m_moveXOff;

View File

@@ -92,6 +92,26 @@ public:
return( QVector<selectableObject *>() );
}
///
/// \brief selectRegionFromPixels
/// \param x
/// \param y
/// Use the rubber band to select TCO from all tracks using x, y pixels
void selectRegionFromPixels(int x, int y)
{
m_rubberBand->setEnabled( true );
m_rubberBand->show();
m_rubberBand->setGeometry( min( x, y ), 0, max( x, y ) - min( x, y ), std::numeric_limits<int>::max() );
}
///
/// \brief stopRubberBand
/// Removes the rubber band from display when finished with.
void stopRubberBand()
{
m_rubberBand->hide();
m_rubberBand->setEnabled( false );
}
TrackContainer* model()
{