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"
25 TitleBarQuick::TitleBarQuick(Frame *parent)
31 TitleBarQuick::TitleBarQuick(FloatingWindow *parent)
37 TitleBarQuick::~TitleBarQuick()
41 #ifdef DOCKS_DEVELOPER_MODE
42 bool TitleBarQuick::isCloseButtonEnabled()
const
44 if (QQuickItem *button = closeButton())
45 return button->isEnabled();
49 bool TitleBarQuick::isCloseButtonVisible()
const
51 if (QQuickItem *button = closeButton())
52 return button->isVisible();
57 bool TitleBarQuick::isFloatButtonEnabled()
const
59 if (QQuickItem *button = floatButton())
60 return button->isEnabled();
65 bool TitleBarQuick::isFloatButtonVisible()
const
67 if (QQuickItem *button = floatButton())
68 return button->isVisible();
74 QQuickItem *TitleBarQuick::titleBarQmlItem()
const
76 return m_titleBarQmlItem;
79 QQuickItem *TitleBarQuick::titleBarMouseArea()
const
81 if (m_titleBarQmlItem)
82 return m_titleBarQmlItem->property(
"mouseAreaForTests").value<QQuickItem *>();
87 void TitleBarQuick::setTitleBarQmlItem(QQuickItem *item)
89 if (item != m_titleBarQmlItem) {
90 m_titleBarQmlItem = item;
91 Q_EMIT titleBarQmlItemChanged();
95 QQuickItem *TitleBarQuick::floatButton()
const
97 return m_titleBarQmlItem ? m_titleBarQmlItem->property(
"floatButton").value<QQuickItem *>()
101 QQuickItem *TitleBarQuick::closeButton()
const
103 return m_titleBarQmlItem ? m_titleBarQmlItem->property(
"closeButton").value<QQuickItem *>()