KDDockWidgets API Documentation 2.1
Loading...
Searching...
No Matches
Config_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 "Config_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}
32KDDockWidgets::Size Config_wrapper::absoluteWidgetMaxSize() const
33{
34 return ::KDDockWidgets::Config::absoluteWidgetMaxSize();
35}
36KDDockWidgets::Size Config_wrapper::absoluteWidgetMinSize() const
37{
38 return ::KDDockWidgets::Config::absoluteWidgetMinSize();
39}
41{
42 return ::KDDockWidgets::Config::draggedWindowOpacity();
43}
45{
46 return ::KDDockWidgets::Config::dropIndicatorsInhibited();
47}
49{
50 return ::KDDockWidgets::Config::layoutSaverUsesStrictMode();
51}
53{
54 return ::KDDockWidgets::Config::layoutSpacing();
55}
57{
58 return ::KDDockWidgets::Config::mdiPopupThreshold();
59}
61{
62 return ::KDDockWidgets::Config::onlyProgrammaticDrag();
63}
69{
70 return ::KDDockWidgets::Config::self();
71}
73{
74 return ::KDDockWidgets::Config::separatorThickness();
75}
125{
126 return ::KDDockWidgets::Config::startDragDistance();
127}
129{
130 return ::KDDockWidgets::Config::transparencyOnlyOverDropIndicator();
131}
133{
134 return ::KDDockWidgets::Config::viewFactory();
135}
139
140}
142{
143 return reinterpret_cast<KDDockWidgets::Config *>(ptr);
144}
149extern "C" {
151{
152 delete reinterpret_cast<KDDockWidgetsBindings_wrappersNS::Config_wrapper *>(cppObj);
153} // absoluteWidgetMaxSize() const
155{
156 const auto &result = new Dartagnan::ValueWrapper<KDDockWidgets::Size> { fromPtr(thisObj)->absoluteWidgetMaxSize() };
157 return result;
158}
159// absoluteWidgetMinSize() const
161{
162 const auto &result = new Dartagnan::ValueWrapper<KDDockWidgets::Size> { fromPtr(thisObj)->absoluteWidgetMinSize() };
163 return result;
164}
165// draggedWindowOpacity() const
167{
168 const auto &result = fromPtr(thisObj)->draggedWindowOpacity();
169 return result;
170}
171// dropIndicatorsInhibited() const
173{
174 const auto &result = fromPtr(thisObj)->dropIndicatorsInhibited();
175 return result;
176}
177// layoutSaverUsesStrictMode() const
179{
180 const auto &result = fromPtr(thisObj)->layoutSaverUsesStrictMode();
181 return result;
182}
183// layoutSpacing() const
185{
186 const auto &result = fromPtr(thisObj)->layoutSpacing();
187 return result;
188}
189// mdiPopupThreshold() const
191{
192 const auto &result = fromPtr(thisObj)->mdiPopupThreshold();
193 return result;
194}
195// onlyProgrammaticDrag() const
197{
198 const auto &result = fromPtr(thisObj)->onlyProgrammaticDrag();
199 return result;
200}
201// printDebug()
203{
204 fromPtr(thisObj)->printDebug();
205}
206// self()
208{
210 return result;
211}
212// separatorThickness() const
214{
215 const auto &result = fromPtr(thisObj)->separatorThickness();
216 return result;
217}
218// setAbsoluteWidgetMaxSize(KDDockWidgets::Size size)
220{
221 assert(size_);
222 auto &size = *reinterpret_cast<KDDockWidgets::Size *>(size_);
223 fromPtr(thisObj)->setAbsoluteWidgetMaxSize(size);
224}
225// setAbsoluteWidgetMinSize(KDDockWidgets::Size size)
227{
228 assert(size_);
229 auto &size = *reinterpret_cast<KDDockWidgets::Size *>(size_);
230 fromPtr(thisObj)->setAbsoluteWidgetMinSize(size);
231}
232// setDraggedWindowOpacity(double opacity)
234{
235 fromPtr(thisObj)->setDraggedWindowOpacity(opacity);
236}
237// setDropIndicatorsInhibited(bool inhibit) const
239{
240 fromPtr(thisObj)->setDropIndicatorsInhibited(inhibit);
241}
242// setLayoutSaverStrictMode(bool arg__1)
244{
245 fromPtr(thisObj)->setLayoutSaverStrictMode(arg__1);
246}
247// setLayoutSpacing(int arg__1)
249{
250 fromPtr(thisObj)->setLayoutSpacing(arg__1);
251}
252// setMDIPopupThreshold(int arg__1)
254{
255 fromPtr(thisObj)->setMDIPopupThreshold(arg__1);
256}
257// setOnlyProgrammaticDrag(bool arg__1)
259{
260 fromPtr(thisObj)->setOnlyProgrammaticDrag(arg__1);
261}
262// setSeparatorThickness(int value)
264{
265 fromPtr(thisObj)->setSeparatorThickness(value);
266}
267// setStartDragDistance(int arg__1)
269{
270 fromPtr(thisObj)->setStartDragDistance(arg__1);
271}
272// setTransparencyOnlyOverDropIndicator(bool only)
277// setViewFactory(KDDockWidgets::Core::ViewFactory * arg__1)
279{
280 auto arg__1 = reinterpret_cast<KDDockWidgets::Core::ViewFactory *>(arg__1_);
281 fromPtr(thisObj)->setViewFactory(arg__1);
282}
283// startDragDistance() const
285{
286 const auto &result = fromPtr(thisObj)->startDragDistance();
287 return result;
288}
289// transparencyOnlyOverDropIndicator() const
291{
292 const auto &result = fromPtr(thisObj)->transparencyOnlyOverDropIndicator();
293 return result;
294}
295// viewFactory() const
297{
298 const auto &result = fromPtr(thisObj)->viewFactory();
299 return result;
300}
302{
303 delete fromPtr(thisObj);
304}
305}
void c_KDDockWidgets__Config__setAbsoluteWidgetMaxSize_Size(void *thisObj, void *size_)
Definition Config_c.cpp:219
bool c_KDDockWidgets__Config__layoutSaverUsesStrictMode(void *thisObj)
Definition Config_c.cpp:178
void c_KDDockWidgets__Config__printDebug(void *thisObj)
Definition Config_c.cpp:202
static KDDockWidgets::Config * fromPtr(void *ptr)
Definition Config_c.cpp:141
bool c_KDDockWidgets__Config__transparencyOnlyOverDropIndicator(void *thisObj)
Definition Config_c.cpp:290
int c_KDDockWidgets__Config__mdiPopupThreshold(void *thisObj)
Definition Config_c.cpp:190
double c_KDDockWidgets__Config__draggedWindowOpacity(void *thisObj)
Definition Config_c.cpp:166
void c_KDDockWidgets__Config__setDropIndicatorsInhibited_bool(void *thisObj, bool inhibit)
Definition Config_c.cpp:238
int c_KDDockWidgets__Config__layoutSpacing(void *thisObj)
Definition Config_c.cpp:184
void c_KDDockWidgets__Config__setOnlyProgrammaticDrag_bool(void *thisObj, bool arg__1)
Definition Config_c.cpp:258
bool c_KDDockWidgets__Config__onlyProgrammaticDrag(void *thisObj)
Definition Config_c.cpp:196
void c_KDDockWidgets__Config_Finalizer(void *cppObj)
Definition Config_c.cpp:150
void c_KDDockWidgets__Config__setTransparencyOnlyOverDropIndicator_bool(void *thisObj, bool only)
Definition Config_c.cpp:273
void c_KDDockWidgets__Config__setLayoutSaverStrictMode_bool(void *thisObj, bool arg__1)
Definition Config_c.cpp:243
void * c_static_KDDockWidgets__Config__self()
Definition Config_c.cpp:207
void c_KDDockWidgets__Config__setStartDragDistance_int(void *thisObj, int arg__1)
Definition Config_c.cpp:268
void c_KDDockWidgets__Config__setLayoutSpacing_int(void *thisObj, int arg__1)
Definition Config_c.cpp:248
void c_KDDockWidgets__Config__setMDIPopupThreshold_int(void *thisObj, int arg__1)
Definition Config_c.cpp:253
static KDDockWidgetsBindings_wrappersNS::Config_wrapper * fromWrapperPtr(void *ptr)
Definition Config_c.cpp:145
bool c_KDDockWidgets__Config__dropIndicatorsInhibited(void *thisObj)
Definition Config_c.cpp:172
int c_KDDockWidgets__Config__startDragDistance(void *thisObj)
Definition Config_c.cpp:284
int c_KDDockWidgets__Config__separatorThickness(void *thisObj)
Definition Config_c.cpp:213
void c_KDDockWidgets__Config__setViewFactory_ViewFactory(void *thisObj, void *arg__1_)
Definition Config_c.cpp:278
void * c_KDDockWidgets__Config__viewFactory(void *thisObj)
Definition Config_c.cpp:296
void c_KDDockWidgets__Config__destructor(void *thisObj)
Definition Config_c.cpp:301
void c_KDDockWidgets__Config__setSeparatorThickness_int(void *thisObj, int value)
Definition Config_c.cpp:263
void * c_KDDockWidgets__Config__absoluteWidgetMaxSize(void *thisObj)
Definition Config_c.cpp:154
void * c_KDDockWidgets__Config__absoluteWidgetMinSize(void *thisObj)
Definition Config_c.cpp:160
void c_KDDockWidgets__Config__setDraggedWindowOpacity_double(void *thisObj, double opacity)
Definition Config_c.cpp:233
void c_KDDockWidgets__Config__setAbsoluteWidgetMinSize_Size(void *thisObj, void *size_)
Definition Config_c.cpp:226
void setDropIndicatorsInhibited(bool inhibit) const
Definition Config_c.cpp:88
void setViewFactory(KDDockWidgets::Core::ViewFactory *arg__1)
Definition Config_c.cpp:120
KDDockWidgets::Core::ViewFactory * viewFactory() const
Definition Config_c.cpp:132
void setAbsoluteWidgetMaxSize(KDDockWidgets::Size size)
Definition Config_c.cpp:76
KDDockWidgets::Size absoluteWidgetMinSize() const
Definition Config_c.cpp:36
void setAbsoluteWidgetMinSize(KDDockWidgets::Size size)
Definition Config_c.cpp:80
static KDDockWidgets::Config & self()
Definition Config_c.cpp:68
KDDockWidgets::Size absoluteWidgetMaxSize() const
Definition Config_c.cpp:32
Singleton to allow to choose certain behaviours of the framework.
Definition Config.h:64
Size absoluteWidgetMinSize() const
Definition Config.cpp:291
void setTransparencyOnlyOverDropIndicator(bool only)
Sets whether transparency is only set when the dragged window is over a drop indicator This is only r...
Definition Config.cpp:235
int mdiPopupThreshold() const
Definition Config.cpp:391
void setStartDragDistance(int)
Sets how many pixels the mouse needs to travel before a drag is actually started Calling this is usua...
Definition Config.cpp:409
double draggedWindowOpacity() const
returns the opacity to use when dragging dock widgets By default it's 1.0, fully opaque
Definition Config.cpp:240
void printDebug()
Prints some debug information.
Definition Config.cpp:419
int layoutSpacing() const
Definition Config.cpp:192
void setDraggedWindowOpacity(double opacity)
sets the dragged window opacity 1.0 is fully opaque while 0.0 is fully transparent
Definition Config.cpp:230
Core::ViewFactory * viewFactory() const
getter for the framework view factory
Definition Config.cpp:182
void setAbsoluteWidgetMinSize(Size size)
Sets the minimum size a dock widget can have. Widgets can still provide their own min-size and it wil...
Definition Config.cpp:280
void setDropIndicatorsInhibited(bool inhibit) const
Allows to disable support for drop indicators while dragging By default drop indicators will be shown...
Definition Config.cpp:396
void setLayoutSpacing(int)
Definition Config.cpp:214
bool transparencyOnlyOverDropIndicator() const
Returns whether transparency is only set when the dragged window is over a drop indicator This is onl...
Definition Config.cpp:245
void setSeparatorThickness(int value)
setter for separatorThickness Note: Only use this function at startup before creating any DockWidget ...
Definition Config.cpp:197
void setOnlyProgrammaticDrag(bool)
Definition Config.cpp:434
bool dropIndicatorsInhibited() const
Returns whether drop indicators are inhibited. by default this is false unless you call setDropIndica...
Definition Config.cpp:404
bool layoutSaverUsesStrictMode() const
Definition Config.cpp:429
Size absoluteWidgetMaxSize() const
Definition Config.cpp:307
int startDragDistance() const
Returns the value set by setStartDragDistance() Returns -1 if setStartDragDistance() wasn't call,...
Definition Config.cpp:414
void setMDIPopupThreshold(int)
Sets the MDI popup threshold. When the layout is MDI and you drag a dock widget X pixels behond the w...
Definition Config.cpp:386
void setLayoutSaverStrictMode(bool)
Definition Config.cpp:424
void setViewFactory(Core::ViewFactory *)
Sets the ViewFactory.
Definition Config.cpp:175
bool onlyProgrammaticDrag() const
Definition Config.cpp:439
void setAbsoluteWidgetMaxSize(Size size)
Sets the maximum size a dock widget can have. Widgets can still provide their own max-size and it wil...
Definition Config.cpp:296
int separatorThickness() const
Returns the thickness of the separator.
Definition Config.cpp:187
A factory class for allowing the user to customize some internal views. This is optional,...
int(* CleanupCallback)(void *thisPtr)
Definition Config_c.cpp:21
static CleanupCallback s_cleanupCallback
Definition Config_c.cpp:22

© 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