Esempio n. 1
0
 /**
  * Constructor
  * @param \Runalyze\View\Activity\Context $Context
  */
 public function __construct(\Runalyze\View\Activity\Context $Context)
 {
     if ($Context->hasRoute()) {
         $upDown = '+' . ElevationBase::format($Context->route()->elevationUp(), false) . '/-' . ElevationBase::format($Context->route()->elevationDown(), false);
     } else {
         $upDown = '+' . ElevationBase::format($Context->activity()->elevation(), false) . '/-' . ElevationBase::format($Context->activity()->elevation(), false);
     }
     parent::__construct($upDown, Configuration::General()->distanceUnitSystem()->elevationUnit(), __('Elevation up/down'));
 }
Esempio n. 2
0
 /**
  * Constructor
  * @param \Runalyze\View\Activity\Context $Context
  */
 public function __construct(\Runalyze\View\Activity\Context $Context)
 {
     $Pace = clone $Context->dataview()->pace();
     if (Configuration::General()->distanceUnitSystem()->isImperial()) {
         $Pace->setUnit(new PaceUnit\MinPerMile());
     } else {
         $Pace->setUnit(new PaceUnit\MinPerKilometer());
     }
     parent::__construct($Pace->value(), $Pace->appendix(), 'ø ' . __('Pace'));
 }
Esempio n. 3
0
 /**
  * Constructor
  * @param \Runalyze\View\Activity\Context $Context
  */
 public function __construct(\Runalyze\View\Activity\Context $Context)
 {
     $WindChillFactor = $Context->dataview()->windChillFactor();
     parent::__construct(round($WindChillFactor->valueInPreferredUnit()), $WindChillFactor->unit(), $WindChillFactor->label());
 }
Esempio n. 4
0
 /**
  * Constructor
  * @param \Runalyze\View\Activity\Context $Context
  */
 public function __construct(\Runalyze\View\Activity\Context $Context)
 {
     $leftRight = $Context->activity()->groundContactBalanceLeft() / 100 . 'L/' . $Context->activity()->groundContactBalanceRight() / 100 . 'R';
     parent::__construct($leftRight, '%', __('Ground Contact Balance'));
 }
Esempio n. 5
0
 /**
  * Constructor
  * @param \Runalyze\View\Activity\Context $Context
  */
 public function __construct(\Runalyze\View\Activity\Context $Context)
 {
     $WindDirection = $Context->activity()->weather()->windDegree();
     $CardinalDirection = CardinalDirection::getDirection($WindDirection->value());
     parent::__construct(\Helper::Unknown($CardinalDirection . ' / ' . $WindDirection->string(false), '-'), $WindDirection->unit(), $WindDirection->label());
 }
Esempio n. 6
0
 /**
  * Constructor
  * @param \Runalyze\View\Activity\Context $Context
  */
 public function __construct(\Runalyze\View\Activity\Context $Context)
 {
     $humidity = $Context->activity()->weather()->humidity();
     parent::__construct(\Helper::Unknown($humidity->string(false), '-'), $humidity->unit(), $humidity->label());
 }
Esempio n. 7
0
 /**
  * Constructor
  * @param \Runalyze\View\Activity\Context $Context
  */
 public function __construct(\Runalyze\View\Activity\Context $Context)
 {
     parent::__construct(\Runalyze\Activity\GroundcontactBalance::format($Context->activity()->groundContactBalance(), false), '%', __('Ground Contact Balance'));
 }
Esempio n. 8
0
 /**
  * Constructor
  * @param \Runalyze\View\Activity\Context $Context
  */
 public function __construct(\Runalyze\View\Activity\Context $Context)
 {
     $Distance = new \Runalyze\Activity\Distance($Context->activity()->distance());
     parent::__construct(\Helper::Unknown(round($Distance->valueInPreferredUnit(), 2), '-'), $Distance->unit(), $Distance->label());
 }
Esempio n. 9
0
 /**
  * Constructor
  * @param \Runalyze\View\Activity\Context $Context
  */
 public function __construct(\Runalyze\View\Activity\Context $Context)
 {
     $PoolLength = new Activity\PoolLength($Context->swimdata()->poollength());
     parent::__construct(\Helper::Unknown($PoolLength->valueInPreferredUnit(), '-'), $PoolLength->unit(), $PoolLength->label());
 }
Esempio n. 10
0
 /**
  * Constructor
  * @param \Runalyze\View\Activity\Context $Context
  */
 public function __construct(\Runalyze\View\Activity\Context $Context)
 {
     $StrideLength = $Context->dataview()->strideLength();
     parent::__construct(\Helper::Unknown($StrideLength->valueInPreferredUnit(), '-'), $StrideLength->unit(), $StrideLength->label());
 }
Esempio n. 11
0
 /**
  * @author WN
  * @param int|null $color
  * @param int|null $option
  * @param int|null $bgcolor
  * @param string|null $default
  */
 protected function __construct($color = null, $option = null, $bgcolor = null, $default = null)
 {
     $width = (int) exec('tput cols');
     $height = (int) exec('tput lines');
     parent::__construct($width, $height, $color, $option, $bgcolor, $default);
 }
Esempio n. 12
0
 /**
  * Constructor
  * @param \Runalyze\View\Activity\Context $Context
  */
 public function __construct(\Runalyze\View\Activity\Context $Context)
 {
     $Elevation = $Context->dataview()->elevation();
     parent::__construct(\Helper::Unknown($Elevation->valueInPreferredUnit(), '-'), $Elevation->unit(), $Elevation->label());
 }
Esempio n. 13
0
 /**
  * Constructor
  * @param \Runalyze\View\Activity\Context $Context
  */
 public function __construct(\Runalyze\View\Activity\Context $Context)
 {
     parent::__construct(\Helper::Unknown(\Runalyze\Activity\VerticalRatio::format($Context->activity()->verticalRatio(), false), '-'), '%', __('Vertical Ratio'));
 }
Esempio n. 14
0
 /**
  * Constructor
  * @param \Runalyze\View\Activity\Context $Context
  */
 public function __construct(\Runalyze\View\Activity\Context $Context)
 {
     parent::__construct(\Helper::Unknown(substr($Context->dataview()->gradientInPercent(), 0, -11), '-'), '%', __('ø Gradient'));
 }
Esempio n. 15
0
 /**
  * Constructor
  * @param \Runalyze\View\Activity\Context $Context
  */
 public function __construct(\Runalyze\View\Activity\Context $Context)
 {
     $Pace = $Context->dataview()->pace();
     parent::__construct($Pace->value(), $Pace->appendix(), 'ø ' . ($Pace->unit()->isTimeFormat() ? __('Pace') : __('Speed')));
 }