#ifndef SWITCHINPUTMODEBUTTON_H #define SWITCHINPUTMODEBUTTON_H #include #include 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