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"
30#define KDDW_FRONTEND_QT_WINDOWS
33#ifdef KDDW_FRONTEND_QTWIDGETS
58class ItemBoxContainer;
85Q_ENUM_NS(MainWindowOptions)
102Q_ENUM_NS(DockWidgetOptions)
197 return o ==
Qt::Horizontal ? preferredSize.width() : preferredSize.height();
202 return preferredLength(o) > 0;
231 friend class Core::Item;
232 friend class Core::ItemBoxContainer;
246Q_ENUM_NS(RestoreOptions)
340Q_ENUM_NS(FrameOptions)
348Q_ENUM_NS(StackOptions)
395#ifdef KDDW_FRONTEND_QTWIDGETS
401inline T *findAncestor(
QWidget *widget)
405 if (
auto w = qobject_cast<T *>(p))
424 return std::max(minVal, std::min(value, maxVal));
429 return std::abs(a - b) < epsilon;
434Q_DECLARE_OPERATORS_FOR_FLAGS(KDDockWidgets::FrameOptions)
438#define KDDW_DELETE_COPY_CTOR(NAME) \
439 NAME(const NAME &) = delete; \
440 NAME(const NAME &&) = delete; \
441 NAME &operator=(const NAME &) = delete; \
442 NAME &operator=(const NAME &&) = delete;
444#define KDDW_UNUSED(name) (( void )name);