[55401] | 1 | /* $Id: UIMachine.h 104374 2024-04-19 09:45:23Z vboxsync $ */
|
---|
[382] | 2 | /** @file
|
---|
[49498] | 3 | * VBox Qt GUI - UIMachine class declaration.
|
---|
[382] | 4 | */
|
---|
| 5 |
|
---|
| 6 | /*
|
---|
[98103] | 7 | * Copyright (C) 2010-2023 Oracle and/or its affiliates.
|
---|
[382] | 8 | *
|
---|
[96407] | 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
|
---|
[382] | 26 | */
|
---|
| 27 |
|
---|
[76581] | 28 | #ifndef FEQT_INCLUDED_SRC_runtime_UIMachine_h
|
---|
| 29 | #define FEQT_INCLUDED_SRC_runtime_UIMachine_h
|
---|
[76532] | 30 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
| 31 | # pragma once
|
---|
| 32 | #endif
|
---|
[382] | 33 |
|
---|
[41587] | 34 | /* Qt includes: */
|
---|
[26691] | 35 | #include <QObject>
|
---|
[98379] | 36 | #include <QPixmap>
|
---|
[26691] | 37 |
|
---|
[47478] | 38 | /* GUI includes: */
|
---|
[98787] | 39 | #include "UIAddDiskEncryptionPasswordDialog.h"
|
---|
[51187] | 40 | #include "UIExtraDataDefs.h"
|
---|
[26637] | 41 | #include "UIMachineDefs.h"
|
---|
[98808] | 42 | #include "UIMediumDefs.h"
|
---|
[98379] | 43 | #include "UIMousePointerShapeData.h"
|
---|
[98762] | 44 | #include "UITextTable.h"
|
---|
[12010] | 45 |
|
---|
[41587] | 46 | /* COM includes: */
|
---|
[103803] | 47 | #include "KBitmapFormat.h"
|
---|
| 48 | #include "KChipsetType.h"
|
---|
| 49 | #include "KClipboardMode.h"
|
---|
| 50 | #include "KDeviceActivity.h"
|
---|
| 51 | #include "KDnDMode.h"
|
---|
| 52 | #include "KGraphicsControllerType.h"
|
---|
| 53 | #include "KGuestMonitorChangedEventType.h"
|
---|
| 54 | #include "KGuestMonitorStatus.h"
|
---|
| 55 | #include "KMachineState.h"
|
---|
| 56 | #include "KParavirtProvider.h"
|
---|
| 57 | #include "KPlatformArchitecture.h"
|
---|
| 58 | #include "KVMExecutionEngine.h"
|
---|
[41587] | 59 |
|
---|
| 60 | /* Forward declarations: */
|
---|
[104374] | 61 | class QMenu;
|
---|
[26868] | 62 | class QWidget;
|
---|
[98399] | 63 | class UIActionPool;
|
---|
[98841] | 64 | class UIFrameBuffer;
|
---|
[98762] | 65 | class UIMachineLogic;
|
---|
[26691] | 66 | class UISession;
|
---|
[98503] | 67 | class CMediumAttachment;
|
---|
| 68 | class CNetworkAdapter;
|
---|
| 69 | class CUSBDevice;
|
---|
| 70 | class CVirtualBoxErrorInfo;
|
---|
[98386] | 71 | #ifdef VBOX_WS_MAC
|
---|
[98399] | 72 | class QMenuBar;
|
---|
[98386] | 73 | class QTimer;
|
---|
| 74 | #endif
|
---|
[20047] | 75 |
|
---|
[52987] | 76 | /** Singleton QObject extension
|
---|
| 77 | * used as virtual machine (VM) singleton instance. */
|
---|
[26637] | 78 | class UIMachine : public QObject
|
---|
[16319] | 79 | {
|
---|
| 80 | Q_OBJECT;
|
---|
| 81 |
|
---|
[49505] | 82 | signals:
|
---|
| 83 |
|
---|
[98423] | 84 | /** Notifies listeners about machine initialized. */
|
---|
| 85 | void sigInitialized();
|
---|
| 86 |
|
---|
[49505] | 87 | /** Requests async visual-state change. */
|
---|
[98882] | 88 | void sigRequestAsyncVisualStateChange(UIVisualStateType enmVisualStateType);
|
---|
[49505] | 89 |
|
---|
[98385] | 90 | /** @name COM events stuff.
|
---|
| 91 | ** @{ */
|
---|
| 92 | /** Notifies about additions state change. */
|
---|
| 93 | void sigAdditionsStateChange();
|
---|
| 94 | /** Notifies about additions state actually change. */
|
---|
| 95 | void sigAdditionsStateActualChange();
|
---|
| 96 | /** Notifies about audio adapter change. */
|
---|
| 97 | void sigAudioAdapterChange();
|
---|
| 98 | /** Notifies about clipboard mode change. */
|
---|
| 99 | void sigClipboardModeChange(KClipboardMode enmMode);
|
---|
[100606] | 100 | /** Notifies about a clipboard error. */
|
---|
| 101 | void sigClipboardError(QString strId, QString strMsg, long rcError);
|
---|
[98385] | 102 | /** Notifies about CPU execution cap change. */
|
---|
| 103 | void sigCPUExecutionCapChange();
|
---|
| 104 | /** Notifies about DnD mode change. */
|
---|
| 105 | void sigDnDModeChange(KDnDMode enmMode);
|
---|
| 106 | /** Notifies about guest monitor change. */
|
---|
| 107 | void sigGuestMonitorChange(KGuestMonitorChangedEventType emnChangeType, ulong uScreenId, QRect screenGeo);
|
---|
| 108 | /** Notifies about machine change. */
|
---|
| 109 | void sigMachineStateChange();
|
---|
| 110 | /** Notifies about medium change. */
|
---|
| 111 | void sigMediumChange(const CMediumAttachment &comMediumAttachment);
|
---|
| 112 | /** Notifies about network adapter change. */
|
---|
| 113 | void sigNetworkAdapterChange(const CNetworkAdapter &comNetworkAdapter);
|
---|
| 114 | /** Notifies about recording change. */
|
---|
| 115 | void sigRecordingChange();
|
---|
| 116 | /** Notifies about shared folder change. */
|
---|
| 117 | void sigSharedFolderChange();
|
---|
| 118 | /** Handles storage device change signal. */
|
---|
| 119 | void sigStorageDeviceChange(const CMediumAttachment &comAttachment, bool fRemoved, bool fSilent);
|
---|
| 120 | /** Handles USB controller change signal. */
|
---|
| 121 | void sigUSBControllerChange();
|
---|
| 122 | /** Handles USB device state change signal. */
|
---|
| 123 | void sigUSBDeviceStateChange(const CUSBDevice &comDevice, bool fAttached, const CVirtualBoxErrorInfo &comError);
|
---|
| 124 | /** Notifies about VRDE change. */
|
---|
| 125 | void sigVRDEChange();
|
---|
| 126 |
|
---|
| 127 | /** Notifies about runtime error happened. */
|
---|
| 128 | void sigRuntimeError(bool bIsFatal, const QString &strErrorId, const QString &strMessage);
|
---|
| 129 |
|
---|
| 130 | #ifdef VBOX_WS_MAC
|
---|
[98882] | 131 | /** macOS X: Notifies about VM window should be shown. */
|
---|
[98385] | 132 | void sigShowWindows();
|
---|
| 133 | #endif
|
---|
| 134 | /** @} */
|
---|
| 135 |
|
---|
[98384] | 136 | /** @name Keyboard stuff.
|
---|
| 137 | ** @{ */
|
---|
| 138 | /** Notifies about keyboard LEDs change. */
|
---|
| 139 | void sigKeyboardLedsChange();
|
---|
| 140 |
|
---|
| 141 | /** Notifies listeners about keyboard state-change. */
|
---|
| 142 | void sigKeyboardStateChange(int iState);
|
---|
| 143 | /** @} */
|
---|
| 144 |
|
---|
[98425] | 145 | /** @name Mouse stuff.
|
---|
[98379] | 146 | ** @{ */
|
---|
| 147 | /** Notifies listeners about mouse pointer shape change. */
|
---|
| 148 | void sigMousePointerShapeChange();
|
---|
| 149 | /** Notifies listeners about mouse capability change. */
|
---|
| 150 | void sigMouseCapabilityChange();
|
---|
| 151 | /** Notifies listeners about cursor position change. */
|
---|
| 152 | void sigCursorPositionChange();
|
---|
| 153 |
|
---|
| 154 | /** Notifies listeners about mouse state-change. */
|
---|
| 155 | void sigMouseStateChange(int iState);
|
---|
| 156 | /** @} */
|
---|
| 157 |
|
---|
[98386] | 158 | /** @name Host-screen stuff.
|
---|
| 159 | ** @{ */
|
---|
| 160 | /** Notifies about host-screen count change. */
|
---|
| 161 | void sigHostScreenCountChange();
|
---|
| 162 | /** Notifies about host-screen geometry change. */
|
---|
| 163 | void sigHostScreenGeometryChange();
|
---|
| 164 | /** Notifies about host-screen available-area change. */
|
---|
| 165 | void sigHostScreenAvailableAreaChange();
|
---|
| 166 | /** @} */
|
---|
| 167 |
|
---|
[16319] | 168 | public:
|
---|
| 169 |
|
---|
[98926] | 170 | /** Static factory to start machine. */
|
---|
| 171 | static bool startMachine();
|
---|
[53000] | 172 | /** Static constructor. */
|
---|
| 173 | static bool create();
|
---|
[52991] | 174 | /** Static destructor. */
|
---|
| 175 | static void destroy();
|
---|
| 176 | /** Static instance. */
|
---|
[98402] | 177 | static UIMachine *instance() { return s_pInstance; }
|
---|
[52894] | 178 |
|
---|
[98423] | 179 | /** Returns whether machine is initialized. */
|
---|
| 180 | bool isInitialized() const { return m_fInitialized; }
|
---|
| 181 |
|
---|
[53041] | 182 | /** Returns session UI instance. */
|
---|
[52989] | 183 | UISession *uisession() const { return m_pSession; }
|
---|
[53041] | 184 | /** Returns machine-logic instance. */
|
---|
[98840] | 185 | UIMachineLogic *machineLogic() const { return m_pMachineLogic; }
|
---|
[98841] | 186 | /** Returns frame-buffer reference for screen with @a uScreenId specified. */
|
---|
| 187 | UIFrameBuffer *frameBuffer(ulong uScreenId);
|
---|
[52987] | 188 | /** Returns active machine-window reference (if possible). */
|
---|
[98882] | 189 | QWidget *activeWindow() const;
|
---|
[26868] | 190 |
|
---|
[98940] | 191 | /** Returns whether session UI is valid. */
|
---|
| 192 | bool isSessionValid() const;
|
---|
| 193 |
|
---|
[51565] | 194 | /** Returns whether requested visual @a state allowed. */
|
---|
[99135] | 195 | bool isVisualStateAllowed(UIVisualStateType state) const { return m_enmAllowedVisualStates & state; }
|
---|
[47478] | 196 |
|
---|
[49505] | 197 | /** Requests async visual-state change. */
|
---|
[98882] | 198 | void asyncChangeVisualState(UIVisualStateType enmVisualStateType);
|
---|
[49505] | 199 |
|
---|
[88633] | 200 | /** Requests visual-state to be entered when possible. */
|
---|
[98882] | 201 | void setRequestedVisualState(UIVisualStateType enmVisualStateType);
|
---|
[88633] | 202 | /** Returns requested visual-state to be entered when possible. */
|
---|
| 203 | UIVisualStateType requestedVisualState() const;
|
---|
| 204 |
|
---|
[98422] | 205 | /** @name General stuff.
|
---|
| 206 | ** @{ */
|
---|
| 207 | /** Returns the machine name. */
|
---|
| 208 | QString machineName() const;
|
---|
[98722] | 209 | /** Returns the OS type id. */
|
---|
| 210 | QString osTypeId() const;
|
---|
[98776] | 211 |
|
---|
[98809] | 212 | /** Acquire machine pixmap. */
|
---|
| 213 | void acquireMachinePixmap(const QSize &size, QPixmap &pixmap);
|
---|
| 214 | /** Acquire user machine icon. */
|
---|
| 215 | void acquireUserMachineIcon(QIcon &icon);
|
---|
[98776] | 216 |
|
---|
[102599] | 217 | /** Acquires architecture type. */
|
---|
| 218 | bool acquireArchitectureType(KPlatformArchitecture &enmType);
|
---|
[98776] | 219 | /** Acquires chipset type. */
|
---|
| 220 | bool acquireChipsetType(KChipsetType &enmType);
|
---|
[98422] | 221 | /** @} */
|
---|
| 222 |
|
---|
[98376] | 223 | /** @name Branding stuff.
|
---|
| 224 | ** @{ */
|
---|
| 225 | /** Returns the cached machine-window icon. */
|
---|
| 226 | QIcon *machineWindowIcon() const { return m_pMachineWindowIcon; }
|
---|
| 227 | #ifndef VBOX_WS_MAC
|
---|
| 228 | /** Returns redefined machine-window name postfix. */
|
---|
| 229 | QString machineWindowNamePostfix() const { return m_strMachineWindowNamePostfix; }
|
---|
| 230 | #endif
|
---|
| 231 | /** @} */
|
---|
| 232 |
|
---|
[98399] | 233 | /** @name Actions stuff.
|
---|
| 234 | ** @{ */
|
---|
| 235 | /** Returns the action-pool instance. */
|
---|
| 236 | UIActionPool *actionPool() const { return m_pActionPool; }
|
---|
| 237 |
|
---|
| 238 | /** Updates additions actions state. */
|
---|
| 239 | void updateStateAdditionsActions();
|
---|
| 240 | /** Updates Audio action state. */
|
---|
| 241 | void updateStateAudioActions();
|
---|
| 242 | /** Updates Recording action state. */
|
---|
| 243 | void updateStateRecordingAction();
|
---|
| 244 | /** Updates VRDE server action state. */
|
---|
| 245 | void updateStateVRDEServerAction();
|
---|
| 246 | /** @} */
|
---|
| 247 |
|
---|
[98432] | 248 | /** @name Machine-state stuff.
|
---|
| 249 | ** @{ */
|
---|
[98983] | 250 | /** Returns previous machine state. */
|
---|
| 251 | KMachineState machineStatePrevious() const;
|
---|
[98674] | 252 | /** Returns cached machine state. */
|
---|
[98432] | 253 | KMachineState machineState() const;
|
---|
| 254 |
|
---|
| 255 | /** Resets previous state to be the same as current one. */
|
---|
| 256 | void forgetPreviousMachineState();
|
---|
| 257 |
|
---|
[98674] | 258 | /** Acquire live machine state. */
|
---|
| 259 | bool acquireLiveMachineState(KMachineState &enmState);
|
---|
| 260 |
|
---|
[98432] | 261 | /** Returns whether VM is in one of turned off states. */
|
---|
| 262 | bool isTurnedOff() const;
|
---|
| 263 | /** Returns whether VM is in one of paused states. */
|
---|
| 264 | bool isPaused() const;
|
---|
| 265 | /** Returns whether VM was in one of paused states. */
|
---|
| 266 | bool wasPaused() const;
|
---|
| 267 | /** Returns whether VM is in one of running states. */
|
---|
| 268 | bool isRunning() const;
|
---|
| 269 | /** Returns whether VM is in one of stuck states. */
|
---|
| 270 | bool isStuck() const;
|
---|
| 271 | /** Returns whether VM is one of states where guest-screen is undrawable. */
|
---|
| 272 | bool isGuestScreenUnDrawable() const;
|
---|
| 273 |
|
---|
[98653] | 274 | /** Resets VM. */
|
---|
| 275 | bool reset();
|
---|
[98432] | 276 | /** Performes VM pausing. */
|
---|
| 277 | bool pause();
|
---|
| 278 | /** Performes VM resuming. */
|
---|
| 279 | bool unpause();
|
---|
| 280 | /** Performes VM pausing/resuming depending on @a fPause state. */
|
---|
| 281 | bool setPause(bool fPause);
|
---|
| 282 | /** @} */
|
---|
| 283 |
|
---|
[98724] | 284 | /** @name Machine-data stuff.
|
---|
| 285 | ** @{ */
|
---|
[98746] | 286 | /** Acquires settings file path. */
|
---|
| 287 | bool acquireSettingsFilePath(QString &strPath);
|
---|
| 288 |
|
---|
[98724] | 289 | /** Saves machine data. */
|
---|
| 290 | bool saveSettings();
|
---|
| 291 | /** @} */
|
---|
| 292 |
|
---|
[98675] | 293 | /** @name Snapshot stuff.
|
---|
| 294 | ** @{ */
|
---|
| 295 | /** Acquires snapshot count. */
|
---|
| 296 | bool acquireSnapshotCount(ulong &uCount);
|
---|
| 297 | /** Acquires current snapshot name. */
|
---|
| 298 | bool acquireCurrentSnapshotName(QString &strName);
|
---|
[98744] | 299 |
|
---|
| 300 | /** Recursively searches for a first snapshot matching name template conditions. */
|
---|
| 301 | bool acquireMaxSnapshotIndex(const QString &strNameTemplate, ulong &uIndex);
|
---|
[98745] | 302 |
|
---|
| 303 | /** Takes snapshot with name & description specified. */
|
---|
| 304 | void takeSnapshot(const QString &strName, const QString &strDescription);
|
---|
[98675] | 305 | /** @} */
|
---|
| 306 |
|
---|
[98728] | 307 | /** @name Audio stuff.
|
---|
| 308 | ** @{ */
|
---|
| 309 | /** Acquires whether audio adapter is present. */
|
---|
| 310 | bool acquireWhetherAudioAdapterPresent(bool &fPresent);
|
---|
| 311 | /** Acquires whether audio adapter is enabled. */
|
---|
| 312 | bool acquireWhetherAudioAdapterEnabled(bool &fEnabled);
|
---|
| 313 | /** Acquires whether audio adapter output is enabled. */
|
---|
| 314 | bool acquireWhetherAudioAdapterOutputEnabled(bool &fEnabled);
|
---|
| 315 | /** Acquires whether audio adapter input is enabled. */
|
---|
| 316 | bool acquireWhetherAudioAdapterInputEnabled(bool &fEnabled);
|
---|
| 317 | /** Defines whether audio adapter output is enabled. */
|
---|
| 318 | bool setAudioAdapterOutputEnabled(bool fEnabled);
|
---|
| 319 | /** Defines whether audio adapter input is enabled. */
|
---|
| 320 | bool setAudioAdapterInputEnabled(bool fEnabled);
|
---|
| 321 | /** @} */
|
---|
| 322 |
|
---|
[98386] | 323 | /** @name Host-screen stuff.
|
---|
| 324 | ** @{ */
|
---|
| 325 | /** Returns the list of host-screen geometries we currently have. */
|
---|
| 326 | QList<QRect> hostScreens() const { return m_hostScreens; }
|
---|
| 327 | /** @} */
|
---|
| 328 |
|
---|
| 329 | /** @name Guest-screen stuff.
|
---|
| 330 | ** @{ */
|
---|
| 331 | /** Returns whether guest-screen with @a uScreenId specified is expected to be visible. */
|
---|
| 332 | bool isScreenVisibleHostDesires(ulong uScreenId) const;
|
---|
| 333 | /** Defines whether guest-screen with @a uScreenId specified is expected to be @a fVisible. */
|
---|
| 334 | void setScreenVisibleHostDesires(ulong uScreenId, bool fVisible);
|
---|
| 335 |
|
---|
| 336 | /** Returns whether guest-screen with @a uScreenId specified is actually visible. */
|
---|
| 337 | bool isScreenVisible(ulong uScreenId) const;
|
---|
| 338 | /** Defines whether guest-screen with @a uScreenId specified is actually @a fVisible. */
|
---|
| 339 | void setScreenVisible(ulong uScreenId, bool fIsMonitorVisible);
|
---|
| 340 |
|
---|
| 341 | /** Returns a number of visible guest-windows. */
|
---|
| 342 | int countOfVisibleWindows();
|
---|
| 343 | /** Returns the list of visible guest-windows. */
|
---|
| 344 | QList<int> listOfVisibleWindows() const;
|
---|
| 345 |
|
---|
[98452] | 346 | /** Returns size for guest-screen with index @a uScreenId. */
|
---|
| 347 | QSize guestScreenSize(ulong uScreenId) const;
|
---|
| 348 |
|
---|
[98386] | 349 | /** Returns last full-screen size for guest-screen with index @a uScreenId. */
|
---|
| 350 | QSize lastFullScreenSize(ulong uScreenId) const;
|
---|
| 351 | /** Defines last full-screen @a size for guest-screen with index @a uScreenId. */
|
---|
| 352 | void setLastFullScreenSize(ulong uScreenId, QSize size);
|
---|
[98425] | 353 |
|
---|
| 354 | /** Returns whether guest screen resize should be ignored. */
|
---|
| 355 | bool isGuestResizeIgnored() const { return m_fIsGuestResizeIgnored; }
|
---|
| 356 | /** Defines whether guest screen resize should be @a fIgnored. */
|
---|
| 357 | void setGuestResizeIgnored(bool fIgnored) { m_fIsGuestResizeIgnored = fIgnored; }
|
---|
[98520] | 358 |
|
---|
[98670] | 359 | /** Acquires graphics controller type. */
|
---|
| 360 | bool acquireGraphicsControllerType(KGraphicsControllerType &enmType);
|
---|
| 361 | /** Acquires VRAM size. */
|
---|
| 362 | bool acquireVRAMSize(ulong &uSize);
|
---|
| 363 | /** Acquires whether accelerate 3D is enabled. */
|
---|
| 364 | bool acquireWhetherAccelerate3DEnabled(bool &fEnabled);
|
---|
[98669] | 365 | /** Acquires monitor count. */
|
---|
| 366 | bool acquireMonitorCount(ulong &uCount);
|
---|
| 367 |
|
---|
[98520] | 368 | /** Acquires parameters for guest-screen with passed uScreenId. */
|
---|
| 369 | bool acquireGuestScreenParameters(ulong uScreenId,
|
---|
| 370 | ulong &uWidth, ulong &uHeight, ulong &uBitsPerPixel,
|
---|
| 371 | long &xOrigin, long &yOrigin, KGuestMonitorStatus &enmMonitorStatus);
|
---|
[98691] | 372 | /** Acquires saved info for guest-screen with passed uScreenId. */
|
---|
| 373 | bool acquireSavedGuestScreenInfo(ulong uScreenId,
|
---|
| 374 | long &xOrigin, long &yOrigin,
|
---|
| 375 | ulong &uWidth, ulong &uHeight, bool &fEnabled);
|
---|
[98547] | 376 | /** Defines video mode hint for guest-screen with passed uScreenId. */
|
---|
| 377 | bool setVideoModeHint(ulong uScreenId, bool fEnabled, bool fChangeOrigin,
|
---|
| 378 | long xOrigin, long yOrigin, ulong uWidth, ulong uHeight,
|
---|
| 379 | ulong uBitsPerPixel, bool fNotify);
|
---|
| 380 | /** Acquires video mode hint for guest-screen with passed uScreenId. */
|
---|
| 381 | bool acquireVideoModeHint(ulong uScreenId, bool &fEnabled, bool &fChangeOrigin,
|
---|
| 382 | long &xOrigin, long &yOrigin, ulong &uWidth, ulong &uHeight,
|
---|
| 383 | ulong &uBitsPerPixel);
|
---|
[98548] | 384 | /** Acquires screen-shot for guest-screen with passed uScreenId. */
|
---|
| 385 | bool acquireScreenShot(ulong uScreenId, ulong uWidth, ulong uHeight, KBitmapFormat enmFormat, uchar *pBits);
|
---|
[98691] | 386 | /** Acquires saved screen-shot info for guest-screen with passed uScreenId. */
|
---|
| 387 | bool acquireSavedScreenshotInfo(ulong uScreenId, ulong &uWidth, ulong &uHeight, QVector<KBitmapFormat> &formats);
|
---|
[98699] | 388 | /** Acquires saved screen-shot for guest-screen with passed uScreenId. */
|
---|
| 389 | bool acquireSavedScreenshot(ulong uScreenId, KBitmapFormat enmFormat,
|
---|
| 390 | ulong &uWidth, ulong &uHeight, QVector<BYTE> &screenshot);
|
---|
[98556] | 391 | /** Notifies guest-screen with passed uScreenId about scale-factor change. */
|
---|
| 392 | bool notifyScaleFactorChange(ulong uScreenId, ulong uScaleFactorWMultiplied, ulong uScaleFactorHMultiplied);
|
---|
| 393 | /** Notifies display about unscaled HiDPI policy change. */
|
---|
| 394 | bool notifyHiDPIOutputPolicyChange(bool fUnscaledHiDPI);
|
---|
| 395 | /** Defines whether seamless mode is enabled for display. */
|
---|
| 396 | bool setSeamlessMode(bool fEnabled);
|
---|
[98557] | 397 | /** Notifies display about viewport changes. */
|
---|
| 398 | bool viewportChanged(ulong uScreenId, ulong xOrigin, ulong yOrigin, ulong uWidth, ulong uHeight);
|
---|
| 399 | /** Notifies display about all screens were invalidated. */
|
---|
| 400 | bool invalidateAndUpdate();
|
---|
| 401 | /** Notifies display about screen with passed uScreenId was invalidated. */
|
---|
| 402 | bool invalidateAndUpdateScreen(ulong uScreenId);
|
---|
[98726] | 403 |
|
---|
| 404 | /** Acquires whether VRDE server is present. */
|
---|
| 405 | bool acquireWhetherVRDEServerPresent(bool &fPresent);
|
---|
| 406 | /** Acquires whether VRDE server is enabled. */
|
---|
| 407 | bool acquireWhetherVRDEServerEnabled(bool &fEnabled);
|
---|
| 408 | /** Defines whether VRDE server is enabled. */
|
---|
| 409 | bool setVRDEServerEnabled(bool fEnabled);
|
---|
[98801] | 410 | /** Acquires VRDE server port. */
|
---|
| 411 | bool acquireVRDEServerPort(long &iPort);
|
---|
[98727] | 412 |
|
---|
| 413 | /** Acquires whether recording settings is present. */
|
---|
| 414 | bool acquireWhetherRecordingSettingsPresent(bool &fPresent);
|
---|
| 415 | /** Acquires whether recording settings is enabled. */
|
---|
| 416 | bool acquireWhetherRecordingSettingsEnabled(bool &fEnabled);
|
---|
| 417 | /** Defines whether recording settings is enabled. */
|
---|
| 418 | bool setRecordingSettingsEnabled(bool fEnabled);
|
---|
[98386] | 419 | /** @} */
|
---|
| 420 |
|
---|
[98450] | 421 | /** @name Guest additions stuff.
|
---|
| 422 | ** @{ */
|
---|
| 423 | /** Returns whether guest additions is active. */
|
---|
| 424 | bool isGuestAdditionsActive() const;
|
---|
| 425 | /** Returns whether guest additions supports graphics. */
|
---|
| 426 | bool isGuestSupportsGraphics() const;
|
---|
| 427 | /** Returns whether guest additions supports seamless. */
|
---|
| 428 | bool isGuestSupportsSeamless() const;
|
---|
[98786] | 429 | /** Acquires the guest addition's version. */
|
---|
[98801] | 430 | bool acquireGuestAdditionsVersion(QString &strVersion);
|
---|
[98786] | 431 | /** Acquires the guest addition's revision. */
|
---|
[98801] | 432 | bool acquireGuestAdditionsRevision(ulong &uRevision);
|
---|
[102018] | 433 | /** Notifies guest about VM window focus changes. */
|
---|
| 434 | bool notifyGuiFocusChange(bool fInfocus);
|
---|
[98450] | 435 | /** @} */
|
---|
| 436 |
|
---|
[98384] | 437 | /** @name Keyboard stuff.
|
---|
| 438 | ** @{ */
|
---|
| 439 | /** Returns the NUM lock status. */
|
---|
| 440 | bool isNumLock() const { return m_fNumLock; }
|
---|
| 441 | /** Returns the CAPS lock status. */
|
---|
| 442 | bool isCapsLock() const { return m_fCapsLock; }
|
---|
| 443 | /** Returns the SCROLL lock status. */
|
---|
| 444 | bool isScrollLock() const { return m_fScrollLock; }
|
---|
| 445 |
|
---|
| 446 | /** Returns the NUM lock adaption count. */
|
---|
| 447 | uint numLockAdaptionCnt() const { return m_uNumLockAdaptionCnt; }
|
---|
| 448 | /** Defines the NUM lock adaption @a uCount. */
|
---|
| 449 | void setNumLockAdaptionCnt(uint uCount) { m_uNumLockAdaptionCnt = uCount; }
|
---|
| 450 |
|
---|
| 451 | /** Returns the CAPS lock adaption count. */
|
---|
| 452 | uint capsLockAdaptionCnt() const { return m_uCapsLockAdaptionCnt; }
|
---|
| 453 | /** Defines the CAPS lock adaption @a uCount. */
|
---|
| 454 | void setCapsLockAdaptionCnt(uint uCount) { m_uCapsLockAdaptionCnt = uCount; }
|
---|
| 455 |
|
---|
[98400] | 456 | /** Returns whether VM should perform HID LEDs synchronization. */
|
---|
| 457 | bool isHidLedsSyncEnabled() const { return m_fIsHidLedsSyncEnabled; }
|
---|
| 458 |
|
---|
[98425] | 459 | /** Returns whether auto-capture is disabled. */
|
---|
| 460 | bool isAutoCaptureDisabled() const { return m_fIsAutoCaptureDisabled; }
|
---|
| 461 | /** Defines whether auto-capture is @a fDisabled. */
|
---|
| 462 | void setAutoCaptureDisabled(bool fDisabled) { m_fIsAutoCaptureDisabled = fDisabled; }
|
---|
| 463 |
|
---|
[98384] | 464 | /** Returns the keyboard-state. */
|
---|
| 465 | int keyboardState() const { return m_iKeyboardState; }
|
---|
[98500] | 466 |
|
---|
| 467 | /** Sends a scan @a iCode to VM's keyboard. */
|
---|
[98601] | 468 | bool putScancode(LONG iCode);
|
---|
[98500] | 469 | /** Sends a list of scan @a codes to VM's keyboard. */
|
---|
[98601] | 470 | bool putScancodes(const QVector<LONG> &codes);
|
---|
[98500] | 471 | /** Sends the CAD sequence to VM's keyboard. */
|
---|
[98601] | 472 | bool putCAD();
|
---|
[98500] | 473 | /** Releases all keys. */
|
---|
[98601] | 474 | bool releaseKeys();
|
---|
[98500] | 475 | /** Sends a USB HID @a iUsageCode and @a iUsagePage to VM's keyboard.
|
---|
| 476 | * The @a fKeyRelease flag is set when the key is being released. */
|
---|
[98601] | 477 | bool putUsageCode(LONG iUsageCode, LONG iUsagePage, bool fKeyRelease);
|
---|
[98384] | 478 | /** @} */
|
---|
| 479 |
|
---|
[98425] | 480 | /** @name Mouse stuff.
|
---|
[98379] | 481 | ** @{ */
|
---|
| 482 | /** Returns whether we should hide host mouse pointer. */
|
---|
| 483 | bool isHidingHostPointer() const { return m_fIsHidingHostPointer; }
|
---|
| 484 | /** Returns whether there is valid mouse pointer shape present. */
|
---|
| 485 | bool isValidPointerShapePresent() const { return m_fIsValidPointerShapePresent; }
|
---|
| 486 | /** Returns whether the @a cursorPosition() is valid and could be used by the GUI now. */
|
---|
| 487 | bool isValidCursorPositionPresent() const { return m_fIsValidCursorPositionPresent; }
|
---|
| 488 |
|
---|
| 489 | /** Returns whether mouse supports absolute coordinates. */
|
---|
| 490 | bool isMouseSupportsAbsolute() const { return m_fIsMouseSupportsAbsolute; }
|
---|
| 491 | /** Returns whether mouse supports relative coordinates. */
|
---|
| 492 | bool isMouseSupportsRelative() const { return m_fIsMouseSupportsRelative; }
|
---|
| 493 | /** Returns whether touch screen is supported. */
|
---|
| 494 | bool isMouseSupportsTouchScreen() const { return m_fIsMouseSupportsTouchScreen; }
|
---|
| 495 | /** Returns whether touch pad is supported. */
|
---|
| 496 | bool isMouseSupportsTouchPad() const { return m_fIsMouseSupportsTouchPad; }
|
---|
| 497 | /** Returns whether guest requires host cursor to be shown. */
|
---|
| 498 | bool isMouseHostCursorNeeded() const { return m_fIsMouseHostCursorNeeded; }
|
---|
| 499 |
|
---|
| 500 | /** Returns whether mouse is captured. */
|
---|
| 501 | bool isMouseCaptured() const { return m_fIsMouseCaptured; }
|
---|
| 502 | /** Returns whether mouse is integrated. */
|
---|
| 503 | bool isMouseIntegrated() const { return m_fIsMouseIntegrated; }
|
---|
| 504 | /** Defines whether mouse is @a fCaptured. */
|
---|
| 505 | void setMouseCaptured(bool fCaptured) { m_fIsMouseCaptured = fCaptured; }
|
---|
| 506 | /** Defines whether mouse is @a fIntegrated. */
|
---|
| 507 | void setMouseIntegrated(bool fIntegrated) { m_fIsMouseIntegrated = fIntegrated; }
|
---|
| 508 |
|
---|
| 509 | /** Returns currently cached mouse cursor shape pixmap. */
|
---|
| 510 | QPixmap cursorShapePixmap() const { return m_cursorShapePixmap; }
|
---|
| 511 | /** Returns currently cached mouse cursor mask pixmap. */
|
---|
| 512 | QPixmap cursorMaskPixmap() const { return m_cursorMaskPixmap; }
|
---|
| 513 | /** Returns currently cached mouse cursor size. */
|
---|
| 514 | QSize cursorSize() const { return m_cursorSize; }
|
---|
| 515 | /** Returns currently cached mouse cursor hotspot. */
|
---|
| 516 | QPoint cursorHotspot() const { return m_cursorHotspot; }
|
---|
| 517 | /** Returns currently cached mouse cursor position. */
|
---|
| 518 | QPoint cursorPosition() const { return m_cursorPosition; }
|
---|
| 519 |
|
---|
| 520 | /** Returns mouse-state. */
|
---|
| 521 | int mouseState() const { return m_iMouseState; }
|
---|
[98503] | 522 |
|
---|
| 523 | /** Sends relative mouse move event to VM's mouse. */
|
---|
[98601] | 524 | bool putMouseEvent(long iDx, long iDy, long iDz, long iDw, long iButtonState);
|
---|
[98503] | 525 | /** Sends absolute mouse move event to VM's mouse. */
|
---|
[98601] | 526 | bool putMouseEventAbsolute(long iX, long iY, long iDz, long iDw, long iButtonState);
|
---|
[98503] | 527 | /** Sends multi-touch event to VM's mouse. */
|
---|
[98601] | 528 | bool putEventMultiTouch(long iCount, const QVector<LONG64> &contacts, bool fIsTouchScreen, ulong uScanTime);
|
---|
[98700] | 529 |
|
---|
[98751] | 530 | /** Acquires clipboard mode. */
|
---|
| 531 | bool acquireClipboardMode(KClipboardMode &enmMode);
|
---|
| 532 | /** Defines clipboard mode. */
|
---|
| 533 | bool setClipboardMode(KClipboardMode enmMode);
|
---|
[101719] | 534 | /** En/disables guest clipboard file transfers. */
|
---|
| 535 | bool toggleClipboardFileTransfer(bool fEnabled);
|
---|
| 536 | /** Returns true if clipboard file transfer is enabled. Returns false otherwise or in case of an error. */
|
---|
| 537 | bool isClipboardFileTransferEnabled();
|
---|
[98751] | 538 |
|
---|
[98700] | 539 | /** Acquires D&D mode. */
|
---|
| 540 | bool acquireDnDMode(KDnDMode &enmMode);
|
---|
[98751] | 541 | /** Defines D&D mode. */
|
---|
| 542 | bool setDnDMode(KDnDMode enmMode);
|
---|
[98379] | 543 | /** @} */
|
---|
| 544 |
|
---|
[98654] | 545 | /** @name Storage stuff.
|
---|
| 546 | ** @{ */
|
---|
[98810] | 547 | /** Enumerates amount of storage devices. */
|
---|
| 548 | bool acquireAmountOfStorageDevices(ulong &cHardDisks, ulong &cOpticalDrives, ulong &cFloppyDrives);
|
---|
| 549 |
|
---|
[98784] | 550 | /** Returns a list of storage devices. */
|
---|
| 551 | bool storageDevices(KDeviceType enmDeviceType, QList<StorageDeviceInfo> &guiStorageDevices);
|
---|
| 552 |
|
---|
[98787] | 553 | /** Acquires encrypted media map. */
|
---|
| 554 | bool acquireEncryptedMedia(EncryptedMediumMap &media);
|
---|
[98654] | 555 | /** Adds encryption password. */
|
---|
| 556 | bool addEncryptionPassword(const QString &strId, const QString &strPassword, bool fClearOnSuspend);
|
---|
[98779] | 557 |
|
---|
| 558 | /** Calculates @a cAmount of immutable images. */
|
---|
| 559 | bool acquireAmountOfImmutableImages(ulong &cAmount);
|
---|
[98806] | 560 |
|
---|
| 561 | /** Attempts to mount medium with @p uMediumId to the machine
|
---|
| 562 | * if it can find an appropriate controller and port. */
|
---|
| 563 | bool mountBootMedium(const QUuid &uMediumId);
|
---|
[98808] | 564 |
|
---|
| 565 | /** Prepares storage menu. */
|
---|
| 566 | void prepareStorageMenu(QMenu *pMenu,
|
---|
| 567 | QObject *pListener, const char *pszSlotName,
|
---|
| 568 | const QString &strControllerName, const StorageSlot &storageSlot);
|
---|
| 569 | /** Updates machine storage with data described by target. */
|
---|
| 570 | void updateMachineStorage(const UIMediumTarget &target, UIActionPool *pActionPool);
|
---|
[98654] | 571 | /** @} */
|
---|
| 572 |
|
---|
[98620] | 573 | /** @name USB stuff.
|
---|
| 574 | ** @{ */
|
---|
[98829] | 575 | /** Acquires whether USB controller is enabled. */
|
---|
| 576 | void acquireWhetherUSBControllerEnabled(bool &fEnabled);
|
---|
| 577 | /** Acquires whether video input devices are enabled. */
|
---|
| 578 | void acquireWhetherVideoInputDevicesEnabled(bool &fEnabled);
|
---|
| 579 |
|
---|
[98620] | 580 | /** Returns a list of USB devices. */
|
---|
| 581 | bool usbDevices(QList<USBDeviceInfo> &guiUSBDevices);
|
---|
| 582 | /** Attaches USB device with passed @a uId. */
|
---|
| 583 | bool attachUSBDevice(const QUuid &uId);
|
---|
| 584 | /** Detaches USB device with passed @a uId. */
|
---|
| 585 | bool detachUSBDevice(const QUuid &uId);
|
---|
[98621] | 586 |
|
---|
| 587 | /** Returns a list of web cam devices. */
|
---|
| 588 | bool webcamDevices(QList<WebcamDeviceInfo> &guiWebcamDevices);
|
---|
| 589 | /** Attaches web cam device with passed @a strName and @a strPath. */
|
---|
| 590 | bool webcamAttach(const QString &strPath, const QString &strName);
|
---|
| 591 | /** Detaches web cam device with passed @a strName and @a strPath. */
|
---|
| 592 | bool webcamDetach(const QString &strPath, const QString &strName);
|
---|
[98620] | 593 | /** @} */
|
---|
| 594 |
|
---|
[98749] | 595 | /** @name Network stuff.
|
---|
| 596 | ** @{ */
|
---|
| 597 | /** Acquires whether network adapter is enabled. */
|
---|
| 598 | bool acquireWhetherNetworkAdapterEnabled(ulong uSlot, bool &fEnabled);
|
---|
[98811] | 599 | /** Acquires whether at leasst one network adapter is enabled. */
|
---|
| 600 | bool acquireWhetherAtLeastOneNetworkAdapterEnabled(bool &fEnabled);
|
---|
[98749] | 601 | /** Acquires whether network adapter cable is connected. */
|
---|
| 602 | bool acquireWhetherNetworkCableConnected(ulong uSlot, bool &fConnected);
|
---|
| 603 | /** Set whether network adapter cable is connected. */
|
---|
| 604 | bool setNetworkCableConnected(ulong uSlot, bool fConnected);
|
---|
| 605 | /** @} */
|
---|
| 606 |
|
---|
[98424] | 607 | /** @name Virtualization stuff.
|
---|
| 608 | ** @{ */
|
---|
| 609 | /** Returns IMachineDebugger::ExecutionEngine reference. */
|
---|
| 610 | KVMExecutionEngine vmExecutionEngine() const { return m_enmVMExecutionEngine; }
|
---|
| 611 |
|
---|
| 612 | /** Returns whether nested-paging CPU hardware virtualization extension is enabled. */
|
---|
| 613 | bool isHWVirtExNestedPagingEnabled() const { return m_fIsHWVirtExNestedPagingEnabled; }
|
---|
| 614 | /** Returns whether the VM is currently making use of the unrestricted execution feature of VT-x. */
|
---|
| 615 | bool isHWVirtExUXEnabled() const { return m_fIsHWVirtExUXEnabled; }
|
---|
| 616 |
|
---|
| 617 | /** Returns VM's effective paravirtualization provider. */
|
---|
| 618 | KParavirtProvider paravirtProvider() const { return m_enmParavirtProvider; }
|
---|
| 619 | /** @} */
|
---|
| 620 |
|
---|
[98482] | 621 | /** @name Status-bar stuff.
|
---|
| 622 | ** @{ */
|
---|
| 623 | /** Acquires device activity composing a vector of current @a states for device with @a deviceTypes specified. */
|
---|
[98601] | 624 | bool acquireDeviceActivity(const QVector<KDeviceType> &deviceTypes, QVector<KDeviceActivity> &states);
|
---|
[98485] | 625 |
|
---|
| 626 | /** Acquires status info for hard disk indicator. */
|
---|
| 627 | void acquireHardDiskStatusInfo(QString &strInfo, bool &fAttachmentsPresent);
|
---|
| 628 | /** Acquires status info for optical disk indicator. */
|
---|
| 629 | void acquireOpticalDiskStatusInfo(QString &strInfo, bool &fAttachmentsPresent, bool &fAttachmentsMounted);
|
---|
| 630 | /** Acquires status info for floppy disk indicator. */
|
---|
| 631 | void acquireFloppyDiskStatusInfo(QString &strInfo, bool &fAttachmentsPresent, bool &fAttachmentsMounted);
|
---|
[98486] | 632 | /** Acquires status info for audio indicator. */
|
---|
| 633 | void acquireAudioStatusInfo(QString &strInfo, bool &fAudioEnabled, bool &fEnabledOutput, bool &fEnabledInput);
|
---|
[98487] | 634 | /** Acquires status info for network indicator. */
|
---|
| 635 | void acquireNetworkStatusInfo(QString &strInfo, bool &fAdaptersPresent, bool &fCablesDisconnected);
|
---|
[98488] | 636 | /** Acquires status info for USB indicator. */
|
---|
| 637 | void acquireUsbStatusInfo(QString &strInfo, bool &fUsbEnableds);
|
---|
| 638 | /** Acquires status info for Shared Folders indicator. */
|
---|
| 639 | void acquireSharedFoldersStatusInfo(QString &strInfo, bool &fFoldersPresent);
|
---|
[98486] | 640 | /** Acquires status info for Display indicator. */
|
---|
| 641 | void acquireDisplayStatusInfo(QString &strInfo, bool &fAcceleration3D);
|
---|
[98489] | 642 | /** Acquires status info for Recording indicator. */
|
---|
| 643 | void acquireRecordingStatusInfo(QString &strInfo, bool &fRecordingEnabled, bool &fMachinePaused);
|
---|
[98490] | 644 | /** Acquires status info for Features indicator. */
|
---|
| 645 | void acquireFeaturesStatusInfo(QString &strInfo, KVMExecutionEngine &enmEngine);
|
---|
[98482] | 646 | /** @} */
|
---|
| 647 |
|
---|
[98516] | 648 | /** @name Debugger stuff.
|
---|
| 649 | ** @{ */
|
---|
| 650 | /** Defines whether log is @a fEnabled. */
|
---|
[98602] | 651 | bool setLogEnabled(bool fEnabled);
|
---|
| 652 | /** Acquires whether log is @a fEnabled. */
|
---|
| 653 | bool acquireWhetherLogEnabled(bool &fEnabled);
|
---|
[98516] | 654 |
|
---|
[98722] | 655 | /** Acquire log folder. */
|
---|
| 656 | bool acquireLogFolder(QString &strFolder);
|
---|
| 657 |
|
---|
[98602] | 658 | /** Acquires effective CPU @a uLoad. */
|
---|
| 659 | bool acquireEffectiveCPULoad(ulong &uLoad);
|
---|
[98801] | 660 | /** Acquires uptime @a iUpTime as milliseconds. */
|
---|
| 661 | bool acquireUptime(LONG64 &iUpTime);
|
---|
[98605] | 662 |
|
---|
| 663 | #ifdef VBOX_WITH_DEBUGGER_GUI
|
---|
| 664 | /** Makes sure debugger GUI is created. */
|
---|
| 665 | bool dbgCreated(void *pActionDebug);
|
---|
| 666 | /** Makes sure debugger GUI is destroyed. */
|
---|
| 667 | void dbgDestroy();
|
---|
| 668 |
|
---|
| 669 | /** Shows debugger UI statistics window. */
|
---|
| 670 | void dbgShowStatistics();
|
---|
| 671 | /** Shows debugger UI command line window. */
|
---|
| 672 | void dbgShowCommandLine();
|
---|
| 673 |
|
---|
| 674 | /** Adjusts relative position for debugger window. */
|
---|
| 675 | void dbgAdjustRelativePos();
|
---|
| 676 | #endif /* VBOX_WITH_DEBUGGER_GUI */
|
---|
[98516] | 677 | /** @} */
|
---|
| 678 |
|
---|
[98402] | 679 | /** @name Close stuff.
|
---|
[98482] | 680 | ** @{ */
|
---|
[98404] | 681 | /** Returns whether VM is in 'manual-override' mode.
|
---|
| 682 | * @note S.a. #m_fIsManualOverride description for more information. */
|
---|
| 683 | bool isManualOverrideMode() const { return m_fIsManualOverride; }
|
---|
| 684 | /** Defines whether VM is in 'manual-override' mode.
|
---|
| 685 | * @note S.a. #m_fIsManualOverride description for more information. */
|
---|
| 686 | void setManualOverrideMode(bool fIsManualOverride) { m_fIsManualOverride = fIsManualOverride; }
|
---|
| 687 |
|
---|
[98401] | 688 | /** Returns default close action. */
|
---|
| 689 | MachineCloseAction defaultCloseAction() const { return m_defaultCloseAction; }
|
---|
| 690 | /** Returns merged restricted close actions. */
|
---|
| 691 | MachineCloseAction restrictedCloseActions() const { return m_restrictedCloseActions; }
|
---|
[98404] | 692 |
|
---|
[98607] | 693 | /** Acquires whether guest @a fEntered ACPI mode. */
|
---|
| 694 | bool acquireWhetherGuestEnteredACPIMode(bool &fEntered);
|
---|
| 695 |
|
---|
[102419] | 696 | /** Returns whether qpp quit is requested. */
|
---|
| 697 | bool isQuitRequested() const { return m_fQuitRequested; }
|
---|
| 698 |
|
---|
[98404] | 699 | /** Detaches and closes Runtime UI. */
|
---|
| 700 | void detachUi();
|
---|
| 701 | /** Saves VM state, then closes Runtime UI. */
|
---|
| 702 | void saveState();
|
---|
| 703 | /** Calls for guest shutdown to close Runtime UI. */
|
---|
| 704 | void shutdown();
|
---|
| 705 | /** Powers VM off, then closes Runtime UI. */
|
---|
| 706 | void powerOff(bool fIncludingDiscard);
|
---|
[98401] | 707 | /** @} */
|
---|
| 708 |
|
---|
[98762] | 709 | /** @name VM information stuff.
|
---|
| 710 | ** @{ */
|
---|
[98764] | 711 | /** Return general info. of the machine(). */
|
---|
[98762] | 712 | void generateMachineInformationGeneral(const UIExtraDataMetaDefs::DetailsElementOptionTypeGeneral &fOptions,
|
---|
| 713 | UITextTable &returnTable);
|
---|
[98764] | 714 | /** Return system info. of the machine(). */
|
---|
| 715 | void generateMachineInformationSystem(const UIExtraDataMetaDefs::DetailsElementOptionTypeSystem &fOptions,
|
---|
[98882] | 716 | UITextTable &returnTable);
|
---|
[98764] | 717 | /** Returns system info. of the machine(). */
|
---|
| 718 | void generateMachineInformationDisplay(const UIExtraDataMetaDefs::DetailsElementOptionTypeDisplay &fOptions,
|
---|
| 719 | UITextTable &returnTable);
|
---|
| 720 | /** Returns storage info. of the machine(). */
|
---|
| 721 | void generateMachineInformationStorage(const UIExtraDataMetaDefs::DetailsElementOptionTypeStorage &fOptions,
|
---|
| 722 | UITextTable &returnTable);
|
---|
| 723 | /** Returns audio info. of the machine(). */
|
---|
| 724 | void generateMachineInformationAudio(const UIExtraDataMetaDefs::DetailsElementOptionTypeAudio &fOptions,
|
---|
[98882] | 725 | UITextTable &returnTable);
|
---|
[98764] | 726 | /** Returns network info. of the machine(). */
|
---|
| 727 | void generateMachineInformationNetwork(const UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork &fOptions,
|
---|
| 728 | UITextTable &returnTable);
|
---|
| 729 | /** Returns serial info. of the machine(). */
|
---|
| 730 | void generateMachineInformationSerial(const UIExtraDataMetaDefs::DetailsElementOptionTypeSerial &fOptions,
|
---|
[98882] | 731 | UITextTable &returnTable);
|
---|
[98764] | 732 | /** Returns USB info. of the machine(). */
|
---|
| 733 | void generateMachineInformationUSB(const UIExtraDataMetaDefs::DetailsElementOptionTypeUsb &fOptions,
|
---|
[98882] | 734 | UITextTable &returnTable);
|
---|
[98764] | 735 | /** Returns shared folders info. of the machine(). */
|
---|
| 736 | void generateMachineInformationSharedFolders(const UIExtraDataMetaDefs::DetailsElementOptionTypeSharedFolders &fOptions,
|
---|
| 737 | UITextTable &returnTable);
|
---|
[98762] | 738 | /** @} */
|
---|
| 739 |
|
---|
[90883] | 740 | public slots:
|
---|
| 741 |
|
---|
[98855] | 742 | /** @name Guest additions stuff.
|
---|
| 743 | ** @{ */
|
---|
| 744 | /** Handles request to install guest additions image.
|
---|
| 745 | * @param strSource Brings the source of image being installed. */
|
---|
| 746 | void sltInstallGuestAdditionsFrom(const QString &strSource);
|
---|
| 747 | /** Mounts DVD adhoc.
|
---|
| 748 | * @param strSource Brings the source of image being mounted. */
|
---|
| 749 | void sltMountDVDAdHoc(const QString &strSource);
|
---|
| 750 | /** @} */
|
---|
| 751 |
|
---|
[100606] | 752 | /** @name Clipboard stuff.
|
---|
| 753 | ** @{ */
|
---|
| 754 | /** Handles clipboard errors. */
|
---|
| 755 | void sltClipboardError(QString strId, QString strMsg, long rcError);
|
---|
| 756 | /** @} */
|
---|
| 757 |
|
---|
[98384] | 758 | /** @name Keyboard stuff.
|
---|
| 759 | ** @{ */
|
---|
| 760 | /** Defines @a iKeyboardState. */
|
---|
| 761 | void setKeyboardState(int iKeyboardState) { m_iKeyboardState = iKeyboardState; emit sigKeyboardStateChange(m_iKeyboardState); }
|
---|
| 762 | /** @} */
|
---|
| 763 |
|
---|
[98425] | 764 | /** @name Mouse stuff.
|
---|
[98379] | 765 | ** @{ */
|
---|
| 766 | /** Defines @a iMouseState. */
|
---|
| 767 | void setMouseState(int iMouseState) { m_iMouseState = iMouseState; emit sigMouseStateChange(m_iMouseState); }
|
---|
| 768 | /** @} */
|
---|
| 769 |
|
---|
[98402] | 770 | /** @name Close stuff.
|
---|
[98482] | 771 | ** @{ */
|
---|
[98402] | 772 | /** Closes Runtime UI. */
|
---|
| 773 | void closeRuntimeUI();
|
---|
| 774 | /** @} */
|
---|
[57178] | 775 |
|
---|
[382] | 776 | private slots:
|
---|
| 777 |
|
---|
[52987] | 778 | /** Visual state-change handler. */
|
---|
[98882] | 779 | void sltChangeVisualState(UIVisualStateType enmVisualStateType);
|
---|
[382] | 780 |
|
---|
[98399] | 781 | /** @name COM events stuff.
|
---|
| 782 | ** @{ */
|
---|
| 783 | /** Handles additions state actual change signal. */
|
---|
| 784 | void sltHandleAdditionsActualChange();
|
---|
| 785 | /** Handles audio adapter change signal. */
|
---|
| 786 | void sltHandleAudioAdapterChange();
|
---|
| 787 | /** Handles recording change signal. */
|
---|
| 788 | void sltHandleRecordingChange();
|
---|
| 789 | /** Handles storage device change for @a attachment, which was @a fRemoved and it was @a fSilent for guest. */
|
---|
| 790 | void sltHandleStorageDeviceChange(const CMediumAttachment &comAttachment, bool fRemoved, bool fSilent);
|
---|
| 791 | /** Handles VRDE change signal. */
|
---|
| 792 | void sltHandleVRDEChange();
|
---|
| 793 | /** @} */
|
---|
| 794 |
|
---|
| 795 | /** @name Actions stuff.
|
---|
| 796 | ** @{ */
|
---|
| 797 | #ifdef VBOX_WS_MAC
|
---|
[98882] | 798 | /** macOS X: Handles menu-bar configuration-change. */
|
---|
[98399] | 799 | void sltHandleMenuBarConfigurationChange(const QUuid &uMachineID);
|
---|
| 800 | #endif
|
---|
| 801 | /** @} */
|
---|
| 802 |
|
---|
[98386] | 803 | /** @name Host-screen stuff.
|
---|
[98482] | 804 | ** @{ */
|
---|
[98386] | 805 | /** Handles host-screen count change. */
|
---|
| 806 | void sltHandleHostScreenCountChange();
|
---|
| 807 | /** Handles host-screen geometry change. */
|
---|
| 808 | void sltHandleHostScreenGeometryChange();
|
---|
| 809 | /** Handles host-screen available-area change. */
|
---|
| 810 | void sltHandleHostScreenAvailableAreaChange();
|
---|
| 811 | #ifdef VBOX_WS_MAC
|
---|
[98882] | 812 | /** macOS X: Restarts display-reconfiguration watchdog timer from the beginning.
|
---|
[98386] | 813 | * @note Watchdog is trying to determine display reconfiguration in
|
---|
| 814 | * UISession::sltCheckIfHostDisplayChanged() slot every 500ms for 40 tries. */
|
---|
| 815 | void sltHandleHostDisplayAboutToChange();
|
---|
| 816 | /** MacOS X: Determines display reconfiguration.
|
---|
| 817 | * @note Calls for UISession::sltHandleHostScreenCountChange() if screen count changed.
|
---|
| 818 | * @note Calls for UISession::sltHandleHostScreenGeometryChange() if screen geometry changed. */
|
---|
| 819 | void sltCheckIfHostDisplayChanged();
|
---|
| 820 | #endif /* VBOX_WS_MAC */
|
---|
| 821 | /** @} */
|
---|
| 822 |
|
---|
| 823 | /** @name Guest-screen stuff.
|
---|
[98482] | 824 | ** @{ */
|
---|
[98386] | 825 | /** Handles guest-monitor state change. */
|
---|
| 826 | void sltHandleGuestMonitorChange(KGuestMonitorChangedEventType enmChangeType, ulong uScreenId, QRect screenGeo);
|
---|
| 827 | /** @} */
|
---|
| 828 |
|
---|
[98384] | 829 | /** @name Keyboard stuff.
|
---|
| 830 | ** @{ */
|
---|
| 831 | /** Handles signal about keyboard LEDs change.
|
---|
| 832 | * @param fNumLock Brings NUM lock status.
|
---|
| 833 | * @param fCapsLock Brings CAPS lock status.
|
---|
| 834 | * @param fScrollLock Brings SCROLL lock status. */
|
---|
| 835 | void sltHandleKeyboardLedsChange(bool fNumLock, bool fCapsLock, bool fScrollLock);
|
---|
[98400] | 836 |
|
---|
| 837 | /** Handles signal about keyboard LEDs sync state change.
|
---|
| 838 | * @param fEnabled Brings sync status. */
|
---|
| 839 | void sltHidLedsSyncStateChanged(bool fEnabled) { m_fIsHidLedsSyncEnabled = fEnabled; }
|
---|
[98384] | 840 | /** @} */
|
---|
| 841 |
|
---|
[98425] | 842 | /** @name Mouse stuff.
|
---|
[98379] | 843 | ** @{ */
|
---|
| 844 | /** Handles signal about mouse pointer shape data change.
|
---|
| 845 | * @param shapeData Brings complex struct describing mouse pointer shape aspects. */
|
---|
| 846 | void sltMousePointerShapeChange(const UIMousePointerShapeData &shapeData);
|
---|
| 847 | /** Handles signal about mouse capability change.
|
---|
| 848 | * @param fSupportsAbsolute Brings whether mouse supports absolute coordinates.
|
---|
| 849 | * @param fSupportsRelative Brings whether mouse supports relative coordinates.
|
---|
| 850 | * @param fSupportsTouchScreen Brings whether touch screen is supported.
|
---|
| 851 | * @param fSupportsTouchPad Brings whether touch pad is supported.
|
---|
| 852 | * @param fNeedsHostCursor Brings whether guest requires host cursor to be shown. */
|
---|
| 853 | void sltMouseCapabilityChange(bool fSupportsAbsolute, bool fSupportsRelative,
|
---|
| 854 | bool fSupportsTouchScreen, bool fSupportsTouchPad,
|
---|
| 855 | bool fNeedsHostCursor);
|
---|
| 856 | /** Handles signal about guest request to change the cursor position to @a uX * @a uY.
|
---|
| 857 | * @param fContainsData Brings whether the @a uX and @a uY values are valid and could be used by the GUI now.
|
---|
| 858 | * @param uX Brings cursor position X origin.
|
---|
| 859 | * @param uY Brings cursor position Y origin. */
|
---|
| 860 | void sltCursorPositionChange(bool fContainsData,
|
---|
| 861 | unsigned long uX,
|
---|
| 862 | unsigned long uY);
|
---|
| 863 | /** @} */
|
---|
| 864 |
|
---|
[23723] | 865 | private:
|
---|
[4514] | 866 |
|
---|
[98882] | 867 | /** Constructs machine UI singleton. */
|
---|
[52989] | 868 | UIMachine();
|
---|
[98882] | 869 | /** Destructs machine UI singleton. */
|
---|
[103987] | 870 | virtual ~UIMachine() RT_OVERRIDE RT_FINAL;
|
---|
[52989] | 871 |
|
---|
[52987] | 872 | /** Prepare routine. */
|
---|
[52894] | 873 | bool prepare();
|
---|
[98903] | 874 | /** Prepares notification-center. */
|
---|
| 875 | void prepareNotificationCenter();
|
---|
[99139] | 876 | /** Prepare routine: Session stuff. */
|
---|
| 877 | bool prepareSession();
|
---|
[98427] | 878 | /** Prepare routine: Actions stuff. */
|
---|
| 879 | void prepareActions();
|
---|
[99140] | 880 | /** Prepare routine: Host-screen data stuff. */
|
---|
| 881 | void prepareHostScreenData();
|
---|
[98400] | 882 | /** Prepare routine: Keyboard stuff. */
|
---|
| 883 | void prepareKeyboard();
|
---|
[98401] | 884 | /** Prepare routine: Close stuff. */
|
---|
| 885 | void prepareClose();
|
---|
[99141] | 886 | /** Prepare routine: Visual-state stuff. */
|
---|
| 887 | void prepareVisualState();
|
---|
[53040] | 888 |
|
---|
[99142] | 889 | /** Update routine: Branding. */
|
---|
| 890 | void updateBranding();
|
---|
| 891 | /** Update routine: Guest screen data stuff. */
|
---|
| 892 | void updateGuestScreenData();
|
---|
| 893 |
|
---|
[99141] | 894 | /** Moves VM to initial state. */
|
---|
| 895 | void enterInitialVisualState();
|
---|
| 896 |
|
---|
[53041] | 897 | /** Cleanup routine: Machine-logic stuff. */
|
---|
| 898 | void cleanupMachineLogic();
|
---|
[99142] | 899 | /** Cleanup routine: Branding. */
|
---|
| 900 | void cleanupBranding();
|
---|
[99140] | 901 | /** Cleanup routine: Host-screen data stuff. */
|
---|
| 902 | void cleanupHostScreenData();
|
---|
[98399] | 903 | /** Cleanup routine: Actions stuff. */
|
---|
| 904 | void cleanupActions();
|
---|
[53040] | 905 | /** Cleanup routine: Session stuff. */
|
---|
| 906 | void cleanupSession();
|
---|
[98903] | 907 | /** Cleanups notification-center. */
|
---|
| 908 | void cleanupNotificationCenter();
|
---|
[52989] | 909 | /** Cleanup routine. */
|
---|
| 910 | void cleanup();
|
---|
[52894] | 911 |
|
---|
[98399] | 912 | /** @name Actions stuff.
|
---|
| 913 | ** @{ */
|
---|
| 914 | /** Updates action restrictions. */
|
---|
| 915 | void updateActionRestrictions();
|
---|
| 916 |
|
---|
| 917 | #ifdef VBOX_WS_MAC
|
---|
[98882] | 918 | /** macOS X: Updates menu-bar content. */
|
---|
[98399] | 919 | void updateMenu();
|
---|
| 920 | #endif
|
---|
| 921 | /** @} */
|
---|
| 922 |
|
---|
[98386] | 923 | /** @name Host-screen stuff.
|
---|
[98482] | 924 | ** @{ */
|
---|
[98386] | 925 | /** Update host-screen data. */
|
---|
| 926 | void updateHostScreenData();
|
---|
| 927 | /** @} */
|
---|
| 928 |
|
---|
[98425] | 929 | /** @name Mouse stuff.
|
---|
[98379] | 930 | ** @{ */
|
---|
| 931 | /** Updates mouse pointer shape. */
|
---|
| 932 | void updateMousePointerShape();
|
---|
| 933 |
|
---|
| 934 | /** Updates mouse states. */
|
---|
| 935 | void updateMouseState();
|
---|
| 936 |
|
---|
[100064] | 937 | #if defined(VBOX_WS_NIX) || defined(VBOX_WS_MAC)
|
---|
[98379] | 938 | /** Generate a BGRA bitmap which approximates a XOR/AND mouse pointer.
|
---|
| 939 | *
|
---|
| 940 | * Pixels which has 1 in the AND mask and not 0 in the XOR mask are replaced by
|
---|
| 941 | * the inverted pixel and 8 surrounding pixels with the original color.
|
---|
| 942 | * Fort example a white pixel (W) is replaced with a black (B) pixel:
|
---|
| 943 | * WWW
|
---|
| 944 | * W -> WBW
|
---|
| 945 | * WWW
|
---|
| 946 | * The surrounding pixels are written only if the corresponding source pixel
|
---|
| 947 | * does not affect the screen, i.e. AND bit is 1 and XOR value is 0. */
|
---|
| 948 | static void renderCursorPixels(const uint32_t *pu32XOR, const uint8_t *pu8AND,
|
---|
| 949 | uint32_t u32Width, uint32_t u32Height,
|
---|
| 950 | uint32_t *pu32Pixels, uint32_t cbPixels);
|
---|
[100064] | 951 | #endif /* VBOX_WS_NIX || VBOX_WS_MAC */
|
---|
[98379] | 952 |
|
---|
| 953 | #ifdef VBOX_WS_WIN
|
---|
[98882] | 954 | /** Windows: Returns whether pointer of 1bpp depth. */
|
---|
[98379] | 955 | static bool isPointer1bpp(const uint8_t *pu8XorMask,
|
---|
| 956 | uint uWidth,
|
---|
| 957 | uint uHeight);
|
---|
| 958 | #endif /* VBOX_WS_WIN */
|
---|
| 959 | /** @} */
|
---|
| 960 |
|
---|
[98424] | 961 | /** @name Virtualization stuff.
|
---|
| 962 | ** @{ */
|
---|
| 963 | /** Updates virtualization state. */
|
---|
| 964 | void updateVirtualizationState();
|
---|
| 965 | /** @} */
|
---|
| 966 |
|
---|
[98402] | 967 | /** Holds the static instance. */
|
---|
| 968 | static UIMachine *s_pInstance;
|
---|
[52991] | 969 |
|
---|
[98423] | 970 | /** Holds whether machine is initialized. */
|
---|
| 971 | bool m_fInitialized;
|
---|
| 972 |
|
---|
[52989] | 973 | /** Holds the session UI instance. */
|
---|
| 974 | UISession *m_pSession;
|
---|
[27243] | 975 |
|
---|
[53041] | 976 | /** Holds allowed visual states. */
|
---|
[99135] | 977 | UIVisualStateType m_enmAllowedVisualStates;
|
---|
[53041] | 978 | /** Holds initial visual state. */
|
---|
[99135] | 979 | UIVisualStateType m_enmInitialVisualState;
|
---|
[52989] | 980 | /** Holds current visual state. */
|
---|
[99135] | 981 | UIVisualStateType m_enmVisualState;
|
---|
[88633] | 982 | /** Holds visual state which should be entered when possible. */
|
---|
| 983 | UIVisualStateType m_enmRequestedVisualState;
|
---|
[53041] | 984 | /** Holds current machine-logic. */
|
---|
| 985 | UIMachineLogic *m_pMachineLogic;
|
---|
[98376] | 986 |
|
---|
| 987 | /** @name Branding stuff.
|
---|
| 988 | ** @{ */
|
---|
| 989 | /** Holds the cached machine-window icon. */
|
---|
| 990 | QIcon *m_pMachineWindowIcon;
|
---|
[98378] | 991 |
|
---|
[98376] | 992 | #ifndef VBOX_WS_MAC
|
---|
| 993 | /** Holds redefined machine-window name postfix. */
|
---|
| 994 | QString m_strMachineWindowNamePostfix;
|
---|
| 995 | #endif
|
---|
| 996 | /** @} */
|
---|
[98379] | 997 |
|
---|
[98399] | 998 | /** @name Actions stuff.
|
---|
| 999 | ** @{ */
|
---|
| 1000 | /** Holds the action-pool instance. */
|
---|
| 1001 | UIActionPool *m_pActionPool;
|
---|
| 1002 |
|
---|
| 1003 | #ifdef VBOX_WS_MAC
|
---|
[98882] | 1004 | /** macOS X: Holds the menu-bar instance. */
|
---|
[98399] | 1005 | QMenuBar *m_pMenuBar;
|
---|
| 1006 | #endif
|
---|
| 1007 | /** @} */
|
---|
| 1008 |
|
---|
[98386] | 1009 | /** @name Host-screen stuff.
|
---|
[98482] | 1010 | ** @{ */
|
---|
[98386] | 1011 | /** Holds the list of host-screen geometries we currently have. */
|
---|
| 1012 | QList<QRect> m_hostScreens;
|
---|
| 1013 |
|
---|
| 1014 | #ifdef VBOX_WS_MAC
|
---|
[98882] | 1015 | /** macOS X: Watchdog timer looking for display reconfiguration. */
|
---|
[98386] | 1016 | QTimer *m_pWatchdogDisplayChange;
|
---|
| 1017 | #endif
|
---|
| 1018 | /** @} */
|
---|
| 1019 |
|
---|
| 1020 | /** @name Guest-screen stuff.
|
---|
[98482] | 1021 | ** @{ */
|
---|
[98386] | 1022 | /** Holds the list of desired guest-screen visibility flags. */
|
---|
[99135] | 1023 | QVector<bool> m_guestScreenVisibilityVectorHostDesires;
|
---|
[98386] | 1024 | /** Holds the list of actual guest-screen visibility flags. */
|
---|
[99135] | 1025 | QVector<bool> m_guestScreenVisibilityVector;
|
---|
[98386] | 1026 |
|
---|
| 1027 | /** Holds the list of guest-screen full-screen sizes. */
|
---|
| 1028 | QVector<QSize> m_monitorLastFullScreenSizeVector;
|
---|
[98425] | 1029 |
|
---|
| 1030 | /** Holds whether guest screen resize should be ignored. */
|
---|
| 1031 | bool m_fIsGuestResizeIgnored;
|
---|
[98386] | 1032 | /** @} */
|
---|
| 1033 |
|
---|
[98384] | 1034 | /** @name Keyboard stuff.
|
---|
| 1035 | ** @{ */
|
---|
| 1036 | /** Holds the NUM lock status. */
|
---|
| 1037 | bool m_fNumLock;
|
---|
| 1038 | /** Holds the CAPS lock status. */
|
---|
| 1039 | bool m_fCapsLock;
|
---|
| 1040 | /** Holds the SCROLL lock status. */
|
---|
| 1041 | bool m_fScrollLock;
|
---|
| 1042 |
|
---|
| 1043 | /** Holds the NUM lock adaption count. */
|
---|
| 1044 | uint m_uNumLockAdaptionCnt;
|
---|
| 1045 | /** Holds the CAPS lock adaption count. */
|
---|
| 1046 | uint m_uCapsLockAdaptionCnt;
|
---|
| 1047 |
|
---|
[98400] | 1048 | /** Holds whether VM should perform HID LEDs synchronization. */
|
---|
| 1049 | bool m_fIsHidLedsSyncEnabled;
|
---|
| 1050 |
|
---|
[98425] | 1051 | /** Holds whether auto-capture is disabled. */
|
---|
| 1052 | bool m_fIsAutoCaptureDisabled;
|
---|
| 1053 |
|
---|
[98384] | 1054 | /** Holds the keyboard-state. */
|
---|
| 1055 | int m_iKeyboardState;
|
---|
| 1056 | /** @} */
|
---|
| 1057 |
|
---|
[98425] | 1058 | /** @name Mouse stuff.
|
---|
[98379] | 1059 | ** @{ */
|
---|
| 1060 | /** Holds whether we should hide host mouse pointer. */
|
---|
| 1061 | bool m_fIsHidingHostPointer;
|
---|
| 1062 | /** Holds whether there is valid mouse pointer shape present. */
|
---|
| 1063 | bool m_fIsValidPointerShapePresent;
|
---|
| 1064 | /** Holds whether the @a m_cursorPosition is valid and could be used by the GUI now. */
|
---|
| 1065 | bool m_fIsValidCursorPositionPresent;
|
---|
| 1066 |
|
---|
| 1067 | /** Holds whether mouse supports absolute coordinates. */
|
---|
| 1068 | bool m_fIsMouseSupportsAbsolute;
|
---|
| 1069 | /** Holds whether mouse supports relative coordinates. */
|
---|
| 1070 | bool m_fIsMouseSupportsRelative;
|
---|
| 1071 | /** Holds whether touch screen is supported. */
|
---|
| 1072 | bool m_fIsMouseSupportsTouchScreen;
|
---|
| 1073 | /** Holds whether touch pad is supported. */
|
---|
| 1074 | bool m_fIsMouseSupportsTouchPad;
|
---|
| 1075 | /** Holds whether guest requires host cursor to be shown. */
|
---|
| 1076 | bool m_fIsMouseHostCursorNeeded;
|
---|
| 1077 |
|
---|
| 1078 | /** Holds whether mouse is captured. */
|
---|
| 1079 | bool m_fIsMouseCaptured;
|
---|
| 1080 | /** Holds whether mouse is integrated. */
|
---|
| 1081 | bool m_fIsMouseIntegrated;
|
---|
| 1082 |
|
---|
| 1083 | /** Holds the mouse pointer shape data. */
|
---|
| 1084 | UIMousePointerShapeData m_shapeData;
|
---|
| 1085 |
|
---|
| 1086 | /** Holds cached mouse cursor shape pixmap. */
|
---|
| 1087 | QPixmap m_cursorShapePixmap;
|
---|
| 1088 | /** Holds cached mouse cursor mask pixmap. */
|
---|
| 1089 | QPixmap m_cursorMaskPixmap;
|
---|
| 1090 | /** Holds cached mouse cursor size. */
|
---|
| 1091 | QSize m_cursorSize;
|
---|
| 1092 | /** Holds cached mouse cursor hotspot. */
|
---|
| 1093 | QPoint m_cursorHotspot;
|
---|
| 1094 | /** Holds cached mouse cursor position. */
|
---|
| 1095 | QPoint m_cursorPosition;
|
---|
| 1096 |
|
---|
| 1097 | /** Holds the mouse-state. */
|
---|
| 1098 | int m_iMouseState;
|
---|
| 1099 | /** @} */
|
---|
[98401] | 1100 |
|
---|
[98424] | 1101 | /** @name Virtualization stuff.
|
---|
| 1102 | ** @{ */
|
---|
| 1103 | /** Holds the IMachineDebugger::ExecutionEngine reference. */
|
---|
| 1104 | KVMExecutionEngine m_enmVMExecutionEngine;
|
---|
| 1105 |
|
---|
| 1106 | /** Holds whether nested-paging CPU hardware virtualization extension is enabled. */
|
---|
| 1107 | bool m_fIsHWVirtExNestedPagingEnabled;
|
---|
| 1108 | /** Holds whether the VM is currently making use of the unrestricted execution feature of VT-x. */
|
---|
| 1109 | bool m_fIsHWVirtExUXEnabled;
|
---|
| 1110 |
|
---|
| 1111 | /** Holds the VM's effective paravirtualization provider. */
|
---|
| 1112 | KParavirtProvider m_enmParavirtProvider;
|
---|
| 1113 | /** @} */
|
---|
| 1114 |
|
---|
[98402] | 1115 | /** @name Close stuff.
|
---|
[98482] | 1116 | ** @{ */
|
---|
[98404] | 1117 | /** Holds whether VM is in 'manual-override' mode
|
---|
| 1118 | * which means there will be no automatic UI shutdowns,
|
---|
| 1119 | * visual representation mode changes and other stuff. */
|
---|
| 1120 | bool m_fIsManualOverride : 1;
|
---|
| 1121 |
|
---|
[98401] | 1122 | /** Default close action. */
|
---|
| 1123 | MachineCloseAction m_defaultCloseAction;
|
---|
| 1124 | /** Merged restricted close actions. */
|
---|
| 1125 | MachineCloseAction m_restrictedCloseActions;
|
---|
[102419] | 1126 |
|
---|
| 1127 | /** Holds whether app quit is requested. */
|
---|
| 1128 | bool m_fQuitRequested;
|
---|
[98401] | 1129 | /** @} */
|
---|
[23723] | 1130 | };
|
---|
[382] | 1131 |
|
---|
[52991] | 1132 | #define gpMachine UIMachine::instance()
|
---|
| 1133 |
|
---|
[76581] | 1134 | #endif /* !FEQT_INCLUDED_SRC_runtime_UIMachine_h */
|
---|