this->aboutDialog = NULL;
this->screenshotDialog = NULL;
- advancedMenu = NULL;
- switchMenu = NULL;
- scaleMenu = NULL;
- controllerMenu = NULL;
-
- actionDetailedInfo = NULL;
- actionTopMost = NULL;
- actionShell = NULL;
- actionControlPanel = NULL;
- actionScreenShot = NULL;
- actionAbout = NULL;
- actionForceClose = NULL;
- actionClose = NULL;
+ this->advancedMenu = NULL;
+ this->switchMenu = NULL;
+ this->scaleMenu = NULL;
+ this->controllerMenu = NULL;
+
+ this->actionDetailedInfo = NULL;
+ this->actionTopMost = NULL;
+ this->actionShell = NULL;
+ this->actionControlPanel = NULL;
+ this->actionScreenShot = NULL;
+ this->actionAbout = NULL;
+ this->actionForceClose = NULL;
+ this->actionClose = NULL;
+
+ this->switchMapper = NULL;
+ this->scaleMapper = NULL;
+ this->controllerMapper = NULL;
vmName = this->parent->getUiInfo()->getVmName() + " : "
+ QString::number(get_device_serial_number());
}
if (hwKey->hasLongPressKeycode() == true) {
+ qDebug() << "dual key pressed";
+
/* long press checking first */
longPressTimer->start();
return;
target, hwKey->getRect(), LayoutForm::normal));
}
- int keycode = hwKey->getKeycode();
+ const int keycode = hwKey->getKeycode();
if (hwKey->hasLongPressKeycode() == true) {
if (longPressTimer->remainingTime() <= 0) {
/* long press */
- keycode = hwKey->getKeycodeType()->getLongPressKeycode();
- qDebug() << hwKey->getName() << "key long pressed:" << keycode;
+ qDebug() << "dual key released";
+ return;
} else {
/* short press */
longPressTimer->stop();
- qDebug() << hwKey->getName() << "key short pressed:" << keycode;
+ qDebug() << hwKey->getName() << "key short pressed:" << keycode;
+ do_hw_key_event(KEY_PRESSED, keycode);
}
-
- do_hw_key_event(KEY_PRESSED, keycode);
}
qDebug() << hwKey->getName() << "key released:" << keycode;
do_hw_key_event(KEY_RELEASED, keycode);
}
+void SkinKeyItem::longPressHook()
+{
+ /* long press detected */
+
+ if (hwKey->hasLongPressKeycode() == true) {
+ const int keycode = hwKey->getKeycodeType()->getLongPressKeycode();
+ qDebug() << hwKey->getName() << "key long pressed:" << keycode;
+ do_hw_key_event(KEY_PRESSED, keycode);
+ qDebug() << hwKey->getName() << "key released:" << keycode;
+ do_hw_key_event(KEY_RELEASED, keycode);
+ }
+}
+
/* override */
void SkinKeyItem::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
{
}
}
-void SkinKeyItem::longPressHook()
-{
- qDebug("key long press detected");
-
- /* do nothing */
-}
-
SkinKeyItem::~SkinKeyItem()
{
if (longPressTimer) {