KDDockWidgets API Documentation 2.1
Loading...
Searching...
No Matches
Object_c.cpp
Go to the documentation of this file.
1/*
2 This file is part of KDDockWidgets.
3
4 SPDX-FileCopyrightText: 2019 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
5 Author: SĂ©rgio Martins <sergio.martins@kdab.com>
6
7 SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
8
9 Contact KDAB at <info@kdab.com> for commercial licensing options.
10*/
11#include "Object_c.h"
12
13
14#include <iostream>
15
16#include <cassert>
17
18
19namespace Dartagnan {
20
21typedef int (*CleanupCallback)(void *thisPtr);
23
24template<typename T>
25struct ValueWrapper
26{
27 T value;
28};
29
30}
32namespace KDDWBindingsCore {
33Object_wrapper::Object_wrapper(KDDockWidgets::Core::Object *parent)
34 : ::KDDockWidgets::Core::Object(parent)
35{
36}
38{
39 return ::KDDockWidgets::Core::Object::objectName();
40}
41KDDockWidgets::Core::Object *Object_wrapper::parent() const
42{
43 return ::KDDockWidgets::Core::Object::parent();
44}
46{
47 ::KDDockWidgets::Core::Object::setObjectName(arg__1);
48}
49void Object_wrapper::setParent(KDDockWidgets::Core::Object *parent)
50{
51 ::KDDockWidgets::Core::Object::setParent(parent);
52}
53QString Object_wrapper::tr(const char *arg__1)
54{
55 return ::KDDockWidgets::Core::Object::tr(arg__1);
56}
60
61}
62}
63static KDDockWidgets::Core::Object *fromPtr(void *ptr)
64{
65 return reinterpret_cast<KDDockWidgets::Core::Object *>(ptr);
66}
71extern "C" {
77{
78 auto parent = reinterpret_cast<KDDockWidgets::Core::Object *>(parent_);
80 return reinterpret_cast<void *>(ptr);
81}
82// objectName() const
84{
85 const auto &result = new Dartagnan::ValueWrapper<QString> { fromPtr(thisObj)->objectName() };
86 return result;
87}
88// parent() const
90{
91 const auto &result = fromPtr(thisObj)->parent();
92 return result;
93}
94// setObjectName(const QString & arg__1)
95void c_KDDockWidgets__Core__Object__setObjectName_QString(void *thisObj, const char *arg__1_)
96{
97 const auto arg__1 = QString::fromUtf8(arg__1_);
98 fromPtr(thisObj)->setObjectName(arg__1);
99 free(( char * )arg__1_);
100}
101// setParent(KDDockWidgets::Core::Object * parent)
102void c_KDDockWidgets__Core__Object__setParent_Object(void *thisObj, void *parent_)
103{
104 auto parent = reinterpret_cast<KDDockWidgets::Core::Object *>(parent_);
105 fromPtr(thisObj)->setParent(parent);
106}
107// tr(const char * arg__1)
109{
110 const auto &result = new Dartagnan::ValueWrapper<QString> { KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Object_wrapper::tr(arg__1) };
111 free(( char * )arg__1);
112 return result;
113}
115{
116 delete fromPtr(thisObj);
117}
118void c_KDDockWidgets__Core__Object__registerVirtualMethodCallback(void *ptr, void *callback, int methodId)
119{
120 auto wrapper = fromWrapperPtr(ptr);
121 switch (methodId) {
122 }
123}
124}
void c_KDDockWidgets__Core__Object_Finalizer(void *cppObj)
Definition Object_c.cpp:72
void c_KDDockWidgets__Core__Object__destructor(void *thisObj)
Definition Object_c.cpp:114
static KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Object_wrapper * fromWrapperPtr(void *ptr)
Definition Object_c.cpp:67
void c_KDDockWidgets__Core__Object__setParent_Object(void *thisObj, void *parent_)
Definition Object_c.cpp:102
void c_KDDockWidgets__Core__Object__setObjectName_QString(void *thisObj, const char *arg__1_)
Definition Object_c.cpp:95
void * c_KDDockWidgets__Core__Object__objectName(void *thisObj)
Definition Object_c.cpp:83
void * c_KDDockWidgets__Core__Object__parent(void *thisObj)
Definition Object_c.cpp:89
void c_KDDockWidgets__Core__Object__registerVirtualMethodCallback(void *ptr, void *callback, int methodId)
Definition Object_c.cpp:118
void * c_static_KDDockWidgets__Core__Object__tr_char(const char *arg__1)
Definition Object_c.cpp:108
void * c_KDDockWidgets__Core__Object__constructor_Object(void *parent_)
Definition Object_c.cpp:76
static KDDockWidgets::Core::Object * fromPtr(void *ptr)
Definition Object_c.cpp:63
Object_wrapper(KDDockWidgets::Core::Object *parent=nullptr)
Definition Object_c.cpp:33
void setParent(KDDockWidgets::Core::Object *parent)
Definition Object_c.cpp:49
int(* CleanupCallback)(void *thisPtr)
Definition Config_c.cpp:21
static CleanupCallback s_cleanupCallback
Definition Config_c.cpp:22
Class to abstract QAction, so code still works with QtQuick and Flutter.
QString fromUtf8(const char *str, int size)

© Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
KDDockWidgets
Advanced Dock Widget Framework for Qt
https://www.kdab.com/development-resources/qt-tools/kddockwidgets/
Generated by doxygen 1.9.8