本文整理汇总了C++中Gesture::getDirection方法的典型用法代码示例。如果您正苦于以下问题:C++ Gesture::getDirection方法的具体用法?C++ Gesture::getDirection怎么用?C++ Gesture::getDirection使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gesture
的用法示例。
在下文中一共展示了Gesture::getDirection方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: qDebug
Gesture *GestureHandler::createGesture(const QString &type, int id, const QHash<QString, QVariant>& attrs,
bool isComposedGesture) const
{
// Creamos el gesto sin su acción
Gesture *ret;
if (isComposedGesture)
ret = this->gestureFact->createComposedGesture(type, id, attrs);
else
ret = this->gestureFact->createSimpleGesture(type, id, attrs);
if (ret == NULL)
return NULL;
// Vemos sobre que ventana se ha ejecutado
Window gestureWindow = this->getGestureWindow(attrs.value(GEIS_GESTURE_ATTRIBUTE_CHILD_WINDOW_ID).toInt());
//if (gestureWindow == None)
// return NULL;
QString appClass = this->getAppClass(gestureWindow);
// Creamos y asignamos la acción asociada al gesto
ActionTypeEnum::ActionType actionType = this->config->getAssociatedAction(appClass, ret->getType(),
ret->getNumFingers(), ret->getDirection());
QString actionSettings = this->config->getAssociatedSettings(appClass, ret->getType(), ret->getNumFingers(),
ret->getDirection());
QString timing = this->config->getAssociatedTiming(appClass, ret->getType(), ret->getNumFingers(),
ret->getDirection());
ret->setAction(this->actionFact->createAction(actionType, actionSettings, timing, gestureWindow));
// Mostramos los datos sobre el gesto
qDebug() << "[+] New gesture:";
qDebug() << "\tType -> " << GestureTypeEnum::getValue(ret->getType());
qDebug() << "\tFingers -> " << ret->getNumFingers();
qDebug() << "\tDirection -> " << GestureDirectionEnum::getValue(ret->getDirection());
qDebug() << "\tAction -> " << ActionTypeEnum::getValue(actionType);
qDebug() << "\tTiming -> " << timing;
qDebug() << "\tApp Class -> " << appClass;
return ret;
}