shift-shell/containments/panel/phonepanel.h

57 lines
1.3 KiB
C
Raw Normal View History

2021-03-01 20:03:25 +00:00
/*
* SPDX-FileCopyrightText: 2015 Marco Martin <mart@kde.org>
*
2021-03-01 20:03:25 +00:00
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#ifndef PHONEPANEL_H
#define PHONEPANEL_H
#include <Plasma/Containment>
#include <KConfigWatcher>
#include <KSharedConfig>
#include "kscreeninterface.h"
#include "screenshotinterface.h"
class PhonePanel : public Plasma::Containment
{
Q_OBJECT
Q_PROPERTY(bool autoRotateEnabled READ autoRotate WRITE setAutoRotate NOTIFY autoRotateChanged);
Q_PROPERTY(bool torchEnabled READ torchEnabled NOTIFY torchChanged);
Q_PROPERTY(bool isSystem24HourFormat READ isSystem24HourFormat NOTIFY isSystem24HourFormatChanged);
public:
PhonePanel(QObject *parent, const QVariantList &args);
2018-12-31 03:13:55 +00:00
~PhonePanel() override;
public Q_SLOTS:
void executeCommand(const QString &command);
void toggleTorch();
2020-02-06 17:17:47 +00:00
void takeScreenshot();
bool autoRotate();
void setAutoRotate(bool value);
bool torchEnabled() const;
bool isSystem24HourFormat();
signals:
void autoRotateChanged(bool value);
void torchChanged(bool value);
void isSystem24HourFormatChanged();
private:
bool m_running = false;
KConfigWatcher::Ptr m_localeConfigWatcher;
KSharedConfig::Ptr m_localeConfig;
org::kde::KScreen *m_kscreenInterface;
org::kde::kwin::Screenshot *m_screenshotInterface;
};
#endif