12#include "TitleBarQuick_p.h"
14#include "../DragController_p.h"
15#include "../Frame_p.h"
16#include "../FloatingWindow_p.h"
17#include "../Logging_p.h"
18#include "../WindowBeingDragged_p.h"
19#include "../Utils_p.h"
25TitleBarQuick::TitleBarQuick(Frame *parent)
31TitleBarQuick::TitleBarQuick(FloatingWindow *parent)
37TitleBarQuick::~TitleBarQuick()
41#ifdef DOCKS_DEVELOPER_MODE
42bool TitleBarQuick::isCloseButtonEnabled()
const
44 if (QQuickItem *button = closeButton())
45 return button->isEnabled();
49bool TitleBarQuick::isCloseButtonVisible()
const
51 if (QQuickItem *button = closeButton())
52 return button->isVisible();
57bool TitleBarQuick::isFloatButtonEnabled()
const
59 if (QQuickItem *button = floatButton())
60 return button->isEnabled();
65bool TitleBarQuick::isFloatButtonVisible()
const
67 if (QQuickItem *button = floatButton())
68 return button->isVisible();
74QQuickItem *TitleBarQuick::titleBarQmlItem()
const
76 return m_titleBarQmlItem;
79QQuickItem *TitleBarQuick::titleBarMouseArea()
const
81 if (m_titleBarQmlItem)
82 return m_titleBarQmlItem->property(
"mouseAreaForTests").value<QQuickItem *>();
87void TitleBarQuick::setTitleBarQmlItem(QQuickItem *item)
89 if (item != m_titleBarQmlItem) {
90 m_titleBarQmlItem = item;
91 Q_EMIT titleBarQmlItemChanged();
95QQuickItem *TitleBarQuick::floatButton()
const
97 return m_titleBarQmlItem ? m_titleBarQmlItem->property(
"floatButton").value<QQuickItem *>()
101QQuickItem *TitleBarQuick::closeButton()
const
103 return m_titleBarQmlItem ? m_titleBarQmlItem->property(
"closeButton").value<QQuickItem *>()