mirror of
https://git.sr.ht/~thestr4ng3r/chiaki
synced 2025-08-14 18:57:07 -07:00
Add Resolution and FPS Settings
This commit is contained in:
parent
cbf51a7f82
commit
686ef011f8
5 changed files with 115 additions and 0 deletions
|
@ -20,6 +20,8 @@
|
|||
|
||||
#include "host.h"
|
||||
|
||||
#include <chiaki/session.h>
|
||||
|
||||
#include <QSettings>
|
||||
|
||||
class Settings : public QObject
|
||||
|
@ -40,6 +42,12 @@ class Settings : public QObject
|
|||
bool GetDiscoveryEnabled() { return settings.value("settings/auto_discovery", true).toBool(); }
|
||||
void SetDiscoveryEnabled(bool enabled) { settings.setValue("settings/auto_discovery", enabled); }
|
||||
|
||||
ChiakiVideoResolutionPreset GetResolution() const;
|
||||
void SetResolution(ChiakiVideoResolutionPreset resolution);
|
||||
|
||||
ChiakiVideoFPSPreset GetFPS() const;
|
||||
void SetFPS(ChiakiVideoFPSPreset fps);
|
||||
|
||||
QList<RegisteredHost> GetRegisteredHosts() const { return registered_hosts.values(); }
|
||||
void AddRegisteredHost(const RegisteredHost &host);
|
||||
void RemoveRegisteredHost(const HostMAC &mac);
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
class Settings;
|
||||
class QListWidget;
|
||||
class QComboBox;
|
||||
|
||||
class SettingsDialog : public QDialog
|
||||
{
|
||||
|
@ -30,10 +31,16 @@ class SettingsDialog : public QDialog
|
|||
private:
|
||||
Settings *settings;
|
||||
|
||||
QComboBox *resolution_combo_box;
|
||||
QComboBox *fps_combo_box;
|
||||
|
||||
QListWidget *registered_hosts_list_widget;
|
||||
QPushButton *delete_registered_host_button;
|
||||
|
||||
private slots:
|
||||
void ResolutionSelected();
|
||||
void FPSSelected();
|
||||
|
||||
void UpdateRegisteredHosts();
|
||||
void UpdateRegisteredHostsButtons();
|
||||
void RegisterNewHost();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue