#pragma once
#include <memory>
#include <mutex>
namespace rust::cxxqtlib1 {
template<typename T>
class CxxQtThread;
}
namespace cxx_qt::my_object {
class MyObject;
using MyObjectCxxQtThread = rust::cxxqtlib1::CxxQtThread<MyObject>;
}
#include "cxx-qt-gen/ffi.cxx.h"
namespace cxx_qt::my_object {
class MyObject : public QObject
{
Q_OBJECT
public:
explicit MyObject(QObject* parent = nullptr);
~MyObject();
const MyObjectRust& unsafeRust() const;
MyObjectRust& unsafeRustMut();
std::unique_ptr<MyObjectCxxQtThread> qtThread() const;
public:
Q_INVOKABLE void invokable();
void emitReady();
void emitDataChanged(qint32 first,
::std::unique_ptr<Opaque> second,
QPoint third,
const QPoint& fourth);
Q_SIGNALS:
void ready();
void dataChanged(qint32 first,
Value second,
QPoint third,
const QPoint& fourth);
private:
rust::Box<MyObjectRust> m_rustObj;
std::shared_ptr<std::recursive_mutex> m_rustObjMutex;
std::shared_ptr<rust::cxxqtlib1::CxxQtGuardedPointer<MyObject>>
m_cxxQtThreadObj;
};
static_assert(std::is_base_of<QObject, MyObject>::value,
"MyObject must inherit from QObject");
}
namespace cxx_qt::my_object::cxx_qt_my_object {
std::unique_ptr<MyObject>
newCppObject();
}
Q_DECLARE_METATYPE(cxx_qt::my_object::MyObject*)