bpmdetect 0.8.11
Automatic BPM detection tool
Loading...
Searching...
No Matches
utils.h File Reference
#include <QtCore/QCommandLineParser>
#include <QtCore/QCoreApplication>
#include <QtCore/QSpan>
#include <QtCore/QString>
Include dependency graph for utils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef double bpmtype

Functions

template<typename T>
QSpan< T > unsafeSpan (T *pointer, qsizetype size)
bpmtype stringToBpm (const QString &sBpm)
QString bpmToString (bpmtype dBpm, const QString &format=QStringLiteral("0.00"))
void parseCommandLine (QCommandLineParser &parser, const QCoreApplication &app)

Typedef Documentation

◆ bpmtype

typedef double bpmtype

BPM type.

Function Documentation

◆ bpmToString()

QString bpmToString ( bpmtype dBpm,
const QString & format = QStringLiteral("0.00") )

Convert BPM to QString using selected format.

Parameters
dBpmBPM value.
formatFormat (default "0.00", other possible values: "0.0", "0", "000.00", "000.0", "000", and "00000").
Returns
Formatted BPM string.

◆ parseCommandLine()

void parseCommandLine ( QCommandLineParser & parser,
const QCoreApplication & app )

Parse command line.

Adds options to the parser and processes the command line arguments.

Parameters
parserCommand line parser.
appApplication instance.

◆ stringToBpm()

bpmtype stringToBpm ( const QString & sBpm)

Convert QString to BPM.

Parameters
sBpmBPM string.
Returns
BPM value.

◆ unsafeSpan()

template<typename T>
QSpan< T > unsafeSpan ( T * pointer,
qsizetype size )

Get a QSpan that will not be flagged by -Wunsafe-buffer-usage.

Parameters
pointerPointer to the data.
sizeNumber of elements in the span.
Returns
The constructed QSpan.