Logo Search packages:      
Sourcecode: rosegarden version File versions  Download package

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 39 of file SnapGrid.h.

Public Types

enum  SnapDirection { SnapEither, SnapLeft, SnapRight }

Public Member Functions

int getBinHeightMultiple (int bin)
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 setBinHeightMultiple (int bin, int multiple)
void setSnapTime (timeT snap)
void setYSnap (int ysnap)
 SnapGrid (RulerScale *rulerScale, int ysnap=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
std::map< int, int > m_ymultiple
int m_ysnap

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

Generated by  Doxygen 1.6.0   Back to index