moment/src/utils.h

32 lines
523 B
C
Raw Normal View History

2019-12-19 07:46:16 -04:00
// SPDX-License-Identifier: LGPL-3.0-or-later
2019-12-17 18:50:21 -04:00
// The Utils class exposes various useful functions for QML that aren't
2019-12-27 08:19:56 -04:00
// provided by the `Qt` object.
2019-12-17 18:50:21 -04:00
#ifndef UTILS_H
#define UTILS_H
2019-12-27 08:19:56 -04:00
#include <QColor>
#include <QLocale>
2019-12-27 08:19:56 -04:00
#include <QObject>
class Utils : public QObject {
Q_OBJECT
public:
Utils();
public slots:
QString formattedBytes(qint64 bytes, int precision = 2);
2019-12-04 06:22:04 -04:00
QString uuid();
2019-12-27 08:19:56 -04:00
QColor hsluv(qreal hue, qreal saturation, qreal luv, qreal alpha = 1.0);
private:
QLocale m_locale;
};
#endif