summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt/Settings/GeneralPane.h
blob: b482172b0950ee5460181ae2129109f134e7b704 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
// Copyright 2017 Dolphin Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

#include <QWidget>

class ConfigBool;
class QCheckBox;
class QComboBox;
class QLabel;
class QPushButton;
class QRadioButton;
class QSlider;
class QVBoxLayout;
class ToolTipCheckBox;
class ToolTipComboBox;
class ToolTipPushButton;

namespace Core
{
enum class State;
}

class GeneralPane final : public QWidget
{
  Q_OBJECT
public:
  explicit GeneralPane(QWidget* parent = nullptr);

private:
  void CreateLayout();
  void ConnectLayout();
  void CreateBasic();
  void CreateAutoUpdate();
  void CreateFallbackRegion();
  void AddDescriptions();

  void LoadConfig();
  void OnSaveConfig();
  void OnEmulationStateChanged(Core::State state);
  void UpdateDescriptionsUsingHardcoreStatus();

  // Widgets
  QVBoxLayout* m_main_layout;
  ToolTipComboBox* m_combobox_speedlimit;
  ToolTipComboBox* m_combobox_update_track;
  ToolTipComboBox* m_combobox_fallback_region;
  ConfigBool* m_checkbox_dualcore;
  ConfigBool* m_checkbox_cheats;
  ConfigBool* m_checkbox_load_games_into_memory;
  ConfigBool* m_checkbox_override_region_settings;
  ConfigBool* m_checkbox_auto_disc_change;
#ifdef USE_DISCORD_PRESENCE
  ToolTipCheckBox* m_checkbox_discord_presence;
#endif

// Analytics related
#if defined(USE_ANALYTICS) && USE_ANALYTICS
  void CreateAnalytics();
  void GenerateNewIdentity();

  ToolTipPushButton* m_button_generate_new_identity;
  ToolTipCheckBox* m_checkbox_enable_analytics;
#endif
};