KDDockWidgets API Documentation 2.1
Loading...
Searching...
No Matches
DockRegistry_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 "DockRegistry_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}
37{
38 return ::KDDockWidgets::DockRegistry::containsDockWidget(uniqueName);
39}
41{
42 return ::KDDockWidgets::DockRegistry::containsMainWindow(uniqueName);
43}
45{
46 return ::KDDockWidgets::DockRegistry::dockByName(arg__1);
47}
53{
54 return ::KDDockWidgets::DockRegistry::focusedDockWidget();
55}
57{
58 return ::KDDockWidgets::DockRegistry::groupInMDIResize();
59}
61{
62 return ::KDDockWidgets::DockRegistry::hasFloatingWindows();
63}
64bool DockRegistry_wrapper::isEmpty(bool excludeBeingDeleted) const
65{
66 return ::KDDockWidgets::DockRegistry::isEmpty(excludeBeingDeleted);
67}
69{
70 return ::KDDockWidgets::DockRegistry::isSane();
71}
72bool DockRegistry_wrapper::itemIsInMainWindow(const KDDockWidgets::Core::Item *arg__1) const
73{
74 return ::KDDockWidgets::DockRegistry::itemIsInMainWindow(arg__1);
75}
76KDDockWidgets::Core::Layout *DockRegistry_wrapper::layoutForItem(const KDDockWidgets::Core::Item *arg__1) const
77{
78 return ::KDDockWidgets::DockRegistry::layoutForItem(arg__1);
79}
81{
82 return ::KDDockWidgets::DockRegistry::mainWindowByName(arg__1);
83}
105{
106 return ::KDDockWidgets::DockRegistry::self();
107}
109{
110 return ::KDDockWidgets::DockRegistry::sideBarForDockWidget(arg__1);
111}
135
136}
138{
139 return reinterpret_cast<KDDockWidgets::DockRegistry *>(ptr);
140}
145extern "C" {
147{
148 delete reinterpret_cast<KDDockWidgetsBindings_wrappersNS::DockRegistry_wrapper *>(cppObj);
149} // clear()
151{
152 fromPtr(thisObj)->clear();
153}
154// containsDockWidget(const QString & uniqueName) const
155bool c_KDDockWidgets__DockRegistry__containsDockWidget_QString(void *thisObj, const char *uniqueName_)
156{
157 const auto uniqueName = QString::fromUtf8(uniqueName_);
158 const auto &result = fromPtr(thisObj)->containsDockWidget(uniqueName);
159 free(( char * )uniqueName_);
160 return result;
161}
162// containsMainWindow(const QString & uniqueName) const
163bool c_KDDockWidgets__DockRegistry__containsMainWindow_QString(void *thisObj, const char *uniqueName_)
164{
165 const auto uniqueName = QString::fromUtf8(uniqueName_);
166 const auto &result = fromPtr(thisObj)->containsMainWindow(uniqueName);
167 free(( char * )uniqueName_);
168 return result;
169}
170// dockByName(const QString & arg__1) const
171void *c_KDDockWidgets__DockRegistry__dockByName_QString(void *thisObj, const char *arg__1_)
172{
173 const auto arg__1 = QString::fromUtf8(arg__1_);
174 const auto &result = fromPtr(thisObj)->dockByName(arg__1);
175 free(( char * )arg__1_);
176 return result;
177}
178// ensureAllFloatingWidgetsAreMorphed()
183// focusedDockWidget() const
185{
186 const auto &result = fromPtr(thisObj)->focusedDockWidget();
187 return result;
188}
189// groupInMDIResize() const
191{
192 const auto &result = fromPtr(thisObj)->groupInMDIResize();
193 return result;
194}
195// hasFloatingWindows() const
197{
198 const auto &result = fromPtr(thisObj)->hasFloatingWindows();
199 return result;
200}
201// isEmpty(bool excludeBeingDeleted) const
202bool c_KDDockWidgets__DockRegistry__isEmpty_bool(void *thisObj, bool excludeBeingDeleted)
203{
204 const auto &result = fromPtr(thisObj)->isEmpty(excludeBeingDeleted);
205 return result;
206}
207// isSane() const
209{
210 const auto &result = fromPtr(thisObj)->isSane();
211 return result;
212}
213// itemIsInMainWindow(const KDDockWidgets::Core::Item * arg__1) const
215{
216 auto arg__1 = reinterpret_cast<KDDockWidgets::Core::Item *>(arg__1_);
217 const auto &result = fromPtr(thisObj)->itemIsInMainWindow(arg__1);
218 return result;
219}
220// layoutForItem(const KDDockWidgets::Core::Item * arg__1) const
221void *c_KDDockWidgets__DockRegistry__layoutForItem_Item(void *thisObj, void *arg__1_)
222{
223 auto arg__1 = reinterpret_cast<KDDockWidgets::Core::Item *>(arg__1_);
224 const auto &result = fromPtr(thisObj)->layoutForItem(arg__1);
225 return result;
226}
227// mainWindowByName(const QString & arg__1) const
228void *c_KDDockWidgets__DockRegistry__mainWindowByName_QString(void *thisObj, const char *arg__1_)
229{
230 const auto arg__1 = QString::fromUtf8(arg__1_);
231 const auto &result = fromPtr(thisObj)->mainWindowByName(arg__1);
232 free(( char * )arg__1_);
233 return result;
234}
235// registerDockWidget(KDDockWidgets::Core::DockWidget * arg__1)
237{
238 auto arg__1 = reinterpret_cast<KDDockWidgets::Core::DockWidget *>(arg__1_);
239 fromPtr(thisObj)->registerDockWidget(arg__1);
240}
241// registerFloatingWindow(KDDockWidgets::Core::FloatingWindow * arg__1)
243{
244 auto arg__1 = reinterpret_cast<KDDockWidgets::Core::FloatingWindow *>(arg__1_);
245 fromPtr(thisObj)->registerFloatingWindow(arg__1);
246}
247// registerGroup(KDDockWidgets::Core::Group * arg__1)
249{
250 auto arg__1 = reinterpret_cast<KDDockWidgets::Core::Group *>(arg__1_);
251 fromPtr(thisObj)->registerGroup(arg__1);
252}
253// registerLayoutSaver()
258// registerMainWindow(KDDockWidgets::Core::MainWindow * arg__1)
260{
261 auto arg__1 = reinterpret_cast<KDDockWidgets::Core::MainWindow *>(arg__1_);
262 fromPtr(thisObj)->registerMainWindow(arg__1);
263}
264// self()
270// sideBarForDockWidget(const KDDockWidgets::Core::DockWidget * arg__1) const
272{
273 auto arg__1 = reinterpret_cast<KDDockWidgets::Core::DockWidget *>(arg__1_);
274 const auto &result = fromPtr(thisObj)->sideBarForDockWidget(arg__1);
275 return result;
276}
277// unregisterDockWidget(KDDockWidgets::Core::DockWidget * arg__1)
279{
280 auto arg__1 = reinterpret_cast<KDDockWidgets::Core::DockWidget *>(arg__1_);
281 fromPtr(thisObj)->unregisterDockWidget(arg__1);
282}
283// unregisterFloatingWindow(KDDockWidgets::Core::FloatingWindow * arg__1)
285{
286 auto arg__1 = reinterpret_cast<KDDockWidgets::Core::FloatingWindow *>(arg__1_);
287 fromPtr(thisObj)->unregisterFloatingWindow(arg__1);
288}
289// unregisterGroup(KDDockWidgets::Core::Group * arg__1)
291{
292 auto arg__1 = reinterpret_cast<KDDockWidgets::Core::Group *>(arg__1_);
293 fromPtr(thisObj)->unregisterGroup(arg__1);
294}
295// unregisterLayoutSaver()
300// unregisterMainWindow(KDDockWidgets::Core::MainWindow * arg__1)
302{
303 auto arg__1 = reinterpret_cast<KDDockWidgets::Core::MainWindow *>(arg__1_);
304 fromPtr(thisObj)->unregisterMainWindow(arg__1);
305}
307{
308 delete fromPtr(thisObj);
309}
310void c_KDDockWidgets__DockRegistry__registerVirtualMethodCallback(void *ptr, void *callback, int methodId)
311{
312 auto wrapper = fromWrapperPtr(ptr);
313 switch (methodId) {
314 }
315}
316}
void * c_KDDockWidgets__DockRegistry__sideBarForDockWidget_DockWidget(void *thisObj, void *arg__1_)
void c_KDDockWidgets__DockRegistry__registerVirtualMethodCallback(void *ptr, void *callback, int methodId)
static KDDockWidgets::DockRegistry * fromPtr(void *ptr)
void c_KDDockWidgets__DockRegistry__registerFloatingWindow_FloatingWindow(void *thisObj, void *arg__1_)
void * c_KDDockWidgets__DockRegistry__dockByName_QString(void *thisObj, const char *arg__1_)
void c_KDDockWidgets__DockRegistry__unregisterDockWidget_DockWidget(void *thisObj, void *arg__1_)
void * c_KDDockWidgets__DockRegistry__focusedDockWidget(void *thisObj)
bool c_KDDockWidgets__DockRegistry__itemIsInMainWindow_Item(void *thisObj, void *arg__1_)
void c_KDDockWidgets__DockRegistry__registerDockWidget_DockWidget(void *thisObj, void *arg__1_)
void c_KDDockWidgets__DockRegistry__unregisterLayoutSaver(void *thisObj)
void c_KDDockWidgets__DockRegistry__destructor(void *thisObj)
void c_KDDockWidgets__DockRegistry__clear(void *thisObj)
static KDDockWidgetsBindings_wrappersNS::DockRegistry_wrapper * fromWrapperPtr(void *ptr)
void c_KDDockWidgets__DockRegistry_Finalizer(void *cppObj)
bool c_KDDockWidgets__DockRegistry__isEmpty_bool(void *thisObj, bool excludeBeingDeleted)
void c_KDDockWidgets__DockRegistry__registerMainWindow_MainWindow(void *thisObj, void *arg__1_)
bool c_KDDockWidgets__DockRegistry__containsMainWindow_QString(void *thisObj, const char *uniqueName_)
void * c_KDDockWidgets__DockRegistry__mainWindowByName_QString(void *thisObj, const char *arg__1_)
void c_KDDockWidgets__DockRegistry__registerLayoutSaver(void *thisObj)
void * c_static_KDDockWidgets__DockRegistry__self()
void c_KDDockWidgets__DockRegistry__ensureAllFloatingWidgetsAreMorphed(void *thisObj)
bool c_KDDockWidgets__DockRegistry__isSane(void *thisObj)
void c_KDDockWidgets__DockRegistry__unregisterGroup_Group(void *thisObj, void *arg__1_)
bool c_KDDockWidgets__DockRegistry__hasFloatingWindows(void *thisObj)
void c_KDDockWidgets__DockRegistry__registerGroup_Group(void *thisObj, void *arg__1_)
void c_KDDockWidgets__DockRegistry__unregisterMainWindow_MainWindow(void *thisObj, void *arg__1_)
void c_KDDockWidgets__DockRegistry__unregisterFloatingWindow_FloatingWindow(void *thisObj, void *arg__1_)
void * c_KDDockWidgets__DockRegistry__groupInMDIResize(void *thisObj)
void * c_KDDockWidgets__DockRegistry__layoutForItem_Item(void *thisObj, void *arg__1_)
bool c_KDDockWidgets__DockRegistry__containsDockWidget_QString(void *thisObj, const char *uniqueName_)
KDDockWidgets::Core::Group * groupInMDIResize() const
bool isEmpty(bool excludeBeingDeleted=false) const
void registerMainWindow(KDDockWidgets::Core::MainWindow *arg__1)
void unregisterDockWidget(KDDockWidgets::Core::DockWidget *arg__1)
void registerGroup(KDDockWidgets::Core::Group *arg__1)
void registerFloatingWindow(KDDockWidgets::Core::FloatingWindow *arg__1)
bool itemIsInMainWindow(const KDDockWidgets::Core::Item *arg__1) const
KDDockWidgets::Core::SideBar * sideBarForDockWidget(const KDDockWidgets::Core::DockWidget *arg__1) const
void unregisterFloatingWindow(KDDockWidgets::Core::FloatingWindow *arg__1)
void unregisterGroup(KDDockWidgets::Core::Group *arg__1)
KDDockWidgets::Core::DockWidget * focusedDockWidget() const
KDDockWidgets::Core::Layout * layoutForItem(const KDDockWidgets::Core::Item *arg__1) const
KDDockWidgets::Core::MainWindow * mainWindowByName(const QString &arg__1) const
bool containsDockWidget(const QString &uniqueName) const
void registerDockWidget(KDDockWidgets::Core::DockWidget *arg__1)
bool containsMainWindow(const QString &uniqueName) const
void unregisterMainWindow(KDDockWidgets::Core::MainWindow *arg__1)
KDDockWidgets::Core::DockWidget * dockByName(const QString &arg__1) const
The DockWidget base-class. DockWidget and Core::DockWidget are only split in two so we can share some...
The widget (QWidget or QQuickItem) which holds a layout of dock widgets.
Definition Layout.h:57
The MainWindow base-class. MainWindow and MainWindowBase are only split in two so we can share some c...
Q_INVOKABLE void clear(const Vector< QString > &affinities={})
Closes all dock widgets, and destroys all FloatingWindows This is called before restoring a layout.
void unregisterFloatingWindow(Core::FloatingWindow *)
Q_INVOKABLE KDDockWidgets::Core::DockWidget * dockByName(const QString &, KDDockWidgets::DockRegistry::DockByNameFlags={}) const
void registerMainWindow(Core::MainWindow *)
Q_INVOKABLE KDDockWidgets::Core::DockWidget * focusedDockWidget() const
Q_INVOKABLE bool containsMainWindow(const QString &uniqueName) const
void unregisterGroup(Core::Group *)
void unregisterDockWidget(Core::DockWidget *)
Core::Group * groupInMDIResize() const
Returns the Group which is being resized in a MDI layout. nullptr if none.
Q_INVOKABLE KDDockWidgets::Core::MainWindow * mainWindowByName(const QString &) const
Q_INVOKABLE bool hasFloatingWindows() const
returns whether if there's at least one floating window
void ensureAllFloatingWidgetsAreMorphed()
Ensures that all floating DockWidgets have a FloatingWindow as a window.
Q_INVOKABLE bool containsDockWidget(const QString &uniqueName) const
void registerGroup(Core::Group *)
void unregisterMainWindow(Core::MainWindow *)
bool isEmpty(bool excludeBeingDeleted=false) const
returns true if there's 0 dockwidgets, 0 main windows
Core::SideBar * sideBarForDockWidget(const Core::DockWidget *) const
Overload that returns the SideBar itself.
bool itemIsInMainWindow(const Core::Item *) const
Returns whether the item is in a main window. Nesting is honoured. (MDIArea inside DropArea inside Ma...
void registerFloatingWindow(Core::FloatingWindow *)
void registerDockWidget(Core::DockWidget *)
Core::Layout * layoutForItem(const Core::Item *) const
Returns the Layout where the specified item is in.
int(* CleanupCallback)(void *thisPtr)
Definition Config_c.cpp:21
static CleanupCallback s_cleanupCallback
Definition Config_c.cpp:22
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