Dokit
Internal development documentation
Loading...
Searching...
No Matches
ResistanceRange Namespace Reference

Encapsulates convenience functions for working with resistance ranges. More...

Functions

QString toString (const PokitProduct product, const quint8 range)
 Returns product's current range as a human-friendly string.
 
QVariant maxValue (const PokitProduct product, const quint8 range)
 Returns the maximum value for product's range in (integer) ohms, or the string "Auto".
 

Detailed Description

Encapsulates convenience functions for working with resistance ranges.

Function Documentation

◆ maxValue()

QTPOKIT_EXPORT QVariant ResistanceRange::maxValue ( const PokitProduct product,
const quint8 range )

Returns the maximum value for product's range in (integer) ohms, or the string "Auto".

If range is not a known valid value, then an null QVariant is returned.

See also
PokitMeter::maxValue(const PokitMeter::ResistanceRange &range)
PokitPro::maxValue(const PokitPro::ResistanceRange &range)

Definition at line 253 of file pokitproducts.cpp.

254{
255 switch (product) {
257 return PokitMeter::maxValue(static_cast<PokitMeter::ResistanceRange>(range));
259 return PokitPro::maxValue(static_cast<PokitPro::ResistanceRange>(range));
260 }
261 qCWarning(lc).noquote() << QCoreApplication::translate("ResistanceRange",
262 "Unknown PokitProduct value: %1", "maxValue").arg((int)product);
263 return QVariant();
264}
QTPOKIT_EXPORT QVariant maxValue(const CurrentRange &range)
Returns the maximum value for range in (integer) microamps, or the string "Auto".
ResistanceRange
Values supported by the Pokit Meter's Range attributes in Resistance mode.
Definition pokitmeter.h:34
QTPOKIT_EXPORT QVariant maxValue(const CapacitanceRange &range)
Returns the maximum value for range in (integer) nanofarads, or the string "Auto".
Definition pokitpro.cpp:40
ResistanceRange
Values supported by the Pokit Pro's Range attributes in Resistance mode.
Definition pokitpro.h:47
@ PokitPro
Pokit Pro.
@ PokitMeter
Pokit Meter.
QString translate(const char *context, const char *sourceText, const char *disambiguation, int n)
QString arg(qlonglong a, int fieldWidth, int base, QChar fillChar) const const

References QString::arg(), PokitPro::maxValue(), PokitMeter::maxValue(), PokitMeter, PokitPro, and QCoreApplication::translate().

Referenced by MultimeterService::maxValue().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toString()

QTPOKIT_EXPORT QString ResistanceRange::toString ( const PokitProduct product,
const quint8 range )

Returns product's current range as a human-friendly string.

See also
PokitMeter::toString(const PokitMeter::ResistanceRange &range)
PokitPro::toString(const PokitPro::ResistanceRange &range)

Definition at line 233 of file pokitproducts.cpp.

234{
235 switch (product) {
237 return PokitMeter::toString(static_cast<PokitMeter::ResistanceRange>(range));
239 return PokitPro::toString(static_cast<PokitPro::ResistanceRange>(range));
240 }
241 qCWarning(lc).noquote() << QCoreApplication::translate("ResistanceRange",
242 "Unknown PokitProduct value: %1", "toString").arg((int)product);
243 return QString();
244}
QTPOKIT_EXPORT QString toString(const CurrentRange &range)
Returns range as a user-friendly string.
QTPOKIT_EXPORT QString toString(const CapacitanceRange &range)
Returns range as a user-friendly string.
Definition pokitpro.cpp:25

References QString::arg(), PokitMeter, PokitPro, PokitPro::toString(), PokitMeter::toString(), and QCoreApplication::translate().

Referenced by MultimeterService::toString().

Here is the call graph for this function:
Here is the caller graph for this function: