// Copyright (C) 2021 The Qt Company Ltd. // Copyright (C) 2019 Luxoft Sweden AB // Copyright (C) 2018 Pelagicore AG // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "dbuscontextadaptor.h" #include "windowmanager.h" #include "windowmanager_adaptor.h" #include "dbuspolicy.h" //NOTE: The header for this class is autogenerated from the XML interface definition. // We are NOT using the generated cpp, but instead implement the adaptor manually. QT_USE_NAMESPACE_AM WindowManagerAdaptor::WindowManagerAdaptor(QObject *parent) : QDBusAbstractAdaptor(parent) { connect(WindowManager::instance(), &WindowManager::countChanged, this, &WindowManagerAdaptor::countChanged); connect(WindowManager::instance(), &WindowManager::slowAnimationsChanged, this, &WindowManagerAdaptor::slowAnimationsChanged); } WindowManagerAdaptor::~WindowManagerAdaptor() { } bool WindowManagerAdaptor::allowUnknownUiClients() const { return WindowManager::instance()->allowUnknownUiClients(); } int WindowManagerAdaptor::count() const { return WindowManager::instance()->count(); } bool WindowManagerAdaptor::runningOnDesktop() const { return WindowManager::instance()->isRunningOnDesktop(); } bool WindowManagerAdaptor::slowAnimations() const { return WindowManager::instance()->slowAnimations(); } void WindowManagerAdaptor::setSlowAnimations(bool slow) { WindowManager::instance()->setSlowAnimations(slow); } bool WindowManagerAdaptor::makeScreenshot(const QString &filename, const QString &selector) { QT_AM_AUTHENTICATE_DBUS(bool) return WindowManager::instance()->makeScreenshot(filename, selector); }