VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsAudio.h@ 104158

Last change on this file since 104158 was 98103, checked in by vboxsync, 2 years ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.3 KB
Line 
1/* $Id: UIMachineSettingsAudio.h 98103 2023-01-17 14:15:46Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UIMachineSettingsAudio class declaration.
4 */
5
6/*
7 * Copyright (C) 2006-2023 Oracle and/or its affiliates.
8 *
9 * This file is part of VirtualBox base platform packages, as
10 * available from https://www.virtualbox.org.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation, in version 3 of the
15 * License.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, see <https://www.gnu.org/licenses>.
24 *
25 * SPDX-License-Identifier: GPL-3.0-only
26 */
27
28#ifndef FEQT_INCLUDED_SRC_settings_machine_UIMachineSettingsAudio_h
29#define FEQT_INCLUDED_SRC_settings_machine_UIMachineSettingsAudio_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34/* GUI includes: */
35#include "UISettingsPage.h"
36
37/* Forward declarations: */
38class UIAudioSettingsEditor;
39struct UIDataSettingsMachineAudio;
40typedef UISettingsCache<UIDataSettingsMachineAudio> UISettingsCacheMachineAudio;
41
42/** Machine settings: Audio page. */
43class SHARED_LIBRARY_STUFF UIMachineSettingsAudio : public UISettingsPageMachine
44{
45 Q_OBJECT;
46
47public:
48
49 /** Constructs Audio settings page. */
50 UIMachineSettingsAudio();
51 /** Destructs Audio settings page. */
52 virtual ~UIMachineSettingsAudio() RT_OVERRIDE;
53
54protected:
55
56 /** Returns whether the page content was changed. */
57 virtual bool changed() const RT_OVERRIDE;
58
59 /** Loads settings from external object(s) packed inside @a data to cache.
60 * @note This task WILL be performed in other than the GUI thread, no widget interactions! */
61 virtual void loadToCacheFrom(QVariant &data) RT_OVERRIDE;
62 /** Loads data from cache to corresponding widgets.
63 * @note This task WILL be performed in the GUI thread only, all widget interactions here! */
64 virtual void getFromCache() RT_OVERRIDE;
65
66 /** Saves data from corresponding widgets to cache.
67 * @note This task WILL be performed in the GUI thread only, all widget interactions here! */
68 virtual void putToCache() RT_OVERRIDE;
69 /** Saves settings from cache to external object(s) packed inside @a data.
70 * @note This task WILL be performed in other than the GUI thread, no widget interactions! */
71 virtual void saveFromCacheTo(QVariant &data) RT_OVERRIDE;
72
73 /** Handles translation event. */
74 virtual void retranslateUi() RT_OVERRIDE;
75
76 /** Performs final page polishing. */
77 virtual void polishPage() RT_OVERRIDE;
78
79private:
80
81 /** Prepares all. */
82 void prepare();
83 /** Prepares widgets. */
84 void prepareWidgets();
85 /** Prepares connections. */
86 void prepareConnections();
87 /** Cleanups all. */
88 void cleanup();
89
90 /** Saves existing data from cache. */
91 bool saveData();
92
93 /** Holds the page data cache instance. */
94 UISettingsCacheMachineAudio *m_pCache;
95
96 /** @name Widgets
97 * @{ */
98 /** Holds the audio settings editor instance. */
99 UIAudioSettingsEditor *m_pEditorAudioSettings;
100 /** @} */
101};
102
103#endif /* !FEQT_INCLUDED_SRC_settings_machine_UIMachineSettingsAudio_h */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette