KWin
Loading...
Searching...
No Matches
outputlocator.h
Go to the documentation of this file.
1/*
2 SPDX-FileCopyrightText: 2022 David Redondo <kde@david-redondo.de>
3
4 SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
5*/
6
7#pragma once
8
9#include "effect/effect.h"
10
11#include <QTimer>
12
13#include <unordered_map>
14
15namespace KWin
16{
17class OffscreenQuickScene;
18
20{
21 Q_OBJECT
22
23public:
24 explicit OutputLocatorEffect(QObject *parent = nullptr);
25 void paintScreen(const RenderTarget &renderTarget, const RenderViewport &viewport, int mask, const QRegion &region, KWin::Output *screen) override;
26 bool isActive() const override;
27
28public Q_SLOTS:
29 void show();
30 void hide();
31
32private:
33 QUrl m_qmlUrl;
34 QTimer m_showTimer;
35 std::unordered_map<Output *, std::unique_ptr<OffscreenQuickScene>> m_scenesByScreens;
36};
37}
Base class for all KWin effects.
Definition effect.h:535
void paintScreen(const RenderTarget &renderTarget, const RenderViewport &viewport, int mask, const QRegion &region, KWin::Output *screen) override
OutputLocatorEffect(QObject *parent=nullptr)
bool isActive() const override