qskinny/support/SkinnyShortcut.h

43 lines
1.1 KiB
C
Raw Normal View History

2017-07-21 18:21:34 +02:00
/******************************************************************************
2024-01-17 14:31:45 +01:00
* QSkinny - Copyright (C) The authors
2023-04-06 09:23:37 +02:00
* SPDX-License-Identifier: BSD-3-Clause
2017-07-21 18:21:34 +02:00
*****************************************************************************/
2022-04-01 13:56:16 +02:00
#pragma once
2017-07-21 18:21:34 +02:00
#include "SkinnyGlobal.h"
#include <QObject>
class SKINNY_EXPORT SkinnyShortcut : public QObject
{
Q_OBJECT
2019-01-07 09:13:53 +01:00
public:
2017-07-21 18:21:34 +02:00
enum Type
{
Quit = 1 << 0,
RotateSkin = 1 << 1,
ChangeColorScheme = 1 << 2,
ChangeFonts = 1 << 3,
DebugBackground = 1 << 4,
DebugStatistics = 1 << 5,
2017-07-21 18:21:34 +02:00
DebugShortcuts = DebugBackground | DebugStatistics,
AllShortcuts = Quit | RotateSkin | ChangeColorScheme
| ChangeFonts | DebugBackground | DebugStatistics
2017-07-21 18:21:34 +02:00
};
Q_ENUM( Type )
Q_DECLARE_FLAGS( Types, Type )
static void enable( Types );
2019-01-07 09:13:53 +01:00
private:
2017-07-21 18:21:34 +02:00
SkinnyShortcut( QObject* parent = nullptr );
void showBackground();
void debugStatistics();
};
Q_DECLARE_OPERATORS_FOR_FLAGS( SkinnyShortcut::Types )