qskinny/support/SkinnyShortcut.h

46 lines
1.1 KiB
C
Raw Normal View History

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
*****************************************************************************/
#ifndef SKINNY_SHORTCUT_H_
#define SKINNY_SHORTCUT_H_
#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,
ChangeFonts = 1 << 2,
DebugBackground = 1 << 3,
DebugStatistics = 1 << 4,
2017-07-21 18:21:34 +02:00
DebugShortcuts = DebugBackground | DebugStatistics,
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 rotateSkin();
void changeFonts( int increment );
2017-07-21 18:21:34 +02:00
void showBackground();
void debugStatistics();
};
Q_DECLARE_OPERATORS_FOR_FLAGS( SkinnyShortcut::Types )
#endif