KDDockWidgets API Documentation 2.0
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}
41{
42 return ::KDDockWidgets::DockRegistry::containsDockWidget(uniqueName);
43}
45{
46 return ::KDDockWidgets::DockRegistry::containsMainWindow(uniqueName);
47}
49{
50 return ::KDDockWidgets::DockRegistry::dockByName(arg__1);
51}
57{
58 return ::KDDockWidgets::DockRegistry::focusedDockWidget();
59}
61{
62 return ::KDDockWidgets::DockRegistry::groupInMDIResize();
63}
65{
66 return ::KDDockWidgets::DockRegistry::hasFloatingWindows();
67}
68bool DockRegistry_wrapper::isEmpty(bool excludeBeingDeleted) const
69{
70 return ::KDDockWidgets::DockRegistry::isEmpty(excludeBeingDeleted);
71}
73{
74 return ::KDDockWidgets::DockRegistry::isSane();
75}
76bool DockRegistry_wrapper::itemIsInMainWindow(const KDDockWidgets::Core::Item *arg__1) const
77{
78 return ::KDDockWidgets::DockRegistry::itemIsInMainWindow(arg__1);
79}
80KDDockWidgets::Core::Layout *DockRegistry_wrapper::layoutForItem(const KDDockWidgets::Core::Item *arg__1) const
81{
82 return ::KDDockWidgets::DockRegistry::layoutForItem(arg__1);
83}
85{
86 return ::KDDockWidgets::DockRegistry::mainWindowByName(arg__1);
87}
113{
114 return ::KDDockWidgets::DockRegistry::self();
115}
117{
118 return ::KDDockWidgets::DockRegistry::sideBarForDockWidget(arg__1);
119}
147
148}
150{
151 return reinterpret_cast<KDDockWidgets::DockRegistry *>(ptr);
152}
157extern "C" {
159{
160 delete reinterpret_cast<KDDockWidgetsBindings_wrappersNS::DockRegistry_wrapper *>(cppObj);
161} // checkSanityAll(bool dumpDebug)
162void c_KDDockWidgets__DockRegistry__checkSanityAll_bool(void *thisObj, bool dumpDebug)
163{
164 fromPtr(thisObj)->checkSanityAll(dumpDebug);
165}
166// clear()
168{
169 fromPtr(thisObj)->clear();
170}
171// containsDockWidget(const QString & uniqueName) const
172bool c_KDDockWidgets__DockRegistry__containsDockWidget_QString(void *thisObj, const char *uniqueName_)
173{
174 const auto uniqueName = QString::fromUtf8(uniqueName_);
175 const auto &result = fromPtr(thisObj)->containsDockWidget(uniqueName);
176 free(( char * )uniqueName_);
177 return result;
178}
179// containsMainWindow(const QString & uniqueName) const
180bool c_KDDockWidgets__DockRegistry__containsMainWindow_QString(void *thisObj, const char *uniqueName_)
181{
182 const auto uniqueName = QString::fromUtf8(uniqueName_);
183 const auto &result = fromPtr(thisObj)->containsMainWindow(uniqueName);
184 free(( char * )uniqueName_);
185 return result;
186}
187// dockByName(const QString & arg__1) const
188void *c_KDDockWidgets__DockRegistry__dockByName_QString(void *thisObj, const char *arg__1_)
189{
190 const auto arg__1 = QString::fromUtf8(arg__1_);
191 const auto &result = fromPtr(thisObj)->dockByName(arg__1);
192 free(( char * )arg__1_);
193 return result;
194}
195// ensureAllFloatingWidgetsAreMorphed()
200// focusedDockWidget() const
202{
203 const auto &result = fromPtr(thisObj)->focusedDockWidget();
204 return result;
205}
206// groupInMDIResize() const
208{
209 const auto &result = fromPtr(thisObj)->groupInMDIResize();
210 return result;
211}
212// hasFloatingWindows() const
214{
215 const auto &result = fromPtr(thisObj)->hasFloatingWindows();
216 return result;
217}
218// isEmpty(bool excludeBeingDeleted) const
219bool c_KDDockWidgets__DockRegistry__isEmpty_bool(void *thisObj, bool excludeBeingDeleted)
220{
221 const auto &result = fromPtr(thisObj)->isEmpty(excludeBeingDeleted);
222 return result;
223}
224// isSane() const
226{
227 const auto &result = fromPtr(thisObj)->isSane();
228 return result;
229}
230// itemIsInMainWindow(const KDDockWidgets::Core::Item * arg__1) const
232{
233 auto arg__1 = reinterpret_cast<KDDockWidgets::Core::Item *>(arg__1_);
234 const auto &result = fromPtr(thisObj)->itemIsInMainWindow(arg__1);
235 return result;
236}
237// layoutForItem(const KDDockWidgets::Core::Item * arg__1) const
238void *c_KDDockWidgets__DockRegistry__layoutForItem_Item(void *thisObj, void *arg__1_)
239{
240 auto arg__1 = reinterpret_cast<KDDockWidgets::Core::Item *>(arg__1_);
241 const auto &result = fromPtr(thisObj)->layoutForItem(arg__1);
242 return result;
243}
244// mainWindowByName(const QString & arg__1) const
245void *c_KDDockWidgets__DockRegistry__mainWindowByName_QString(void *thisObj, const char *arg__1_)
246{
247 const auto arg__1 = QString::fromUtf8(arg__1_);
248 const auto &result = fromPtr(thisObj)->mainWindowByName(arg__1);
249 free(( char * )arg__1_);
250 return result;
251}
252// registerDockWidget(KDDockWidgets::Core::DockWidget * arg__1)
254{
255 auto arg__1 = reinterpret_cast<KDDockWidgets::Core::DockWidget *>(arg__1_);
256 fromPtr(thisObj)->registerDockWidget(arg__1);
257}
258// registerFloatingWindow(KDDockWidgets::Core::FloatingWindow * arg__1)
260{
261 auto arg__1 = reinterpret_cast<KDDockWidgets::Core::FloatingWindow *>(arg__1_);
262 fromPtr(thisObj)->registerFloatingWindow(arg__1);
263}
264// registerGroup(KDDockWidgets::Core::Group * arg__1)
266{
267 auto arg__1 = reinterpret_cast<KDDockWidgets::Core::Group *>(arg__1_);
268 fromPtr(thisObj)->registerGroup(arg__1);
269}
270// registerLayout(KDDockWidgets::Core::Layout * arg__1)
272{
273 auto arg__1 = reinterpret_cast<KDDockWidgets::Core::Layout *>(arg__1_);
274 fromPtr(thisObj)->registerLayout(arg__1);
275}
276// registerLayoutSaver()
281// registerMainWindow(KDDockWidgets::Core::MainWindow * arg__1)
283{
284 auto arg__1 = reinterpret_cast<KDDockWidgets::Core::MainWindow *>(arg__1_);
285 fromPtr(thisObj)->registerMainWindow(arg__1);
286}
287// self()
293// sideBarForDockWidget(const KDDockWidgets::Core::DockWidget * arg__1) const
295{
296 auto arg__1 = reinterpret_cast<KDDockWidgets::Core::DockWidget *>(arg__1_);
297 const auto &result = fromPtr(thisObj)->sideBarForDockWidget(arg__1);
298 return result;
299}
300// unregisterDockWidget(KDDockWidgets::Core::DockWidget * arg__1)
302{
303 auto arg__1 = reinterpret_cast<KDDockWidgets::Core::DockWidget *>(arg__1_);
304 fromPtr(thisObj)->unregisterDockWidget(arg__1);
305}
306// unregisterFloatingWindow(KDDockWidgets::Core::FloatingWindow * arg__1)
308{
309 auto arg__1 = reinterpret_cast<KDDockWidgets::Core::FloatingWindow *>(arg__1_);
310 fromPtr(thisObj)->unregisterFloatingWindow(arg__1);
311}
312// unregisterGroup(KDDockWidgets::Core::Group * arg__1)
314{
315 auto arg__1 = reinterpret_cast<KDDockWidgets::Core::Group *>(arg__1_);
316 fromPtr(thisObj)->unregisterGroup(arg__1);
317}
318// unregisterLayout(KDDockWidgets::Core::Layout * arg__1)
320{
321 auto arg__1 = reinterpret_cast<KDDockWidgets::Core::Layout *>(arg__1_);
322 fromPtr(thisObj)->unregisterLayout(arg__1);
323}
324// unregisterLayoutSaver()
329// unregisterMainWindow(KDDockWidgets::Core::MainWindow * arg__1)
331{
332 auto arg__1 = reinterpret_cast<KDDockWidgets::Core::MainWindow *>(arg__1_);
333 fromPtr(thisObj)->unregisterMainWindow(arg__1);
334}
336{
337 delete fromPtr(thisObj);
338}
339void c_KDDockWidgets__DockRegistry__registerVirtualMethodCallback(void *ptr, void *callback, int methodId)
340{
341 auto wrapper = fromWrapperPtr(ptr);
342 switch (methodId) {
343 }
344}
345}
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__registerLayout_Layout(void *thisObj, void *arg__1_)
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__unregisterLayout_Layout(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__checkSanityAll_bool(void *thisObj, bool dumpDebug)
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 unregisterLayout(KDDockWidgets::Core::Layout *arg__1)
void registerLayout(KDDockWidgets::Core::Layout *arg__1)
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 unregisterLayout(Core::Layout *)
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 *)
void checkSanityAll(bool dumpDebug=false)
Calls Layout::checkSanity() on all layouts.
Core::Layout * layoutForItem(const Core::Item *) const
Returns the Layout where the specified item is in.
void registerLayout(Core::Layout *)
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