plugin: namespace everything
This commit is contained in:
parent
59d8f7602d
commit
cfc1dc447c
10 changed files with 41 additions and 1 deletions
|
|
@ -7,6 +7,8 @@
|
|||
#include <QObject>
|
||||
#include <aubio/aubio.h>
|
||||
|
||||
namespace caelestia {
|
||||
|
||||
BeatTracker::BeatTracker(uint_t sampleRate, uint_t hopSize, QObject* parent)
|
||||
: QObject(parent)
|
||||
, m_tempo(new_aubio_tempo("default", 1024, hopSize, sampleRate))
|
||||
|
|
@ -103,4 +105,6 @@ void BeatTracker::handleStateChanged(QtAudio::State state) const {
|
|||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace caelestia
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@
|
|||
#include <aubio/aubio.h>
|
||||
#include <qqmlintegration.h>
|
||||
|
||||
namespace caelestia {
|
||||
|
||||
class BeatTracker : public QObject {
|
||||
Q_OBJECT
|
||||
QML_ELEMENT
|
||||
|
|
@ -45,3 +47,5 @@ private:
|
|||
void process();
|
||||
void handleStateChanged(QtAudio::State state) const;
|
||||
};
|
||||
|
||||
} // namespace caelestia
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@
|
|||
#include <QtQuick/QQuickItem>
|
||||
#include <QtQuick/QQuickWindow>
|
||||
|
||||
namespace caelestia {
|
||||
|
||||
qreal CachingImageManager::effectiveScale() const {
|
||||
if (m_item && m_item->window()) {
|
||||
return m_item->window()->devicePixelRatio();
|
||||
|
|
@ -220,3 +222,5 @@ QString CachingImageManager::sha256sum(const QString& path) {
|
|||
|
||||
return hash.result().toHex();
|
||||
}
|
||||
|
||||
} // namespace caelestia
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@
|
|||
#include <QtQuick/QQuickItem>
|
||||
#include <qqmlintegration.h>
|
||||
|
||||
namespace caelestia {
|
||||
|
||||
class CachingImageManager : public QObject {
|
||||
Q_OBJECT
|
||||
QML_ELEMENT
|
||||
|
|
@ -59,3 +61,5 @@ private:
|
|||
void createCache(const QString& path, const QString& cache, const QString& fillMode, const QSize& size) const;
|
||||
[[nodiscard]] static QString sha256sum(const QString& path);
|
||||
};
|
||||
|
||||
} // namespace caelestia
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@
|
|||
#include <QtQuick/QQuickItemGrabResult>
|
||||
#include <QtQuick/QQuickWindow>
|
||||
|
||||
namespace caelestia {
|
||||
|
||||
void CUtils::saveItem(QQuickItem* target, const QUrl& path) {
|
||||
this->saveItem(target, path, QRect(), QJSValue(), QJSValue());
|
||||
}
|
||||
|
|
@ -346,3 +348,5 @@ QString CUtils::toLocalFile(const QUrl& url) const {
|
|||
|
||||
return url.toLocalFile();
|
||||
}
|
||||
|
||||
} // namespace caelestia
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@
|
|||
#include <qobject.h>
|
||||
#include <qqmlintegration.h>
|
||||
|
||||
namespace caelestia {
|
||||
|
||||
class CUtils : public QObject {
|
||||
Q_OBJECT
|
||||
QML_ELEMENT
|
||||
|
|
@ -37,3 +39,5 @@ private:
|
|||
QColor findDominantColour(const QImage& image, int rescaleSize) const;
|
||||
qreal findAverageLuminance(const QImage& image, int rescaleSize) const;
|
||||
};
|
||||
|
||||
} // namespace caelestia
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@
|
|||
#include <QtConcurrent>
|
||||
#include <qqmlintegration.h>
|
||||
|
||||
namespace caelestia {
|
||||
|
||||
int FileSystemModel::rowCount(const QModelIndex& parent) const {
|
||||
if (parent != QModelIndex()) {
|
||||
return 0;
|
||||
|
|
@ -366,3 +368,5 @@ bool FileSystemModel::compareEntries(const FileSystemEntry* a, const FileSystemE
|
|||
}
|
||||
return a->relativePath().localeAwareCompare(b->relativePath()) < 0;
|
||||
}
|
||||
|
||||
} // namespace caelestia
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@
|
|||
#include <QObject>
|
||||
#include <qqmlintegration.h>
|
||||
|
||||
namespace caelestia {
|
||||
|
||||
class FileSystemEntry : public QObject {
|
||||
Q_OBJECT
|
||||
QML_ELEMENT
|
||||
|
|
@ -157,3 +159,5 @@ private:
|
|||
void applyChanges(const QSet<QString>& removedPaths, const QSet<QString>& addedPaths);
|
||||
[[nodiscard]] static bool compareEntries(const FileSystemEntry* a, const FileSystemEntry* b);
|
||||
};
|
||||
|
||||
} // namespace caelestia
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@
|
|||
#include <QObject>
|
||||
#include <libqalculate/qalculate.h>
|
||||
|
||||
namespace caelestia {
|
||||
|
||||
Qalculator::Qalculator(QObject* parent)
|
||||
: QObject(parent) {
|
||||
if (!CALCULATOR) {
|
||||
|
|
@ -47,3 +49,5 @@ QString Qalculator::eval(const QString& expr, bool printExpr) const {
|
|||
|
||||
return QString::fromStdString(result);
|
||||
}
|
||||
|
||||
} // namespace caelestia
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@
|
|||
#include <QObject>
|
||||
#include <qqmlintegration.h>
|
||||
|
||||
namespace caelestia {
|
||||
|
||||
class Qalculator : public QObject {
|
||||
Q_OBJECT
|
||||
QML_ELEMENT
|
||||
|
|
@ -13,3 +15,5 @@ public:
|
|||
|
||||
Q_INVOKABLE QString eval(const QString& expr, bool printExpr = true) const;
|
||||
};
|
||||
|
||||
} // namespace caelestia
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue