Logo Search packages:      
Sourcecode: rosegarden version File versions

Rosegarden::SnapGrid Class Reference

#include <SnapGrid.h>

List of all members.

Detailed Description

SnapGrid is a class that maps x-coordinate onto time, using a RulerScale to get the mapping but constraining the results to a discrete set of suitable times.

(It also snaps y-coordinates, but that bit isn't very interesting.)

Definition at line 37 of file SnapGrid.h.

Public Types

enum  SnapDirection { SnapEither, SnapLeft, SnapRight }

Public Member Functions

const RulerScalegetRulerScale () const
RulerScalegetRulerScale ()
timeT getSnapSetting () const
timeT getSnapTime (timeT t) const
timeT getSnapTime (double x) const
int getYBin (int y) const
int getYBinCoordinate (int bin) const
int getYSnap () const
void setSnapTime (timeT snap)
 SnapGrid (RulerScale *rulerScale, int vstep=0)
timeT snapTime (timeT t, SnapDirection d=SnapEither) const
timeT snapX (double x, SnapDirection d=SnapEither) const
int snapY (int y) const

Static Public Attributes

static const timeT NoSnap = -1
static const timeT SnapToBar = -2
static const timeT SnapToBeat = -3
static const timeT SnapToUnit = -4

Protected Attributes

timeT m_snapTime
int m_vstep

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index