Adding new property "showKeyboardFocusHighlight" to Web3DOverlay

This commit is contained in:
Faye Li Si Fi 2017-01-05 16:49:55 -08:00
parent 2bff5582bc
commit e7d14b9381
2 changed files with 9 additions and 0 deletions

View file

@ -355,6 +355,11 @@ void Web3DOverlay::setProperties(const QVariantMap& properties) {
if (dpi.isValid()) {
_dpi = dpi.toFloat();
}
auto showKeyboardFocusHighlight = properties["showKeyboardFocusHighlight"];
if (showKeyboardFocusHighlight.isValid()) {
_showKeyboardFocusHighlight = showKeyboardFocusHighlight.toBool;
}
}
QVariant Web3DOverlay::getProperty(const QString& property) {
@ -370,6 +375,9 @@ QVariant Web3DOverlay::getProperty(const QString& property) {
if (property == "dpi") {
return _dpi;
}
if (property == "showKeyboardFocusHighlight") {
return _showKeyboardFocusHighlight;
}
return Billboard3DOverlay::getProperty(property);
}

View file

@ -68,6 +68,7 @@ private:
float _dpi;
vec2 _resolution{ 640, 480 };
int _geometryId { 0 };
bool _showKeyboardFocusHighlight{ true };
bool _pressed{ false };
QTouchDevice _touchDevice;