Add Keyboard.
This commit is contained in:
29
src/keyboard/SwitchInputModeButton.h
Normal file
29
src/keyboard/SwitchInputModeButton.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#ifndef SWITCHINPUTMODEBUTTON_H
|
||||
#define SWITCHINPUTMODEBUTTON_H
|
||||
|
||||
#include <QPushButton>
|
||||
#include <QTimer>
|
||||
|
||||
class SwitchInputModeButton : public QPushButton
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit SwitchInputModeButton(QWidget *aParent = nullptr);
|
||||
~SwitchInputModeButton();
|
||||
|
||||
signals:
|
||||
void repeatPress();
|
||||
void singlePress();
|
||||
|
||||
private slots:
|
||||
void handleButtonPressed();
|
||||
void handleButtonReleased();
|
||||
void prepareRepeatPress();
|
||||
|
||||
private:
|
||||
bool mIsRepeat;
|
||||
QTimer* mTimer;
|
||||
};
|
||||
|
||||
#endif // SWITCHINPUTMODEBUTTON_H
|
||||
Reference in New Issue
Block a user