void ModelSelector::browse() { static Setting::Handle<QString> lastModelBrowseLocation("LastModelBrowseLocation", QStandardPaths::writableLocation(QStandardPaths::DownloadLocation)); QString filename = QFileDialog::getOpenFileName(NULL, "Select your model file ...", lastModelBrowseLocation.get(), "Model files (*.fst *.fbx)"); QFileInfo fileInfo(filename); if (fileInfo.isFile() && fileInfo.completeSuffix().contains(QRegExp("fst|fbx|FST|FBX"))) { _modelFile = fileInfo; _browseButton->setText(fileInfo.fileName()); lastModelBrowseLocation.set(fileInfo.path()); } }
JNIEXPORT void JNICALL Java_io_highfidelity_hifiinterface_fragment_SettingsFragment_updateHifiSetting(JNIEnv *env, jobject instance, jstring group_, jstring key_, jboolean value_) { const char *c_group = env->GetStringUTFChars(group_, 0); const char *c_key = env->GetStringUTFChars(key_, 0); const QString group = QString::fromUtf8(c_group); const QString key = QString::fromUtf8(c_key); env->ReleaseStringUTFChars(group_, c_group); env->ReleaseStringUTFChars(key_, c_key); bool value = value_; Setting::Handle<bool> setting { QStringList() << group << key , !value }; setting.set(value); }
void LODManager::saveSettings() { desktopLODDecreaseFPS.set(getDesktopLODDecreaseFPS()); hmdLODDecreaseFPS.set(getHMDLODDecreaseFPS()); }
void AddressManager::storeCurrentAddress() { currentAddressHandle.set(currentAddress()); }
void OctreeQuery::setMaxOctreePacketsPerSecond(int maxOctreePPS) { if (maxOctreePPS != _maxOctreePPS) { _maxOctreePPS = maxOctreePPS; maxOctreePacketsPerSecond.set(_maxOctreePPS); } }
void AvatarInputs::toggleZoom() { _mirrorZoomed = !_mirrorZoomed; rearViewZoomLevel.set(_mirrorZoomed ? 0 : 1); emit mirrorZoomedChanged(); }