mirror of
https://github.com/Bismuth-Forge/bismuth.git
synced 2024-10-05 12:37:47 +03:00
refactor(core): wrap everything with Bismuth NS
This commit is contained in:
parent
cbb674c89e
commit
e6cd2da97d
@ -16,10 +16,9 @@
|
||||
#include "plasma-api/api.hpp"
|
||||
#include "plasma-api/client.hpp"
|
||||
|
||||
class TSProxy;
|
||||
|
||||
namespace Bismuth
|
||||
{
|
||||
class TSProxy;
|
||||
|
||||
struct Action {
|
||||
Action(const QString &id, const QString &description, const QString &defaultKeybinding, std::function<void()> callback);
|
||||
|
@ -24,9 +24,12 @@ void CorePlugin::registerTypes(const char *uri)
|
||||
Q_ASSERT(uri == QLatin1String("org.kde.bismuth.core"));
|
||||
qmlRegisterModule(uri, 1, 0);
|
||||
|
||||
qmlRegisterType<Core>(uri, 1, 0, "Core");
|
||||
qmlRegisterType<Bismuth::Core>(uri, 1, 0, "Core");
|
||||
}
|
||||
|
||||
namespace Bismuth
|
||||
{
|
||||
|
||||
Core::Core(QQuickItem *parent)
|
||||
: QQuickItem(parent)
|
||||
, m_qmlEngine() // We cannot get engine from the pointer in the constructor
|
||||
@ -54,3 +57,5 @@ TSProxy *Core::tsProxy() const
|
||||
{
|
||||
return m_tsProxy.get();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -26,6 +26,9 @@ public:
|
||||
void registerTypes(const char *uri) override;
|
||||
};
|
||||
|
||||
namespace Bismuth
|
||||
{
|
||||
|
||||
class Core : public QQuickItem
|
||||
{
|
||||
Q_OBJECT
|
||||
@ -53,3 +56,5 @@ private:
|
||||
std::unique_ptr<PlasmaApi::Api> m_plasmaApi;
|
||||
std::unique_ptr<Bismuth::Engine> m_engine;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -12,6 +12,9 @@
|
||||
#include "logger.hpp"
|
||||
#include "plasma-api/api.hpp"
|
||||
|
||||
namespace Bismuth
|
||||
{
|
||||
|
||||
TSProxy::TSProxy(QQmlEngine *engine, Bismuth::Controller &controller, PlasmaApi::Api &plasmaApi, Bismuth::Config &config)
|
||||
: QObject()
|
||||
, m_engine(engine)
|
||||
@ -147,3 +150,5 @@ QJSValue TSProxy::jsController()
|
||||
{
|
||||
return m_jsController;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -11,6 +11,9 @@
|
||||
#include "controller.hpp"
|
||||
#include "plasma-api/api.hpp"
|
||||
|
||||
namespace Bismuth
|
||||
{
|
||||
|
||||
/**
|
||||
* Proxy object for the legacy TS backend.
|
||||
*/
|
||||
@ -51,3 +54,5 @@ private:
|
||||
PlasmaApi::Api &m_plasmaApi;
|
||||
QJSValue m_jsController;
|
||||
};
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user