qreal AsemanDevices::fontDensity() const { #ifdef Q_OS_ANDROID qreal ratio = isMobile()? (1.28)*1.25 : (1.28)*1.35; return p->java_layer->density()*ratio; #else #ifdef Q_OS_IOS return 1.4; #else #ifdef Q_OS_LINUX #ifdef Q_OS_UBUNTUTOUCH qreal ratio = 1.3; return ratio*density(); #else qreal ratio = 1.3; return ratio*density(); #endif #else #ifdef Q_OS_WIN32 qreal ratio = 1.4; return ratio*density(); #else qreal ratio = 1.3; return ratio*density(); #endif #endif #endif #endif }
quint64 QAndroidBearerEngine::bytesReceived(const QString &id) { QMutexLocker lock(&mutex); QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(id); if (!ptr || !ptr->isValid) return 0; return isMobile(ptr->bearerType) ? AndroidTrafficStats::getMobileRxBytes() : AndroidTrafficStats::getTotalRxBytes() - AndroidTrafficStats::getMobileRxBytes(); }
qreal AsemanDevices::keyboardHeight() const { #ifdef Q_OS_UBUNTUTOUCH return screenSize().height()*0.5; #else const QSize & scr_size = screenSize(); bool portrait = scr_size.width()<scr_size.height(); if( portrait ) { if( isMobile() ) return screenSize().height()*0.6; else return screenSize().height()*0.4; } else { if( isMobile() ) return screenSize().height()*0.7; else return screenSize().height()*0.5; } #endif }
bool QQuickControlSettings::hoverEnabled() const { return !isMobile() || !hasTouchScreen(); }
bool ProxyEntity::isDynamic() const { return Entity::isDynamic() || isMobile(); }
TRIGGER( targetobj )(obj user, obj usedon) { cleanup(); if(Q4BL(user, "The blacksmith skill", 0x00)) { return(0x00); } if(!Q4ZM(user)) { return(0x00); } if(isWeapon(usedon) && hasResource(usedon, resourceTypeToId("metal"))) { if(isInContainer(usedon)) { obj container = getTopmostContainer(usedon); if(isMobile(container)) { if(container != user) { systemMessage(user, "You can't work on that item."); return(0x00); } } } int Q4G6 = getWeaponCurHP(usedon); int Q56H = getWeaponMaxHP(usedon); if((Q56H == 0x00) || (Q4G6 >= Q56H)) { systemMessage(user, "That is already in full repair."); return(0x00); } int Q5MK = (Q56H - Q4G6) * 0x04E2 / Q56H - 0xFA; int Q4Q1; int success = testAndLearnSkill(user, 0x07, Q5MK, 0x32); Q56H --; Q4G6 --; if(Q4G6 < 0x01) { systemMessage(user, "You destroyed the item."); deleteObject(usedon); } else { if(success > 0x00) { Q4G6 = Q56H; systemMessage(user, "You repair the item."); } Q4Q1 = setWeaponMaxHP(usedon, Q56H); Q4Q1 = setWeaponCurHP(usedon, Q4G6); } if(Q46J(user, this)) { deleteObject(this); } return(0x00); } systemMessage(user, "You can't repair that."); return(0x00); }
bool QMLBridge::getGDBEnabled() { return settings.value(QStringLiteral("gdbEnabled"), !isMobile()).toBool(); }
bool QMLBridge::getDebugOnWarn() { return settings.value(QStringLiteral("debugOnWarn"), !isMobile()).toBool(); }