示例#1
0
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());
    }
}
示例#2
0
文件: native.cpp 项目: birarda/hifi
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);
}
示例#3
0
void LODManager::saveSettings() {
    desktopLODDecreaseFPS.set(getDesktopLODDecreaseFPS());
    hmdLODDecreaseFPS.set(getHMDLODDecreaseFPS());
}
示例#4
0
void AddressManager::storeCurrentAddress() {
    currentAddressHandle.set(currentAddress());
}
示例#5
0
void OctreeQuery::setMaxOctreePacketsPerSecond(int maxOctreePPS) {
    if (maxOctreePPS != _maxOctreePPS) {
        _maxOctreePPS = maxOctreePPS;
        maxOctreePacketsPerSecond.set(_maxOctreePPS);
    }
}
示例#6
0
void AvatarInputs::toggleZoom() {
    _mirrorZoomed = !_mirrorZoomed;
    rearViewZoomLevel.set(_mirrorZoomed ? 0 : 1);
    emit mirrorZoomedChanged();
}