mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 04:57:58 +02:00
Added preferences setting for snapshot notifications
This commit is contained in:
parent
efa22b8fd9
commit
916cd86045
2 changed files with 13 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
||||||
//
|
//
|
||||||
// Re-created Bradley Austin Davis on 2016/01/22
|
// Re-created Bradley Austin Davis on 2016/01/22
|
||||||
// Copyright 2016 High Fidelity, Inc.
|
// Copyright 2016 High Fidelity, Inc.
|
||||||
|
// Copyright 2022 Overte e.V.
|
||||||
//
|
//
|
||||||
// Distributed under the Apache License, Version 2.0.
|
// Distributed under the Apache License, Version 2.0.
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
|
@ -246,6 +247,16 @@ void setupPreferences() {
|
||||||
preference->setStep(1);
|
preference->setStep(1);
|
||||||
preferences->addPreference(preference);
|
preferences->addPreference(preference);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
auto getter = []()->bool {
|
||||||
|
if (!DependencyManager::get<Snapshot>()->_snapshotNotifications.isSet()){
|
||||||
|
DependencyManager::get<Snapshot>()->_snapshotNotifications.set(true);
|
||||||
|
}
|
||||||
|
return DependencyManager::get<Snapshot>()->_snapshotNotifications.get(); };
|
||||||
|
auto setter = [](bool value) { DependencyManager::get<Snapshot>()->_snapshotNotifications.set(value); };
|
||||||
|
preferences->addPreference(new CheckPreference(SNAPSHOTS, "Display snapshot notifications", getter, setter));
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
auto getter = []()->bool { return !Menu::getInstance()->isOptionChecked(MenuOption::DisableActivityLogger); };
|
auto getter = []()->bool { return !Menu::getInstance()->isOptionChecked(MenuOption::DisableActivityLogger); };
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
//
|
//
|
||||||
// Created by Stojce Slavkovski on 1/26/14.
|
// Created by Stojce Slavkovski on 1/26/14.
|
||||||
// Copyright 2014 High Fidelity, Inc.
|
// Copyright 2014 High Fidelity, Inc.
|
||||||
|
// Copyright 2022 Overte e.V.
|
||||||
//
|
//
|
||||||
// Distributed under the Apache License, Version 2.0.
|
// Distributed under the Apache License, Version 2.0.
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
|
@ -63,6 +64,7 @@ public:
|
||||||
SnapshotMetaData* parseSnapshotData(QString snapshotPath);
|
SnapshotMetaData* parseSnapshotData(QString snapshotPath);
|
||||||
|
|
||||||
Setting::Handle<QString> _snapshotsLocation{ "snapshotsLocation" };
|
Setting::Handle<QString> _snapshotsLocation{ "snapshotsLocation" };
|
||||||
|
Setting::Handle<bool> _snapshotNotifications{ "snapshotNotifications", true };
|
||||||
void uploadSnapshot(const QString& filename, const QUrl& href = QUrl(""));
|
void uploadSnapshot(const QString& filename, const QUrl& href = QUrl(""));
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|
Loading…
Reference in a new issue