VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/settings/UIAdvancedSettingsDialogSpecific.h

Last change on this file was 105780, checked in by vboxsync, 3 weeks ago

FE/Qt: Advanced Settings Dialog: Adjust title NLS for Preferences and VM Settings dialogs.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.8 KB
Line 
1/* $Id: UIAdvancedSettingsDialogSpecific.h 105780 2024-08-21 16:44:16Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UIAdvancedSettingsDialogSpecific 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_UIAdvancedSettingsDialogSpecific_h
29#define FEQT_INCLUDED_SRC_settings_UIAdvancedSettingsDialogSpecific_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34/* GUI includes: */
35#include "UIAdvancedSettingsDialog.h"
36
37/* COM includes: */
38#include "CConsole.h"
39#include "CMachine.h"
40#include "CSession.h"
41
42/* Forward declarations: */
43class UIActionPool;
44
45/** UIAdvancedSettingsDialog extension encapsulating all the specific functionality of the Global Preferences. */
46class SHARED_LIBRARY_STUFF UIAdvancedSettingsDialogGlobal : public UIAdvancedSettingsDialog
47{
48 Q_OBJECT;
49
50public:
51
52 /** Constructs settings dialog passing @a pParent to the base-class.
53 * @param strCategory Brings the name of category to be opened.
54 * @param strControl Brings the name of control to be focused. */
55 UIAdvancedSettingsDialogGlobal(QWidget *pParent,
56 const QString &strCategory = QString(),
57 const QString &strControl = QString());
58
59protected:
60
61 /** Loads the dialog data. */
62 virtual bool load() RT_OVERRIDE;
63 /** Saves the dialog data. */
64 virtual void save() RT_OVERRIDE;
65
66 /** Returns the dialog title. */
67 virtual QString title() const RT_OVERRIDE;
68
69private slots:
70
71 /** Handles translation event. */
72 virtual void sltRetranslateUI() RT_OVERRIDE RT_FINAL;
73
74private:
75
76 /** Prepares all. */
77 void prepare();
78
79 /** Returns whether page with certain @a iPageId is available. */
80 bool isPageAvailable(int iPageId) const;
81};
82
83
84/** UIAdvancedSettingsDialog extension encapsulating all the specific functionality of the Machine Settings. */
85class SHARED_LIBRARY_STUFF UIAdvancedSettingsDialogMachine : public UIAdvancedSettingsDialog
86{
87 Q_OBJECT;
88
89public:
90
91 /** Constructs settings dialog passing @a pParent to the base-class.
92 * @param uMachineId Brings the machine ID.
93 * @param pActionPool Brings the action pool instance.
94 * @param strCategory Brings the name of category to be opened.
95 * @param strControl Brings the name of control to be focused. */
96 UIAdvancedSettingsDialogMachine(QWidget *pParent,
97 const QUuid &uMachineId,
98 UIActionPool *pActionPool,
99 const QString &strCategory = QString(),
100 const QString &strControl = QString());
101
102 /** Update machine stuff.
103 * @param uMachineId Brings the machine ID.
104 * @param strCategory Brings the name of category to be opened.
105 * @param strControl Brings the name of control to be focused. */
106 void setNewMachineId(const QUuid &uMachineId,
107 const QString &strCategory = QString(),
108 const QString &strControl = QString());
109
110protected:
111
112 /** Loads the dialog data. */
113 virtual bool load() RT_OVERRIDE;
114 /** Saves the dialog data. */
115 virtual void save() RT_OVERRIDE;
116
117 /** Returns the dialog title. */
118 virtual QString title() const RT_OVERRIDE;
119
120 /** Verifies data integrity between certain @a pSettingsPage and other pages. */
121 virtual void recorrelate(UISettingsPage *pSettingsPage) RT_OVERRIDE;
122
123protected slots:
124
125 /** Handles category change to @a cId. */
126 virtual void sltCategoryChanged(int cId) RT_OVERRIDE;
127
128 /** Handle serializartion finished. */
129 virtual void sltHandleSerializationFinished() RT_OVERRIDE;
130
131private slots:
132
133 /** Handles session state change for machine with certain @a uMachineId to @a enmSessionState. */
134 void sltSessionStateChanged(const QUuid &uMachineId, const KSessionState enmSessionState);
135 /** Handles machine state change for machine with certain @a uMachineId to @a enmMachineState. */
136 void sltMachineStateChanged(const QUuid &uMachineId, const KMachineState enmMachineState);
137 /** Handles machine data change for machine with certain @a uMachineId. */
138 void sltMachineDataChanged(const QUuid &uMachineId);
139 /** Handles translation event. */
140 virtual void sltRetranslateUI() RT_OVERRIDE RT_FINAL;
141
142private:
143
144 /** Prepares all. */
145 void prepare();
146
147 /** Returns whether page with certain @a iPageId is available. */
148 bool isPageAvailable(int iPageId) const;
149
150 /** Recalculates configuration access level. */
151 void updateConfigurationAccessLevel();
152
153 /** Holds the machine ID. */
154 QUuid m_uMachineId;
155 /** Holds the action-pool reference. */
156 UIActionPool *m_pActionPool;
157
158 /** Holds the session state. */
159 KSessionState m_enmSessionState;
160 /** Holds the machine state. */
161 KMachineState m_enmMachineState;
162
163 /** Holds the session reference. */
164 CSession m_session;
165 /** Holds the machine reference. */
166 CMachine m_machine;
167 /** Holds the console reference. */
168 CConsole m_console;
169};
170
171
172#endif /* !FEQT_INCLUDED_SRC_settings_UIAdvancedSettingsDialogSpecific_h */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle
ContactPrivacy/Do Not Sell My InfoTerms of Use