swift
settingscomponent.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (C) 2013 swift Project Community / Contributors
2 // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3 
5 
6 #ifndef SWIFT_GUI_COMPONENTS_SETTINGSCOMPONENT_H
7 #define SWIFT_GUI_COMPONENTS_SETTINGSCOMPONENT_H
8 
9 #include <QColor>
10 #include <QObject>
11 #include <QScopedPointer>
12 #include <QTabWidget>
13 
14 #include "gui/swiftguiexport.h"
16 
17 class QWidget;
18 
19 namespace Ui
20 {
21  class CSettingsComponent;
22 }
23 namespace swift::gui::components
24 {
26  class SWIFT_GUI_EXPORT CSettingsComponent : public QTabWidget
27  {
28  Q_OBJECT
29 
30  public:
34  {
35  SettingTabOverview,
36  SettingTabServers,
37  SettingTabGui,
38  SettingTabNetwork,
39  SettingTabHotkeys,
40  SettingTabAudio,
41  SettingTabDataAndCaches,
42  SettingTabSimulator,
43  SettingTabSimulatorBasics,
44  SettingTabSimulatorMessages,
45  SettingTabMatching,
46  SettingTabAdvanced
47  };
48 
50  explicit CSettingsComponent(QWidget *parent = nullptr);
51 
53  ~CSettingsComponent() override;
54 
57  getSimulatorSettings(const swift::misc::simulation::CSimulatorInfo &simulator) const;
58 
60  void setTab(SettingTab tab);
61 
63  void setSettingsOverviewTab();
64 
66  void setGuiOpacity(double value);
67 
68  signals:
70  void changedWindowsOpacity(int opacity);
71 
72  private:
74  void onOverviewButtonClicked();
75 
76  QScopedPointer<Ui::CSettingsComponent> ui;
77  };
78 } // namespace swift::gui::components
79 
80 #endif // SWIFT_GUI_COMPONENTS_SETTINGSCOMPONENT_H
void changedWindowsOpacity(int opacity)
Change the windows opacity 0..100.
Simple hardcoded info about the corresponding simulator.
Definition: simulatorinfo.h:41
Allows to have specific utility functions for each simulator.
High level reusable GUI components.
Definition: aboutdialog.cpp:13
#define SWIFT_GUI_EXPORT
Export a class or function from the library.