2017-07-21 18:21:34 +02:00
|
|
|
/******************************************************************************
|
|
|
|
* QSkinny - Copyright (C) 2016 Uwe Rathmann
|
|
|
|
* This file may be used under the terms of the 3-clause BSD License
|
|
|
|
*****************************************************************************/
|
|
|
|
|
2022-04-01 17:00:50 +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
|
|
|
|
{
|
2018-01-04 13:59:51 +01:00
|
|
|
Quit = 1 << 0,
|
|
|
|
RotateSkin = 1 << 1,
|
|
|
|
ChangeFonts = 1 << 2,
|
|
|
|
DebugBackground = 1 << 3,
|
|
|
|
DebugStatistics = 1 << 4,
|
2017-07-21 18:21:34 +02:00
|
|
|
|
|
|
|
DebugShortcuts = DebugBackground | DebugStatistics,
|
2018-01-04 13:59:51 +01:00
|
|
|
AllShortcuts = Quit | RotateSkin | 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 )
|