10#include <QAbstractButton>
21#ifdef QX_DOCK_DEBUG_PRINT
22#define QX_DOCK_PRINT(s) qDebug() << __FUNCTION__ << s
24#define QX_DOCK_PRINT(s)
35extern const int FloatingWidgetDragStartEvent;
36extern const int DockedWidgetDragStartEvent;
37static const char *
const LocationProperty =
"Location";
38static const char *
const DirtyProperty =
"dirty";
39static const char *
const ClosedProperty =
"close";
40static const bool RestoreTesting =
true;
41static const bool Restore =
false;
43template <
class T>
void setFlag(T &flags,
typename T::enum_type flag,
bool on =
true)
45#if QT_VERSION >= 0x050700
46 flags.setFlag(flag, on);
56template <
class QObjectPtr>
void setToolTip(QObjectPtr obj,
const QString &tip)
77 QWidget *pw = w->parentWidget();
79 T parentImpl = qobject_cast<T>(pw);
83 pw = pw->parentWidget();
90#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
91 return e->globalPosition().toPoint();
93 return e->globalPos();
97QPixmap createTransparentPixmap(
const QPixmap &source, qreal opacity);
99void setButtonIcon(QAbstractButton *b, QStyle::StandardPixmap pixmap,
Qx::DockIcon iconId);
101void replaceSplitterWidget(QSplitter *splitter, QWidget *from, QWidget *to);
103void hideEmptyParentSplitters(
DockSplitter *firstParentSplitter);
108 using QPair<Qt::Orientation,
bool>::QPair;
119 return append() ? 1 : 0;
139void repolishStyle(QWidget *w, RepolishChildOptions
options = RepolishIgnoreChildren);
146xcb_atom_t xcb_get_atom(
const char *
name);
151void xcb_add_prop(
bool state, WId
window,
const char *type,
const char *prop);
155void xcb_update_prop(
bool set, WId
window,
const char *type,
const char *prop,
const char *prop2 =
nullptr);
159bool xcb_dump_props(WId
window,
const char *type);
165QString windowManager();
169void setBackgroudColor(QWidget *w);
170#define QXDOCK_SET_BGCOLOR(w) internal::setBackgroudColor(w)
172#define QXDOCK_SET_BGCOLOR(w)
Qt::Orientation orientation() const
@ RepolishChildrenRecursively
QPoint globalPositionOf(QMouseEvent *e)
T findParent(const QWidget *w)
Searches for the parent widget of the given type.
void setToolTip(QObjectPtr obj, const QString &tip)
void setFlag(T &flags, typename T::enum_type flag, bool on=true)
#define QX_DOCK_END_NAMESPACE
#define QX_DOCK_BEGIN_NAMESPACE
QxLogger::Options options