VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsGeneral.h@ 93115

Last change on this file since 93115 was 93115, checked in by vboxsync, 3 years ago

scm --update-copyright-year

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.3 KB
Line 
1/* $Id: UIGlobalSettingsGeneral.h 93115 2022-01-01 11:31:46Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UIGlobalSettingsGeneral class declaration.
4 */
5
6/*
7 * Copyright (C) 2006-2022 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18#ifndef FEQT_INCLUDED_SRC_settings_global_UIGlobalSettingsGeneral_h
19#define FEQT_INCLUDED_SRC_settings_global_UIGlobalSettingsGeneral_h
20#ifndef RT_WITHOUT_PRAGMA_ONCE
21# pragma once
22#endif
23
24/* GUI includes: */
25#include "UISettingsPage.h"
26
27/* Forward declarations: */
28class QLabel;
29class UIDefaultMachineFolderEditor;
30class UIVRDEAuthLibraryEditor;
31struct UIDataSettingsGlobalGeneral;
32typedef UISettingsCache<UIDataSettingsGlobalGeneral> UISettingsCacheGlobalGeneral;
33
34/** Global settings: General page. */
35class SHARED_LIBRARY_STUFF UIGlobalSettingsGeneral : public UISettingsPageGlobal
36{
37 Q_OBJECT;
38
39public:
40
41 /** Constructs settings page. */
42 UIGlobalSettingsGeneral();
43 /** Destructs settings page. */
44 virtual ~UIGlobalSettingsGeneral() /* override */;
45
46protected:
47
48 /** Loads settings from external object(s) packed inside @a data to cache.
49 * @note This task WILL be performed in other than the GUI thread, no widget interactions! */
50 virtual void loadToCacheFrom(QVariant &data) /* override */;
51 /** Loads data from cache to corresponding widgets.
52 * @note This task WILL be performed in the GUI thread only, all widget interactions here! */
53 virtual void getFromCache() /* override */;
54
55 /** Saves data from corresponding widgets to cache.
56 * @note This task WILL be performed in the GUI thread only, all widget interactions here! */
57 virtual void putToCache() /* override */;
58 /** Saves settings from cache to external object(s) packed inside @a data.
59 * @note This task WILL be performed in other than the GUI thread, no widget interactions! */
60 virtual void saveFromCacheTo(QVariant &data) /* overrride */;
61
62 /** Handles translation event. */
63 virtual void retranslateUi() /* override */;
64
65private:
66
67 /** Prepares all. */
68 void prepare();
69 /** Prepares widgets. */
70 void prepareWidgets();
71 /** Cleanups all. */
72 void cleanup();
73
74 /** Saves existing data from cache. */
75 bool saveData();
76
77 /** Holds the page data cache instance. */
78 UISettingsCacheGlobalGeneral *m_pCache;
79
80 /** @name Widgets
81 * @{ */
82 /** Holds 'default machine folder' label instance. */
83 QLabel *m_pLabelDefaultMachineFolder;
84 /** Holds 'default machine folder' editor instance. */
85 UIDefaultMachineFolderEditor *m_pEditorDefaultMachineFolder;
86 /** Holds 'VRDE auth library' label instance. */
87 QLabel *m_pLabelVRDEAuthLibrary;
88 /** Holds 'VRDE auth library' editor instance. */
89 UIVRDEAuthLibraryEditor *m_pEditorVRDEAuthLibrary;
90 /** @} */
91};
92
93#endif /* !FEQT_INCLUDED_SRC_settings_global_UIGlobalSettingsGeneral_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