mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 06:44:06 +02:00
Wire CachesSizeDialog in Menu
This commit is contained in:
parent
7bf57b3cca
commit
59c9e0bb50
3 changed files with 19 additions and 2 deletions
|
@ -488,6 +488,7 @@ Menu::Menu() :
|
|||
false,
|
||||
&UserActivityLogger::getInstance(),
|
||||
SLOT(disable(bool)));
|
||||
addActionToQMenuAndActionHash(networkMenu, MenuOption::CachesSize, 0, this, SLOT(cachesSizeDialog()));
|
||||
|
||||
addActionToQMenuAndActionHash(developerMenu, MenuOption::WalletPrivateKey, 0, this, SLOT(changePrivateKey()));
|
||||
|
||||
|
@ -1416,6 +1417,18 @@ bool Menu::shouldRenderMesh(float largestDimension, float distanceToCamera) {
|
|||
return (distanceToCamera <= visibleDistanceAtClosestScale);
|
||||
}
|
||||
|
||||
void Menu::cachesSizeDialog() {
|
||||
qDebug() << "Caches size:" << _cachesSizeDialog.isNull();
|
||||
if (!_cachesSizeDialog) {
|
||||
_cachesSizeDialog = new CachesSizeDialog(DependencyManager::get<GLCanvas>().data());
|
||||
connect(_cachesSizeDialog, SIGNAL(closed()), _cachesSizeDialog, SLOT(deleteLater()));
|
||||
_cachesSizeDialog->show();
|
||||
if (_hmdToolsDialog) {
|
||||
_hmdToolsDialog->watchWindow(_cachesSizeDialog->windowHandle());
|
||||
}
|
||||
}
|
||||
_cachesSizeDialog->raise();
|
||||
}
|
||||
|
||||
void Menu::lodTools() {
|
||||
if (!_lodToolsDialog) {
|
||||
|
|
|
@ -159,6 +159,7 @@ public slots:
|
|||
void showLoginForCurrentDomain();
|
||||
void bandwidthDetails();
|
||||
void octreeStatsDetails();
|
||||
void cachesSizeDialog();
|
||||
void lodTools();
|
||||
void hmdTools(bool showTools);
|
||||
void loadSettings(QSettings* settings = NULL);
|
||||
|
@ -315,6 +316,7 @@ namespace MenuOption {
|
|||
const QString BandwidthDetails = "Bandwidth Details";
|
||||
const QString BlueSpeechSphere = "Blue Sphere While Speaking";
|
||||
const QString CascadedShadows = "Cascaded";
|
||||
const QString CachesSize = "Caches Size";
|
||||
const QString Chat = "Chat...";
|
||||
const QString ChatCircling = "Chat Circling";
|
||||
const QString CollideAsRagdoll = "Collide With Self (Ragdoll)";
|
||||
|
|
|
@ -62,6 +62,8 @@ void CachesSizeDialog::confirmClicked(bool checked) {
|
|||
ScriptCache::getInstance()->setUnusedResourceCacheSize(_scripts->value() * BYTES_PER_MEGABYTES);
|
||||
SoundCache::getInstance().setUnusedResourceCacheSize(_sounds->value() * BYTES_PER_MEGABYTES);
|
||||
DependencyManager::get<TextureCache>()->setUnusedResourceCacheSize(_textures->value() * BYTES_PER_MEGABYTES);
|
||||
|
||||
QDialog::close();
|
||||
}
|
||||
|
||||
void CachesSizeDialog::resetClicked(bool checked) {
|
||||
|
@ -74,10 +76,10 @@ void CachesSizeDialog::resetClicked(bool checked) {
|
|||
|
||||
void CachesSizeDialog::reject() {
|
||||
// Just regularly close upon ESC
|
||||
this->QDialog::close();
|
||||
QDialog::close();
|
||||
}
|
||||
|
||||
void CachesSizeDialog::closeEvent(QCloseEvent* event) {
|
||||
this->QDialog::closeEvent(event);
|
||||
QDialog::closeEvent(event);
|
||||
emit closed();
|
||||
}
|
Loading…
Reference in a new issue