Changeset 261

Show
Ignore:
Timestamp:
01/06/10 09:59:20 (8 months ago)
Author:
deu
Message:

CLOSED - issue QREST-15: Move to Constants
 http://requests.wardsback.org/browse/QREST-15

Location:
branches/v0.5/src
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • branches/v0.5/src/constants.h

    r259 r261  
    7979    static const int STATUSBAR_TEMP_TIMEOUT = 1500; 
    8080 
     81    //Constants used for default tempo value and limits 
     82 
     83    /** Default tempo for app startup */ 
     84    static const double TEMPO_DEFAULT = 60.0; 
     85    /** Minimum allowed tempo as input. */ 
     86    static const double TEMPO_MIN = 1.0; 
     87    /** Maximum allowed tempo as input. */ 
     88    static const double TEMPO_MAX = 999.0; 
     89 
    8190}; 
    8291 
  • branches/v0.5/src/model/document.cpp

    r260 r261  
    3030 
    3131Document::Document() : 
    32     _tempo(TEMPO_DEFAULT), _steady(true), _steadiness(FULL_STEADINESS), 
     32    _tempo(Constants::TEMPO_DEFAULT), _steady(true), _steadiness(FULL_STEADINESS), 
    3333            _tempoFromTap(false), _multiplier(MULTIPLIER_PLAIN) { 
    3434 
     
    7474void Document::setTempo(const double tempo) { 
    7575 
    76     if ((TEMPO_MIN <= tempo && tempo <= TEMPO_MAX)) { 
     76    if ((Constants::TEMPO_MIN <= tempo && tempo <= Constants::TEMPO_MAX)) { 
    7777 
    7878        _tempo = tempo; 
  • branches/v0.5/src/model/document.h

    r260 r261  
    237237    static const int DELAYS_COUNT = 6; 
    238238 
    239     //Constants used for default tempo value and limits 
    240  
    241     /** Default tempo for app startup */ 
    242     static const double TEMPO_DEFAULT = 60.0; 
    243     /** Minimum allowed tempo as input. */ 
    244     static const double TEMPO_MIN = 1.0; 
    245     /** Maximum allowed tempo as input. */ 
    246     static const double TEMPO_MAX = 999.0; 
    247  
    248239    /** complete steadiness is expressed as 1 as a double */ 
    249240    static const double FULL_STEADINESS = 1.0;