2019-11-17 23:09:11 +01:00
|
|
|
/*
|
|
|
|
Copyright (C) 2019 Filippo Cucchetto.
|
|
|
|
Contact: https://github.com/filcuc/dotherside
|
|
|
|
|
|
|
|
This file is part of the DOtherSide library.
|
|
|
|
|
|
|
|
The DOtherSide library is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU Lesser General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the license, or (at your opinion) any later version.
|
|
|
|
|
|
|
|
The DOtherSide library is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU Lesser General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Lesser General Public License
|
|
|
|
along with the DOtherSide library. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2015-07-08 22:55:38 +02:00
|
|
|
#pragma once
|
2014-07-19 18:26:08 +02:00
|
|
|
|
2016-01-07 12:04:40 +01:00
|
|
|
// Qt
|
2018-03-29 23:25:33 +02:00
|
|
|
#include <QtCore/QObject>
|
2015-12-28 13:21:02 +01:00
|
|
|
#include <functional>
|
2016-01-07 12:04:40 +01:00
|
|
|
// DOtherSide
|
2015-12-29 11:21:49 +01:00
|
|
|
#include "DOtherSideTypesCpp.h"
|
2016-01-23 18:40:17 +01:00
|
|
|
#include "DOtherSide/DosIQObjectImpl.h"
|
2014-12-24 14:30:41 +01:00
|
|
|
|
2016-02-27 15:07:23 +01:00
|
|
|
namespace DOS {
|
2014-07-19 18:26:08 +02:00
|
|
|
|
2016-01-04 23:03:57 +01:00
|
|
|
/// This class model a QObject
|
2016-01-23 18:40:17 +01:00
|
|
|
class DosQObject : public QObject, public DosIQObjectImpl
|
2015-12-28 13:21:02 +01:00
|
|
|
{
|
|
|
|
public:
|
2016-01-04 23:03:57 +01:00
|
|
|
/// Constructor
|
2018-10-07 17:31:33 +02:00
|
|
|
DosQObject(void *dObjectPointer, DosIQMetaObjectPtr metaObject, DObjectCallback dObjectCallback);
|
2014-12-24 14:30:41 +01:00
|
|
|
|
2016-01-04 23:03:57 +01:00
|
|
|
/// Emit a signal
|
2016-03-28 21:36:34 +02:00
|
|
|
bool emitSignal(QObject *emitter, const QString &name, const std::vector<QVariant> &arguments) override;
|
2016-01-04 23:03:57 +01:00
|
|
|
|
2016-01-16 20:19:48 +01:00
|
|
|
/// Return the metaObject
|
2016-02-27 15:07:23 +01:00
|
|
|
const QMetaObject *metaObject() const override;
|
2016-01-16 20:19:48 +01:00
|
|
|
|
|
|
|
/// The qt_metacall
|
|
|
|
int qt_metacall(QMetaObject::Call, int, void **) override;
|
2014-12-24 14:30:41 +01:00
|
|
|
|
2016-01-04 23:03:57 +01:00
|
|
|
private:
|
2016-01-23 18:40:17 +01:00
|
|
|
std::unique_ptr<DosIQObjectImpl> m_impl;
|
2014-07-19 18:26:08 +02:00
|
|
|
};
|
2015-02-04 23:02:26 +01:00
|
|
|
|
2015-12-28 13:21:02 +01:00
|
|
|
} // namespace DOS
|