libdrmconf 0.14.0
A library to program DMR radios.
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Level Class Reference

Some simple class implementing a [1-10] level setting. More...

#include <level.hh>

Public Member Functions

 Level ()
 Default constructor.
 
constexpr Level (const Level &other)
 
Leveloperator= (const Level &other)=default
 
bool isNull () const
 Test for 0.
 
bool isInvalid () const
 Test for invalid level.
 
bool isFinite () const
 Test for finite values.
 
bool operator== (const Level &other) const
 
bool operator< (const Level &other) const
 
bool operator<= (const Level &other) const
 
bool operator> (const Level &other) const
 
bool operator>= (const Level &other) const
 
unsigned int value () const
 Returns the value of the level.
 
unsigned int mapTo (const Codeplug::Element::Limit::Range< unsigned int > &range) const
 
QString format () const
 Format the frequency.
 
bool parse (const QString &value)
 Parses a frequency.
 

Static Public Member Functions

static constexpr Level null ()
 Constructs null level.
 
static constexpr Level invalid ()
 Constructs an invalid level.
 
static constexpr Level fromValue (unsigned int value, const Codeplug::Element::Limit::Range< unsigned int > range={1, 10})
 Constructs a proper level.
 

Protected Member Functions

constexpr Level (unsigned int value)
 Constructor from value.
 

Protected Attributes

unsigned int _level
 The actual level value.
 

Detailed Description

Some simple class implementing a [1-10] level setting.

Also supports the "values" null and invalid.

Member Function Documentation

◆ operator<()

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

< Comparison.

◆ operator<=()

bool Level::operator<= ( const Level other) const
inline

< Comparison.

◆ operator==()

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

< Comparison.

◆ operator>()

bool Level::operator> ( const Level other) const
inline

< Comparison.

◆ operator>=()

bool Level::operator>= ( const Level other) const
inline

< Comparison.


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