libdrmconf  0.11.3
A library to program DMR radios.
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
Interval Class Reference

Represents a time interval. More...

#include <interval.hh>

Public Types

enum class  Format { Automatic , Milliseconds , Seconds , Minutes }
 Possible formats.
 

Public Member Functions

 Interval ()
 Default constructor.
 
constexpr Interval (const Interval &other)
 Copy constructor.
 
Intervaloperator= (const Interval &other)
 
bool isNull () const
 Test for 0.
 
bool operator== (const Interval &other) const
 
bool operator< (const Interval &other) const
 
unsigned long long milliseconds () const
 Unit conversion.
 
unsigned long long seconds () const
 Unit conversion.
 
unsigned long long minutes () const
 Unit conversion.
 
QString format (Format f=Format::Automatic) const
 Format the frequency.
 
bool parse (const QString &value)
 Parses a frequency.
 

Static Public Member Functions

static constexpr Interval fromMilliseconds (unsigned long long ms)
 
static constexpr Interval fromSeconds (unsigned long long s)
 
static constexpr Interval fromMinutes (unsigned long long min)
 

Protected Member Functions

constexpr Interval (unsigned long long ms)
 Constructor from milliseconds.
 

Detailed Description

Represents a time interval.

Member Function Documentation

◆ fromMilliseconds()

static constexpr Interval Interval::fromMilliseconds ( unsigned long long  ms)
inlinestaticconstexpr

< Unit conversion.

◆ fromMinutes()

static constexpr Interval Interval::fromMinutes ( unsigned long long  min)
inlinestaticconstexpr

< Unit conversion.

◆ fromSeconds()

static constexpr Interval Interval::fromSeconds ( unsigned long long  s)
inlinestaticconstexpr

< Unit conversion.

◆ operator<()

bool Interval::operator< ( const Interval other) const
inline

< Comparison.

◆ operator=()

Interval& Interval::operator= ( const Interval other)
inline

< Assignment.

◆ operator==()

bool Interval::operator== ( const Interval other) const
inline

< Comparison.


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