1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/newbeats-pastes

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
shortcut.cpp 610
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
JackieLiu Отправлено 16.10.2020 19:46 bdb4081
#include <QDebug>
#include "shortcut.h"
DoubleCtrlShortcut::DoubleCtrlShortcut(QObject *parent) : QObject(parent),
m_timer(new QTimer),
m_isActive(false)
{
this->m_shortcut = new ShortcutPrivate();
QObject::connect(this->m_timer, &QTimer::timeout, [this](void) {
this->m_isActive = false;
this->m_timer->stop();
});
QObject::connect(this->m_shortcut, &ShortcutPrivate::activated, this, [this](void) {
if (this->m_isActive)
emit this->activated();
this->m_isActive = true;
if (this->m_timer->isActive())
this->m_timer->stop();
/* Record Press */
this->m_timer->start(300);
});
}

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/newbeats-pastes.git
git@api.gitlife.ru:oschina-mirror/newbeats-pastes.git
oschina-mirror
newbeats-pastes
newbeats-pastes
master