mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-17 17:11:23 +00:00
Used new Qt connect syntax
Fixed indenting Renamed click callback argument from 'val'->'checked' Converted m_gui re-usage to just reference ui Removed implicit capture from spinbox lambda Corrected millisecond acronym from mS->ms Removed superfluous QTimer include in gs_frame.cpp
This commit is contained in:
parent
22c33d4fb4
commit
3c0f6a2919
@ -8,7 +8,6 @@
|
||||
#include "Emu/Cell/Modules/cellScreenshot.h"
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QTimer>
|
||||
#include <QKeyEvent>
|
||||
#include <QMessageBox>
|
||||
#include <string>
|
||||
@ -74,7 +73,7 @@ gs_frame::gs_frame(const QRect& geometry, const QIcon& appIcon, const std::share
|
||||
connect(this, &QWindow::visibilityChanged, this, &gs_frame::HandleCursor);
|
||||
|
||||
// Configure the mouse hide on idle timer
|
||||
connect(&m_mousehide_timer, SIGNAL(timeout()), this, SLOT(MouseHideTimeout()));
|
||||
connect(&m_mousehide_timer, &QTimer::timeout, &gs_frame::MouseHideTimeout);
|
||||
m_mousehide_timer.setSingleShot(true);
|
||||
if (m_hide_mouse_after_idletime)
|
||||
{
|
||||
@ -527,7 +526,7 @@ bool gs_frame::event(QEvent* ev)
|
||||
}
|
||||
close();
|
||||
}
|
||||
if (ev->type() == QEvent::MouseMove)
|
||||
else if (ev->type() == QEvent::MouseMove)
|
||||
{
|
||||
// this will make the cursor visible again if it was hidden by the mouse idle timeout
|
||||
gs_frame::HandleCursor(visibility());
|
||||
|
@ -38,7 +38,7 @@ private:
|
||||
bool m_disable_kb_hotkeys = false;
|
||||
bool m_show_mouse_in_fullscreen = false;
|
||||
bool m_hide_mouse_after_idletime = false;
|
||||
u32 m_hide_mouse_idletime = 2000; // 2000 milliseconds)
|
||||
u32 m_hide_mouse_idletime = 2000; // ms
|
||||
|
||||
public:
|
||||
gs_frame(const QRect& geometry, const QIcon& appIcon, const std::shared_ptr<gui_settings>& gui_settings);
|
||||
|
@ -189,12 +189,12 @@ namespace gui
|
||||
const gui_save m_discordState = gui_save(meta, "discordState", "");
|
||||
const gui_save m_check_upd_start = gui_save(meta, "checkUpdateStart", true);
|
||||
|
||||
const gui_save gs_disableMouse = gui_save(gs_frame, "disableMouse", false);
|
||||
const gui_save gs_disableKbHotkeys = gui_save(gs_frame, "disableKbHotkeys", false);
|
||||
const gui_save gs_showMouseFs = gui_save(gs_frame, "showMouseInFullscreen", false);
|
||||
const gui_save gs_resize = gui_save(gs_frame, "resize", false);
|
||||
const gui_save gs_width = gui_save(gs_frame, "width", 1280);
|
||||
const gui_save gs_height = gui_save(gs_frame, "height", 720);
|
||||
const gui_save gs_disableMouse = gui_save(gs_frame, "disableMouse", false);
|
||||
const gui_save gs_disableKbHotkeys = gui_save(gs_frame, "disableKbHotkeys", false);
|
||||
const gui_save gs_showMouseFs = gui_save(gs_frame, "showMouseInFullscreen", false);
|
||||
const gui_save gs_resize = gui_save(gs_frame, "resize", false);
|
||||
const gui_save gs_width = gui_save(gs_frame, "width", 1280);
|
||||
const gui_save gs_height = gui_save(gs_frame, "height", 720);
|
||||
const gui_save gs_hideMouseIdle = gui_save(gs_frame, "hideMouseOnIdle", false);
|
||||
const gui_save gs_hideMouseIdleTime = gui_save(gs_frame, "hideMouseOnIdleTime", 2000);
|
||||
|
||||
|
@ -1269,14 +1269,14 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> gui_settings, std
|
||||
});
|
||||
|
||||
ui->gs_hideMouseOnIdle->setChecked(m_gui_settings->GetValue(gui::gs_hideMouseIdle).toBool());
|
||||
connect(ui->gs_hideMouseOnIdle, &QCheckBox::clicked, [this](bool val)
|
||||
connect(ui->gs_hideMouseOnIdle, &QCheckBox::clicked, [this](bool checked)
|
||||
{
|
||||
m_gui_settings->SetValue(gui::gs_hideMouseIdle, val);
|
||||
ui->gs_hideMouseOnIdleTime->setEnabled(val);
|
||||
m_gui_settings->SetValue(gui::gs_hideMouseIdle, checked);
|
||||
ui->gs_hideMouseOnIdleTime->setEnabled(checked);
|
||||
});
|
||||
ui->gs_hideMouseOnIdleTime->setEnabled(m_gui_settings->GetValue(gui::gs_hideMouseIdle).toBool());
|
||||
ui->gs_hideMouseOnIdleTime->setEnabled(ui->gs_hideMouseOnIdle->checkState() == Qt::CheckState::Checked);
|
||||
ui->gs_hideMouseOnIdleTime->setValue(m_gui_settings->GetValue(gui::gs_hideMouseIdleTime).toUInt());
|
||||
connect(ui->gs_hideMouseOnIdleTime, &QSpinBox::editingFinished, [=, this]()
|
||||
connect(ui->gs_hideMouseOnIdleTime, &QSpinBox::editingFinished, [this]()
|
||||
{
|
||||
m_gui_settings->SetValue(gui::gs_hideMouseIdleTime, ui->gs_hideMouseOnIdleTime->value());
|
||||
});
|
||||
|
@ -2370,7 +2370,7 @@
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string> mS</string>
|
||||
<string>ms</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>200</number>
|
||||
|
Loading…
Reference in New Issue
Block a user