2021-03-01 20:03:25 +00:00
|
|
|
/*
|
|
|
|
|
* SPDX-FileCopyrightText: 2015 Marco Martin <mart@kde.org>
|
2016-08-24 14:57:15 +00:00
|
|
|
*
|
2021-03-01 20:03:25 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
|
*/
|
2016-08-24 14:57:15 +00:00
|
|
|
|
2023-11-14 06:37:08 +00:00
|
|
|
#pragma once
|
2016-08-24 14:57:15 +00:00
|
|
|
|
|
|
|
|
#include <Plasma/Containment>
|
2024-11-08 07:52:45 +00:00
|
|
|
#include <QOrientationSensor>
|
|
|
|
|
|
|
|
|
|
#include <kscreen/config.h>
|
2016-08-24 14:57:15 +00:00
|
|
|
|
|
|
|
|
class TaskPanel : public Plasma::Containment
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
2024-11-08 07:52:45 +00:00
|
|
|
Q_PROPERTY(bool showRotationButton READ showRotationButton NOTIFY showRotationButtonChanged)
|
2016-08-24 14:57:15 +00:00
|
|
|
|
|
|
|
|
public:
|
2022-04-24 11:44:41 +00:00
|
|
|
TaskPanel(QObject *parent, const KPluginMetaData &data, const QVariantList &args);
|
2016-08-24 14:57:15 +00:00
|
|
|
|
2023-03-06 06:38:43 +00:00
|
|
|
Q_INVOKABLE void triggerTaskSwitcher() const;
|
2024-11-08 07:52:45 +00:00
|
|
|
|
|
|
|
|
bool showRotationButton() const;
|
|
|
|
|
Q_INVOKABLE void rotateToSuggestedRotation();
|
|
|
|
|
|
|
|
|
|
Q_SIGNALS:
|
|
|
|
|
void showRotationButtonChanged();
|
|
|
|
|
|
|
|
|
|
private Q_SLOTS:
|
|
|
|
|
void updateShowRotationButton();
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
bool m_showRotationButton{false};
|
|
|
|
|
KScreen::Output::Rotation m_rotateTo;
|
|
|
|
|
|
|
|
|
|
KScreen::ConfigPtr m_config{nullptr};
|
|
|
|
|
QOrientationSensor *m_sensor{nullptr};
|
2016-08-24 14:57:15 +00:00
|
|
|
};
|