Added automoc

This commit is contained in:
Atul R 2019-06-07 21:41:08 +02:00
parent 98494f50d6
commit 5987ef7eca
11 changed files with 407 additions and 39 deletions

View File

@ -1,15 +1,16 @@
# AUTOGENERATED FILE. DO NOT MODIFY . ALL CHANGES WILL BE LOST
# RUN: npm run automoc after updating moc.json
{
"includes": [],
"target_defaults": {
"sources": [
"../src/cpp/QtGui/QWidget/nwidget_moc.cpp",
"../src/cpp/QtWidgets/QLabel/nlabel_moc.cpp",
"../src/cpp/QtWidgets/QCheckBox/ncheckbox_moc.cpp",
"../src/cpp/QtWidgets/QLineEdit/nlineedit_moc.cpp",
"../src/cpp/QtWidgets/QMainWindow/nmainwindow_moc.cpp",
"../src/cpp/QtWidgets/QProgressBar/nprogressbar_moc.cpp",
"../src/cpp/QtWidgets/QPushButton/npushbutton_moc.cpp",
"../src/cpp/QtWidgets/QRadioButton/nradiobutton_moc.cpp"
"../src/cpp/autogen/nwidget_moc.cpp",
"../src/cpp/autogen/nlabel_moc.cpp",
"../src/cpp/autogen/ncheckbox_moc.cpp",
"../src/cpp/autogen/nlineedit_moc.cpp",
"../src/cpp/autogen/nmainwindow_moc.cpp",
"../src/cpp/autogen/nprogressbar_moc.cpp",
"../src/cpp/autogen/npushbutton_moc.cpp",
"../src/cpp/autogen/nradiobutton_moc.cpp"
]
}
}
}

13
config/moc.json Normal file
View File

@ -0,0 +1,13 @@
{
"include": "src/cpp/core/YogaWidget/yogawidget.h",
"headers": [
"src/cpp/QtGui/QWidget/nwidget.h",
"src/cpp/QtWidgets/QLabel/nlabel.h",
"src/cpp/QtWidgets/QCheckBox/ncheckbox.h",
"src/cpp/QtWidgets/QLineEdit/nlineedit.h",
"src/cpp/QtWidgets/QMainWindow/nmainwindow.h",
"src/cpp/QtWidgets/QProgressBar/nprogressbar.h",
"src/cpp/QtWidgets/QPushButton/npushbutton.h",
"src/cpp/QtWidgets/QRadioButton/nradiobutton.h"
]
}

View File

@ -2,38 +2,66 @@ const path = require("path");
const fs = require("fs");
const process = require("child_process");
const parseMocGypi = () => {
const MOC_GYPI_PATH = path.resolve(__dirname, "../config/moc.gypi");
const fileText = fs.readFileSync(MOC_GYPI_PATH);
return JSON.parse(fileText);
const ROOT_DIR = path.resolve(__dirname, "../");
const MOC_AUTOGEN_DIR = path.resolve(ROOT_DIR, "src/cpp/autogen");
const MOC_GYPI_FILE = path.resolve(ROOT_DIR, "config/moc.gypi");
const getConfig = () => {
const configFilePath = path.resolve(ROOT_DIR, "config/moc.json");
return JSON.parse(fs.readFileSync(configFilePath));
};
const generateCommand = (headerFilePath, includeFilePath) => {
const infilePath = path.resolve(ROOT_DIR, headerFilePath);
const parsed = path.parse(infilePath);
const outfilePath = path.format({
dir: MOC_AUTOGEN_DIR,
name: `${parsed.name}_moc`,
ext: ".cpp"
});
const command = `moc ${infilePath} -o ${outfilePath} --include ${includeFilePath}`;
return {
command,
infilePath,
outfilePath
};
};
const generateMocGypiFile = outFilePaths => {
const sources = outFilePaths.map(eachOutFilePath => {
return path.relative(path.parse(MOC_GYPI_FILE).dir, eachOutFilePath);
});
const gypiConfig = {
target_defaults: {
sources: sources
}
};
const comment = `# AUTOGENERATED FILE. DO NOT MODIFY . ALL CHANGES WILL BE LOST\n# RUN: npm run automoc after updating moc.json\n`;
console.log("Updating moc.gypi...");
const fileContent = JSON.stringify(gypiConfig, null, 4);
fs.writeFileSync(MOC_GYPI_FILE, comment.concat(fileContent));
console.log("Updated moc.gypi");
};
const main = () => {
const includeFilePath = path.resolve(
__dirname,
"../src/cpp/core/YogaWidget/yogawidget.h"
);
const config = parseMocGypi();
const mocFiles = config["target_defaults"]["sources"];
mocFiles.forEach(eachMocFilePath => {
const parsed = path.parse(eachMocFilePath);
const possibleOriginalHeaderFile = path.format({
...parsed,
name: parsed.name.replace("_moc", ""),
ext: ".h",
base: undefined
});
const infile = path.resolve(__dirname, possibleOriginalHeaderFile);
const outfile = path.resolve(__dirname, eachMocFilePath);
const command = `moc ${infile} -o ${outfile} --include ${includeFilePath}`;
const config = getConfig();
const includeFilePath = path.resolve(ROOT_DIR, config.include);
const outFiles = config.headers.map(eachHeaderPath => {
const { command, outfilePath } = generateCommand(
eachHeaderPath,
includeFilePath
);
console.log(command);
process.exec(command, (error, stdout, stderr) => {
process.exec(command, error => {
if (error) {
console.error(`exec error: ${error}`);
return;
}
});
return outfilePath;
});
generateMocGypiFile(outFiles);
};
main();

View File

@ -6,7 +6,7 @@
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include "ncheckbox.h"
#include "../QtWidgets/QCheckBox/ncheckbox.h"
#include <QtCore/qbytearray.h>
#include <QtCore/qmetatype.h>
#if !defined(Q_MOC_OUTPUT_REVISION)

View File

@ -6,7 +6,7 @@
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include "nlabel.h"
#include "../QtWidgets/QLabel/nlabel.h"
#include <QtCore/qbytearray.h>
#include <QtCore/qmetatype.h>
#if !defined(Q_MOC_OUTPUT_REVISION)

View File

@ -6,7 +6,7 @@
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include "nlineedit.h"
#include "../QtWidgets/QLineEdit/nlineedit.h"
#include <QtCore/qbytearray.h>
#include <QtCore/qmetatype.h>
#if !defined(Q_MOC_OUTPUT_REVISION)

View File

@ -6,7 +6,7 @@
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include "nmainwindow.h"
#include "../QtWidgets/QMainWindow/nmainwindow.h"
#include <QtCore/qbytearray.h>
#include <QtCore/qmetatype.h>
#if !defined(Q_MOC_OUTPUT_REVISION)

View File

@ -6,7 +6,7 @@
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include "nprogressbar.h"
#include "../QtWidgets/QProgressBar/nprogressbar.h"
#include <QtCore/qbytearray.h>
#include <QtCore/qmetatype.h>
#if !defined(Q_MOC_OUTPUT_REVISION)

View File

@ -6,7 +6,7 @@
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include "npushbutton.h"
#include "../QtWidgets/QPushButton/npushbutton.h"
#include <QtCore/qbytearray.h>
#include <QtCore/qmetatype.h>
#if !defined(Q_MOC_OUTPUT_REVISION)

View File

@ -6,7 +6,7 @@
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include "nradiobutton.h"
#include "../QtWidgets/QRadioButton/nradiobutton.h"
#include <QtCore/qbytearray.h>
#include <QtCore/qmetatype.h>
#if !defined(Q_MOC_OUTPUT_REVISION)

View File

@ -0,0 +1,326 @@
/****************************************************************************
** Meta object code from reading C++ file 'nwidget.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.12.1)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include "../QtGui/QWidget/nwidget.h"
#include <QtCore/qbytearray.h>
#include <QtCore/qmetatype.h>
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'nwidget.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 67
#error "This file was generated using the moc from 5.12.1. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
struct qt_meta_stringdata_NWidget_t {
QByteArrayData data[45];
char stringdata0[485];
};
#define QT_MOC_LITERAL(idx, ofs, len) \
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
qptrdiff(offsetof(qt_meta_stringdata_NWidget_t, stringdata0) + ofs \
- idx * sizeof(QByteArrayData)) \
)
static const qt_meta_stringdata_NWidget_t qt_meta_stringdata_NWidget = {
{
QT_MOC_LITERAL(0, 0, 7), // "NWidget"
QT_MOC_LITERAL(1, 8, 7), // "display"
QT_MOC_LITERAL(2, 16, 10), // "alignItems"
QT_MOC_LITERAL(3, 27, 12), // "alignContent"
QT_MOC_LITERAL(4, 40, 9), // "alignSelf"
QT_MOC_LITERAL(5, 50, 14), // "justifyContent"
QT_MOC_LITERAL(6, 65, 9), // "direction"
QT_MOC_LITERAL(7, 75, 13), // "flexDirection"
QT_MOC_LITERAL(8, 89, 8), // "overflow"
QT_MOC_LITERAL(9, 98, 8), // "position"
QT_MOC_LITERAL(10, 107, 8), // "flexWrap"
QT_MOC_LITERAL(11, 116, 4), // "flex"
QT_MOC_LITERAL(12, 121, 8), // "flexGrow"
QT_MOC_LITERAL(13, 130, 10), // "flexShrink"
QT_MOC_LITERAL(14, 141, 11), // "aspectRatio"
QT_MOC_LITERAL(15, 153, 3), // "top"
QT_MOC_LITERAL(16, 157, 5), // "right"
QT_MOC_LITERAL(17, 163, 6), // "bottom"
QT_MOC_LITERAL(18, 170, 4), // "left"
QT_MOC_LITERAL(19, 175, 9), // "flexBasis"
QT_MOC_LITERAL(20, 185, 8), // "minWidth"
QT_MOC_LITERAL(21, 194, 9), // "minHeight"
QT_MOC_LITERAL(22, 204, 8), // "maxWidth"
QT_MOC_LITERAL(23, 213, 9), // "maxHeight"
QT_MOC_LITERAL(24, 223, 10), // "paddingTop"
QT_MOC_LITERAL(25, 234, 12), // "paddingRight"
QT_MOC_LITERAL(26, 247, 13), // "paddingBottom"
QT_MOC_LITERAL(27, 261, 11), // "paddingLeft"
QT_MOC_LITERAL(28, 273, 17), // "paddingHorizontal"
QT_MOC_LITERAL(29, 291, 15), // "paddingVertical"
QT_MOC_LITERAL(30, 307, 7), // "padding"
QT_MOC_LITERAL(31, 315, 9), // "marginTop"
QT_MOC_LITERAL(32, 325, 11), // "marginRight"
QT_MOC_LITERAL(33, 337, 12), // "marginBottom"
QT_MOC_LITERAL(34, 350, 10), // "marginLeft"
QT_MOC_LITERAL(35, 361, 16), // "marginHorizontal"
QT_MOC_LITERAL(36, 378, 14), // "marginVertical"
QT_MOC_LITERAL(37, 393, 6), // "margin"
QT_MOC_LITERAL(38, 400, 9), // "borderTop"
QT_MOC_LITERAL(39, 410, 11), // "borderRight"
QT_MOC_LITERAL(40, 422, 12), // "borderBottom"
QT_MOC_LITERAL(41, 435, 10), // "borderLeft"
QT_MOC_LITERAL(42, 446, 16), // "borderHorizontal"
QT_MOC_LITERAL(43, 463, 14), // "borderVertical"
QT_MOC_LITERAL(44, 478, 6) // "border"
},
"NWidget\0display\0alignItems\0alignContent\0"
"alignSelf\0justifyContent\0direction\0"
"flexDirection\0overflow\0position\0"
"flexWrap\0flex\0flexGrow\0flexShrink\0"
"aspectRatio\0top\0right\0bottom\0left\0"
"flexBasis\0minWidth\0minHeight\0maxWidth\0"
"maxHeight\0paddingTop\0paddingRight\0"
"paddingBottom\0paddingLeft\0paddingHorizontal\0"
"paddingVertical\0padding\0marginTop\0"
"marginRight\0marginBottom\0marginLeft\0"
"marginHorizontal\0marginVertical\0margin\0"
"borderTop\0borderRight\0borderBottom\0"
"borderLeft\0borderHorizontal\0borderVertical\0"
"border"
};
#undef QT_MOC_LITERAL
static const uint qt_meta_data_NWidget[] = {
// content:
8, // revision
0, // classname
0, 0, // classinfo
0, 0, // methods
44, 14, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
0, // signalCount
// properties: name, type, flags
1, QMetaType::QString, 0x00095003,
2, QMetaType::QString, 0x00095003,
3, QMetaType::QString, 0x00095003,
4, QMetaType::QString, 0x00095003,
5, QMetaType::QString, 0x00095003,
6, QMetaType::QString, 0x00095003,
7, QMetaType::QString, 0x00095003,
8, QMetaType::QString, 0x00095003,
9, QMetaType::QString, 0x00095003,
10, QMetaType::QString, 0x00095003,
11, QMetaType::Float, 0x00095003,
12, QMetaType::Float, 0x00095003,
13, QMetaType::Float, 0x00095003,
14, QMetaType::Float, 0x00095003,
15, QMetaType::QString, 0x00095003,
16, QMetaType::QString, 0x00095003,
17, QMetaType::QString, 0x00095003,
18, QMetaType::QString, 0x00095003,
19, QMetaType::QString, 0x00095003,
20, QMetaType::QString, 0x00095003,
21, QMetaType::QString, 0x00095003,
22, QMetaType::QString, 0x00095003,
23, QMetaType::QString, 0x00095003,
24, QMetaType::QString, 0x00095003,
25, QMetaType::QString, 0x00095003,
26, QMetaType::QString, 0x00095003,
27, QMetaType::QString, 0x00095003,
28, QMetaType::QString, 0x00095003,
29, QMetaType::QString, 0x00095003,
30, QMetaType::QString, 0x00095003,
31, QMetaType::QString, 0x00095003,
32, QMetaType::QString, 0x00095003,
33, QMetaType::QString, 0x00095003,
34, QMetaType::QString, 0x00095003,
35, QMetaType::QString, 0x00095003,
36, QMetaType::QString, 0x00095003,
37, QMetaType::QString, 0x00095003,
38, QMetaType::Float, 0x00095003,
39, QMetaType::Float, 0x00095003,
40, QMetaType::Float, 0x00095003,
41, QMetaType::Float, 0x00095003,
42, QMetaType::Float, 0x00095003,
43, QMetaType::Float, 0x00095003,
44, QMetaType::Float, 0x00095003,
0 // eod
};
void NWidget::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
#ifndef QT_NO_PROPERTIES
if (_c == QMetaObject::ReadProperty) {
auto *_t = static_cast<NWidget *>(_o);
Q_UNUSED(_t)
void *_v = _a[0];
switch (_id) {
case 0: *reinterpret_cast< QString*>(_v) = _t->_yDisplay; break;
case 1: *reinterpret_cast< QString*>(_v) = _t->_yAlignItems; break;
case 2: *reinterpret_cast< QString*>(_v) = _t->_yAlignContent; break;
case 3: *reinterpret_cast< QString*>(_v) = _t->_yAlignSelf; break;
case 4: *reinterpret_cast< QString*>(_v) = _t->_yJustifyContent; break;
case 5: *reinterpret_cast< QString*>(_v) = _t->_yDirection; break;
case 6: *reinterpret_cast< QString*>(_v) = _t->_yFlexDirection; break;
case 7: *reinterpret_cast< QString*>(_v) = _t->_yOverflow; break;
case 8: *reinterpret_cast< QString*>(_v) = _t->_yPosition; break;
case 9: *reinterpret_cast< QString*>(_v) = _t->_yFlexWrap; break;
case 10: *reinterpret_cast< float*>(_v) = _t->_yFlex; break;
case 11: *reinterpret_cast< float*>(_v) = _t->_yFlexGrow; break;
case 12: *reinterpret_cast< float*>(_v) = _t->_yFlexShrink; break;
case 13: *reinterpret_cast< float*>(_v) = _t->_yAspectRatio; break;
case 14: *reinterpret_cast< QString*>(_v) = _t->_yTop; break;
case 15: *reinterpret_cast< QString*>(_v) = _t->_yRight; break;
case 16: *reinterpret_cast< QString*>(_v) = _t->_yBottom; break;
case 17: *reinterpret_cast< QString*>(_v) = _t->_yLeft; break;
case 18: *reinterpret_cast< QString*>(_v) = _t->_yFlexBasis; break;
case 19: *reinterpret_cast< QString*>(_v) = _t->_yMinWidth; break;
case 20: *reinterpret_cast< QString*>(_v) = _t->_yMinHeight; break;
case 21: *reinterpret_cast< QString*>(_v) = _t->_yMaxWidth; break;
case 22: *reinterpret_cast< QString*>(_v) = _t->_yMaxHeight; break;
case 23: *reinterpret_cast< QString*>(_v) = _t->_yPaddingTop; break;
case 24: *reinterpret_cast< QString*>(_v) = _t->_yPaddingRight; break;
case 25: *reinterpret_cast< QString*>(_v) = _t->_yPaddingBottom; break;
case 26: *reinterpret_cast< QString*>(_v) = _t->_yPaddingLeft; break;
case 27: *reinterpret_cast< QString*>(_v) = _t->_yPaddingHorizontal; break;
case 28: *reinterpret_cast< QString*>(_v) = _t->_yPaddingVertical; break;
case 29: *reinterpret_cast< QString*>(_v) = _t->_yPadding; break;
case 30: *reinterpret_cast< QString*>(_v) = _t->_yMarginTop; break;
case 31: *reinterpret_cast< QString*>(_v) = _t->_yMarginRight; break;
case 32: *reinterpret_cast< QString*>(_v) = _t->_yMarginBottom; break;
case 33: *reinterpret_cast< QString*>(_v) = _t->_yMarginLeft; break;
case 34: *reinterpret_cast< QString*>(_v) = _t->_yMarginHorizontal; break;
case 35: *reinterpret_cast< QString*>(_v) = _t->_yMarginVertical; break;
case 36: *reinterpret_cast< QString*>(_v) = _t->_yMargin; break;
case 37: *reinterpret_cast< float*>(_v) = _t->_yBorderTop; break;
case 38: *reinterpret_cast< float*>(_v) = _t->_yBorderRight; break;
case 39: *reinterpret_cast< float*>(_v) = _t->_yBorderBottom; break;
case 40: *reinterpret_cast< float*>(_v) = _t->_yBorderLeft; break;
case 41: *reinterpret_cast< float*>(_v) = _t->_yBorderHorizontal; break;
case 42: *reinterpret_cast< float*>(_v) = _t->_yBorderVertical; break;
case 43: *reinterpret_cast< float*>(_v) = _t->_yBorder; break;
default: break;
}
} else if (_c == QMetaObject::WriteProperty) {
auto *_t = static_cast<NWidget *>(_o);
Q_UNUSED(_t)
void *_v = _a[0];
switch (_id) {
case 0: _t->setYDisplay(*reinterpret_cast< QString*>(_v)); break;
case 1: _t->setYAlignItems(*reinterpret_cast< QString*>(_v)); break;
case 2: _t->setYAlignContent(*reinterpret_cast< QString*>(_v)); break;
case 3: _t->setYAlignSelf(*reinterpret_cast< QString*>(_v)); break;
case 4: _t->setYJustifyContent(*reinterpret_cast< QString*>(_v)); break;
case 5: _t->setYDirection(*reinterpret_cast< QString*>(_v)); break;
case 6: _t->setYFlexDirection(*reinterpret_cast< QString*>(_v)); break;
case 7: _t->setYOverflow(*reinterpret_cast< QString*>(_v)); break;
case 8: _t->setYPosition(*reinterpret_cast< QString*>(_v)); break;
case 9: _t->setYFlexWrap(*reinterpret_cast< QString*>(_v)); break;
case 10: _t->setYFlex(*reinterpret_cast< float*>(_v)); break;
case 11: _t->setYFlexGrow(*reinterpret_cast< float*>(_v)); break;
case 12: _t->setYFlexShrink(*reinterpret_cast< float*>(_v)); break;
case 13: _t->setYAspectRatio(*reinterpret_cast< float*>(_v)); break;
case 14: _t->setYNodeTop(*reinterpret_cast< QString*>(_v)); break;
case 15: _t->setYNodeRight(*reinterpret_cast< QString*>(_v)); break;
case 16: _t->setYNodeBottom(*reinterpret_cast< QString*>(_v)); break;
case 17: _t->setYNodeLeft(*reinterpret_cast< QString*>(_v)); break;
case 18: _t->setYFlexBasis(*reinterpret_cast< QString*>(_v)); break;
case 19: _t->setYMinWidth(*reinterpret_cast< QString*>(_v)); break;
case 20: _t->setYMinHeight(*reinterpret_cast< QString*>(_v)); break;
case 21: _t->setYMaxWidth(*reinterpret_cast< QString*>(_v)); break;
case 22: _t->setYMaxHeight(*reinterpret_cast< QString*>(_v)); break;
case 23: _t->setYPaddingTop(*reinterpret_cast< QString*>(_v)); break;
case 24: _t->setYPaddingRight(*reinterpret_cast< QString*>(_v)); break;
case 25: _t->setYPaddingBottom(*reinterpret_cast< QString*>(_v)); break;
case 26: _t->setYPaddingLeft(*reinterpret_cast< QString*>(_v)); break;
case 27: _t->setYPaddingHorizontal(*reinterpret_cast< QString*>(_v)); break;
case 28: _t->setYPaddingVertical(*reinterpret_cast< QString*>(_v)); break;
case 29: _t->setYPadding(*reinterpret_cast< QString*>(_v)); break;
case 30: _t->setYMarginTop(*reinterpret_cast< QString*>(_v)); break;
case 31: _t->setYMarginRight(*reinterpret_cast< QString*>(_v)); break;
case 32: _t->setYMarginBottom(*reinterpret_cast< QString*>(_v)); break;
case 33: _t->setYMarginLeft(*reinterpret_cast< QString*>(_v)); break;
case 34: _t->setYMarginHorizontal(*reinterpret_cast< QString*>(_v)); break;
case 35: _t->setYMarginVertical(*reinterpret_cast< QString*>(_v)); break;
case 36: _t->setYMarginAll(*reinterpret_cast< QString*>(_v)); break;
case 37: _t->setYBorderTop(*reinterpret_cast< float*>(_v)); break;
case 38: _t->setYBorderRight(*reinterpret_cast< float*>(_v)); break;
case 39: _t->setYBorderBottom(*reinterpret_cast< float*>(_v)); break;
case 40: _t->setYBorderLeft(*reinterpret_cast< float*>(_v)); break;
case 41: _t->setYBorderHorizontal(*reinterpret_cast< float*>(_v)); break;
case 42: _t->setYBorderVertical(*reinterpret_cast< float*>(_v)); break;
case 43: _t->setYBorder(*reinterpret_cast< float*>(_v)); break;
default: break;
}
} else if (_c == QMetaObject::ResetProperty) {
}
#endif // QT_NO_PROPERTIES
Q_UNUSED(_o);
Q_UNUSED(_id);
Q_UNUSED(_c);
Q_UNUSED(_a);
}
QT_INIT_METAOBJECT const QMetaObject NWidget::staticMetaObject = { {
&QWidget::staticMetaObject,
qt_meta_stringdata_NWidget.data,
qt_meta_data_NWidget,
qt_static_metacall,
nullptr,
nullptr
} };
const QMetaObject *NWidget::metaObject() const
{
return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
}
void *NWidget::qt_metacast(const char *_clname)
{
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_NWidget.stringdata0))
return static_cast<void*>(this);
if (!strcmp(_clname, "YogaWidget"))
return static_cast< YogaWidget*>(this);
return QWidget::qt_metacast(_clname);
}
int NWidget::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QWidget::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
#ifndef QT_NO_PROPERTIES
if (_c == QMetaObject::ReadProperty || _c == QMetaObject::WriteProperty
|| _c == QMetaObject::ResetProperty || _c == QMetaObject::RegisterPropertyMetaType) {
qt_static_metacall(this, _c, _id, _a);
_id -= 44;
} else if (_c == QMetaObject::QueryPropertyDesignable) {
_id -= 44;
} else if (_c == QMetaObject::QueryPropertyScriptable) {
_id -= 44;
} else if (_c == QMetaObject::QueryPropertyStored) {
_id -= 44;
} else if (_c == QMetaObject::QueryPropertyEditable) {
_id -= 44;
} else if (_c == QMetaObject::QueryPropertyUser) {
_id -= 44;
}
#endif // QT_NO_PROPERTIES
return _id;
}
QT_WARNING_POP
QT_END_MOC_NAMESPACE