77 lines
1.6 KiB
C++
77 lines
1.6 KiB
C++
|
#include "Frameless.h"
|
||
|
|
||
|
Frameless::Frameless(QQuickItem *parent) : QQuickItem{parent} {
|
||
|
}
|
||
|
|
||
|
QQuickItem *Frameless::appBar() const {
|
||
|
return m_appBar;
|
||
|
}
|
||
|
|
||
|
void Frameless::setAppBar(QQuickItem *appBar) {
|
||
|
if (m_appBar != appBar) {
|
||
|
m_appBar = appBar;
|
||
|
emit appBarChanged();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
QQuickItem *Frameless::maximizeButton() const {
|
||
|
return m_maximizeButton;
|
||
|
}
|
||
|
|
||
|
void Frameless::setMaximizeButton(QQuickItem *button) {
|
||
|
if (m_maximizeButton != button) {
|
||
|
m_maximizeButton = button;
|
||
|
emit maximizeButtonChanged();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
bool Frameless::fixSize() const {
|
||
|
return m_fixSize;
|
||
|
}
|
||
|
|
||
|
void Frameless::setFixSize(bool fix) {
|
||
|
if (m_fixSize != fix) {
|
||
|
m_fixSize = fix;
|
||
|
emit fixSizeChanged();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
bool Frameless::topmost() const {
|
||
|
return m_topmost;
|
||
|
}
|
||
|
|
||
|
void Frameless::setTopmost(bool topmost) {
|
||
|
if (m_topmost != topmost) {
|
||
|
m_topmost = topmost;
|
||
|
emit topmostChanged();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
bool Frameless::disabled() const {
|
||
|
return m_disabled;
|
||
|
}
|
||
|
|
||
|
void Frameless::setDisabled(bool disabled) {
|
||
|
if (m_disabled != disabled) {
|
||
|
m_disabled = disabled;
|
||
|
emit disabledChanged();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
void Frameless::setHitTestVisible(QQuickItem *item) {
|
||
|
if (!m_hitTestList.contains(item)) {
|
||
|
m_hitTestList.append(item);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
void Frameless::onDestruction() {
|
||
|
QGuiApplication::instance()->removeNativeEventFilter(this);
|
||
|
}
|
||
|
|
||
|
void Frameless::componentComplete() {
|
||
|
}
|
||
|
|
||
|
bool Frameless::nativeEventFilter(const QByteArray &eventType, void *message, qintptr *result) {
|
||
|
return false;
|
||
|
}
|