19#ifndef KD_KDDOCKWIDGETS_H
20#define KD_KDDOCKWIDGETS_H
22#include "kddockwidgets/docks_export.h"
24#include "QtCompat_p.h"
26#ifdef KDDW_FRONTEND_QT
27#include "Qt5Qt6Compat_p.h"
32#define KDDOCKWIDGETS_SUPPORTS_NESTED_MAINWINDOWS
33#define KDDW_FRONTEND_QT_WINDOWS
36#ifdef KDDW_FRONTEND_QTWIDGETS
61class ItemBoxContainer;
85Q_ENUM_NS(MainWindowOptions)
102Q_ENUM_NS(DockWidgetOptions)
179 : preferredSize(size)
185 , preferredSize(size)
201 return o ==
Qt::Horizontal ? preferredSize.width() : preferredSize.height();
206 return preferredLength(o) > 0;
235 friend class Core::Item;
236 friend class Core::ItemBoxContainer;
250Q_ENUM_NS(RestoreOptions)
342Q_ENUM_NS(FrameOptions)
350Q_ENUM_NS(StackOptions)
388#ifdef KDDW_FRONTEND_QTWIDGETS
394inline T *findAncestor(
QWidget *widget)
398 if (
auto w = qobject_cast<T *>(p))
417 return std::max(minVal, std::min(value, maxVal));
422 return std::abs(a - b) < epsilon;
427Q_DECLARE_OPERATORS_FOR_FLAGS(KDDockWidgets::FrameOptions)
431#define KDDW_DELETE_COPY_CTOR(NAME) \
432 NAME(const NAME &) = delete; \
433 NAME(const NAME &&) = delete; \
434 NAME &operator=(const NAME &) = delete; \
435 NAME &operator=(const NAME &&) = delete;
437#define KDDW_UNUSED(name) (( void )name);