VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h@ 67277

Last change on this file since 67277 was 67277, checked in by vboxsync, 8 years ago

FE/Qt: Selector UI: Tools pane: Snapshot pane: Moving details related stuff to corresponding place.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 23.6 KB
Line 
1/* $Id: VBoxGlobal.h 67277 2017-06-06 16:39:59Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - VBoxGlobal class declaration.
4 */
5
6/*
7 * Copyright (C) 2006-2016 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 ___VBoxGlobal_h___
19#define ___VBoxGlobal_h___
20
21/* Qt includes: */
22#include <QApplication>
23#include <QLayout>
24#include <QMenu>
25#include <QStyle>
26#include <QHash>
27#include <QFileIconProvider>
28#include <QReadWriteLock>
29#ifdef VBOX_WS_MAC
30# include <QSet>
31#endif /* VBOX_WS_MAC */
32
33/* GUI includes: */
34#include "UIDefs.h"
35#include "UIMediumDefs.h"
36#ifdef VBOX_WS_X11
37# include "VBoxX11Helper.h"
38#endif /* VBOX_WS_X11 */
39
40/* COM includes: */
41#include "VBox/com/Guid.h"
42#include "CHost.h"
43#include "CVirtualBoxClient.h"
44#include "CVirtualBox.h"
45#include "CSession.h"
46#include "CGuestOSType.h"
47
48/* Other includes: */
49#ifdef VBOX_WS_X11
50# include <X11/Xdefs.h>
51#endif /* VBOX_WS_X11 */
52
53/* Forward declarations: */
54class QAction;
55class QLabel;
56class QToolButton;
57class UIMachine;
58class CMachine;
59class CMedium;
60class CUSBDevice;
61class CHostVideoInputDevice;
62class QSpinBox;
63class UIMediumEnumerator;
64class UIMedium;
65class UIIconPoolGeneral;
66class UIThreadPool;
67
68// VBoxGlobal class
69////////////////////////////////////////////////////////////////////////////////
70
71class VBoxUpdateDlg;
72
73class VBoxGlobal : public QObject
74{
75 Q_OBJECT
76
77public:
78
79 /** VM launch modes. */
80 enum LaunchMode
81 {
82 LaunchMode_Invalid,
83 LaunchMode_Default,
84 LaunchMode_Headless,
85 LaunchMode_Separate
86 };
87
88 /** Whether to start the VM running. */
89 enum StartRunning
90 {
91 StartRunning_Default, /**< Default (depends on debug settings). */
92 StartRunning_No, /**< Start the VM paused. */
93 StartRunning_Yes /**< Start the VM running. */
94 };
95
96 /* Static API: Create/destroy stuff: */
97 static VBoxGlobal* instance();
98 static void create();
99 static void destroy();
100
101 bool isValid() { return mValid; }
102 bool isCleaningUp() { return m_sfCleanupInProgress; }
103
104 static QString qtRTVersionString();
105 static uint qtRTVersion();
106 static QString qtCTVersionString();
107 static uint qtCTVersion();
108
109 QString vboxVersionString() const;
110 QString vboxVersionStringNormalized() const;
111
112 QString versionString() const { return mVerString; }
113 bool isBeta() const;
114
115 /** Returns whether GUI is separate (from VM) process. */
116 bool isSeparateProcess() const { return m_fSeparateProcess; }
117
118#ifdef VBOX_WS_MAC
119 /** Mac OS X: Returns #MacOSXRelease determined using <i>uname</i> call. */
120 static MacOSXRelease determineOsRelease();
121 /** Mac OS X: Returns #MacOSXRelease determined during VBoxGlobal prepare routine. */
122 MacOSXRelease osRelease() const { return m_osRelease; }
123#endif /* VBOX_WS_MAC */
124
125 /** Try to acquire COM cleanup protection token for reading. */
126 bool comTokenTryLockForRead() { return m_comCleanupProtectionToken.tryLockForRead(); }
127 /** Unlock previously acquired COM cleanup protection token. */
128 void comTokenUnlock() { return m_comCleanupProtectionToken.unlock(); }
129
130 /** Returns the copy of VirtualBox client wrapper. */
131 CVirtualBoxClient virtualBoxClient() const { return m_client; }
132 /** Returns the copy of VirtualBox object wrapper. */
133 CVirtualBox virtualBox() const { return m_vbox; }
134 /** Returns the copy of VirtualBox host-object wrapper. */
135 CHost host() const { return m_host; }
136 /** Returns the symbolic VirtualBox home-folder representation. */
137 QString homeFolder() const { return m_strHomeFolder; }
138
139 /** Returns the VBoxSVC availability value. */
140 bool isVBoxSVCAvailable() const { return m_fVBoxSVCAvailable; }
141
142 /** Returns the thread-pool instance. */
143 UIThreadPool* threadPool() const { return m_pThreadPool; }
144
145 /** Returns currently active virtual machine window. */
146 QWidget* activeMachineWindow() const;
147
148 bool is3DAvailableWorker() const;
149 bool is3DAvailable() const { if (m3DAvailable < 0) return is3DAvailableWorker(); return m3DAvailable != 0; }
150
151#ifdef VBOX_GUI_WITH_PIDFILE
152 void createPidfile();
153 void deletePidfile();
154#endif
155
156 /* branding */
157 bool brandingIsActive (bool aForce = false);
158 QString brandingGetKey (QString aKey);
159
160 bool processArgs();
161
162 bool switchToMachine(CMachine &machine);
163
164 bool launchMachine(CMachine &machine, LaunchMode enmLaunchMode = LaunchMode_Default);
165
166 bool isVMConsoleProcess() const { return !vmUuid.isNull(); }
167 bool showStartVMErrors() const { return mShowStartVMErrors; }
168 QString managedVMUuid() const { return vmUuid; }
169 QList<QUrl> &argUrlList() { return m_ArgUrlList; }
170
171 /** Returns whether the Extension Pack installation was requested at startup. */
172 bool isEPInstallationRequested() const { return m_fEPInstallationRequested; }
173 /** Defines whether the Extension Pack installation was @a fRequested at startup. */
174 void setEPInstallationRequested(bool fRequested) { m_fEPInstallationRequested = fRequested; }
175
176#ifdef VBOX_WS_X11
177 /** X11: Returns whether the Window Manager we are running at is composition one. */
178 bool isCompositingManagerRunning() const { return m_fCompositingManagerRunning; }
179 /** X11: Returns the type of the Window Manager we are running under. */
180 X11WMType typeOfWindowManager() const { return m_enmWindowManagerType; }
181#endif /* VBOX_WS_X11 */
182
183 /** Returns whether we should restore current snapshot before VM started. */
184 bool shouldRestoreCurrentSnapshot() const { return mRestoreCurrentSnapshot; }
185 /** Defines whether we should fRestore current snapshot before VM started. */
186 void setShouldRestoreCurrentSnapshot(bool fRestore) { mRestoreCurrentSnapshot = fRestore; }
187
188 bool hasFloppyImageToMount() const { return !m_strFloppyImage.isEmpty(); }
189 bool hasDvdImageToMount() const { return !m_strDvdImage.isEmpty(); }
190 QString const &getFloppyImage() const { return m_strFloppyImage; }
191 QString const &getDvdImage() const { return m_strDvdImage; }
192
193 bool isPatmDisabled() const { return mDisablePatm; }
194 bool isCsamDisabled() const { return mDisableCsam; }
195 bool isSupervisorCodeExecedRecompiled() const { return mRecompileSupervisor; }
196 bool isUserCodeExecedRecompiled() const { return mRecompileUser; }
197 bool areWeToExecuteAllInIem() const { return mExecuteAllInIem; }
198 bool isDefaultWarpPct() const { return mWarpPct == 100; }
199 uint32_t getWarpPct() const { return mWarpPct; }
200
201#ifdef VBOX_WITH_DEBUGGER_GUI
202 bool isDebuggerEnabled() const;
203 bool isDebuggerAutoShowEnabled() const;
204 bool isDebuggerAutoShowCommandLineEnabled() const;
205 bool isDebuggerAutoShowStatisticsEnabled() const;
206
207 RTLDRMOD getDebuggerModule() const { return m_hVBoxDbg; }
208#endif /* VBOX_WITH_DEBUGGER_GUI */
209
210 bool shouldStartPaused() const
211 {
212#ifdef VBOX_WITH_DEBUGGER_GUI
213 return m_enmStartRunning == StartRunning_Default ? isDebuggerAutoShowEnabled() : m_enmStartRunning == StartRunning_No;
214#else
215 return false;
216#endif
217 }
218
219 /* VBox enum to/from string/icon/color convertors */
220
221 QList <CGuestOSType> vmGuestOSFamilyList() const;
222 QList <CGuestOSType> vmGuestOSTypeList (const QString &aFamilyId) const;
223
224 /** Returns icon defined for a passed @a comMachine. */
225 QIcon vmUserIcon(const CMachine &comMachine) const;
226 /** Returns pixmap of a passed @a size defined for a passed @a comMachine. */
227 QPixmap vmUserPixmap(const CMachine &comMachine, const QSize &size) const;
228 /** Returns pixmap defined for a passed @a comMachine.
229 * In case if non-null @a pLogicalSize pointer provided, it will be updated properly. */
230 QPixmap vmUserPixmapDefault(const CMachine &comMachine, QSize *pLogicalSize = 0) const;
231
232 /** Returns pixmap corresponding to passed @a strOSTypeID. */
233 QIcon vmGuestOSTypeIcon(const QString &strOSTypeID) const;
234 /** Returns pixmap corresponding to passed @a strOSTypeID and @a size. */
235 QPixmap vmGuestOSTypePixmap(const QString &strOSTypeID, const QSize &size) const;
236 /** Returns pixmap corresponding to passed @a strOSTypeID.
237 * In case if non-null @a pLogicalSize pointer provided, it will be updated properly. */
238 QPixmap vmGuestOSTypePixmapDefault(const QString &strOSTypeID, QSize *pLogicalSize = 0) const;
239
240 CGuestOSType vmGuestOSType (const QString &aTypeId,
241 const QString &aFamilyId = QString::null) const;
242 QString vmGuestOSTypeDescription (const QString &aTypeId) const;
243
244 static inline QString yearsToString (uint32_t cVal)
245 {
246 return tr("%n year(s)", "", cVal);
247 }
248
249 static inline QString monthsToString (uint32_t cVal)
250 {
251 return tr("%n month(s)", "", cVal);
252 }
253
254 static inline QString daysToString (uint32_t cVal)
255 {
256 return tr("%n day(s)", "", cVal);
257 }
258
259 static inline QString hoursToString (uint32_t cVal)
260 {
261 return tr("%n hour(s)", "", cVal);
262 }
263
264 static inline QString minutesToString (uint32_t cVal)
265 {
266 return tr("%n minute(s)", "", cVal);
267 }
268
269 static inline QString secondsToString (uint32_t cVal)
270 {
271 return tr("%n second(s)", "", cVal);
272 }
273
274 QString differencingMediumTypeName() const { return mDiskTypes_Differencing; }
275
276 /**
277 * Similar to toString (KMediumType), but returns 'Differencing' for
278 * normal hard disks that have a parent.
279 */
280 QString mediumTypeString(const CMedium &medium) const;
281
282 QStringList COMPortNames() const;
283 QString toCOMPortName (ulong aIRQ, ulong aIOBase) const;
284 bool toCOMPortNumbers (const QString &aName, ulong &aIRQ, ulong &aIOBase) const;
285
286 QStringList LPTPortNames() const;
287 QString toLPTPortName (ulong aIRQ, ulong aIOBase) const;
288 bool toLPTPortNumbers (const QString &aName, ulong &aIRQ, ulong &aIOBase) const;
289
290 static bool hasAllowedExtension(const QString &strExt, const QStringList &extList)
291 {
292 for (int i = 0; i < extList.size(); ++i)
293 if (strExt.endsWith(extList.at(i), Qt::CaseInsensitive))
294 return true;
295 return false;
296 }
297
298 QIcon icon(QFileIconProvider::IconType type) { return m_globalIconProvider.icon(type); }
299 QIcon icon(const QFileInfo &info) { return m_globalIconProvider.icon(info); }
300
301 QPixmap warningIcon() const { return mWarningIcon; }
302 QPixmap errorIcon() const { return mErrorIcon; }
303
304 /* details generators */
305
306 QString details(const CMedium &medium, bool fPredictDiff, bool fUseHtml = true);
307
308 QString details (const CUSBDevice &aDevice) const;
309 QString toolTip (const CUSBDevice &aDevice) const;
310 QString toolTip (const CUSBDeviceFilter &aFilter) const;
311 QString toolTip(const CHostVideoInputDevice &webcam) const;
312
313 /* VirtualBox helpers */
314
315 CSession openSession(const QString &aId, KLockType aLockType = KLockType_Write);
316
317 /** Shortcut to openSession (aId, true). */
318 CSession openExistingSession(const QString &aId) { return openSession(aId, KLockType_Shared); }
319
320 /* API: Medium-processing stuff: */
321 void createMedium(const UIMedium &medium);
322 void deleteMedium(const QString &strMediumID);
323 QString openMediumWithFileOpenDialog(UIMediumType mediumType, QWidget *pParent = 0,
324 const QString &strDefaultFolder = QString(), bool fUseLastFolder = true);
325 QString openMedium(UIMediumType mediumType, QString strMediumLocation, QWidget *pParent = 0);
326
327 /* API: Medium-enumeration stuff: */
328 void startMediumEnumeration();
329 bool agressiveCaching() const { return mAgressiveCaching; }
330 bool isMediumEnumerationInProgress() const;
331 UIMedium medium(const QString &strMediumID) const;
332 QList<QString> mediumIDs() const;
333
334 /** Prepares storage menu according passed parameters.
335 * @param menu QMenu being prepared.
336 * @param pListener Listener QObject, this menu being prepared for.
337 * @param pszSlotName SLOT in the @a pListener above, this menu will be handled with.
338 * @param machine CMachine object, this menu being prepared for.
339 * @param strControllerName The name of the CStorageController in the @a machine above.
340 * @param storageSlot The StorageSlot of the CStorageController called @a strControllerName above. */
341 void prepareStorageMenu(QMenu &menu,
342 QObject *pListener, const char *pszSlotName,
343 const CMachine &machine, const QString &strControllerName, const StorageSlot &storageSlot);
344 /** Updates @a constMachine storage with data described by @a target. */
345 void updateMachineStorage(const CMachine &constMachine, const UIMediumTarget &target);
346
347 /* various helpers */
348
349 QString languageName() const;
350 QString languageCountry() const;
351 QString languageNameEnglish() const;
352 QString languageCountryEnglish() const;
353 QString languageTranslators() const;
354
355 void retranslateUi();
356
357 /* public static stuff */
358
359 static bool isDOSType (const QString &aOSTypeId);
360
361 static QString languageId();
362 static void loadLanguage (const QString &aLangId = QString::null);
363 QString helpFile() const;
364
365 static void setTextLabel (QToolButton *aToolButton, const QString &aTextLabel);
366
367 static QRect normalizeGeometry (const QRect &aRectangle, const QRegion &aBoundRegion,
368 bool aCanResize = true);
369 static QRect getNormalized (const QRect &aRectangle, const QRegion &aBoundRegion,
370 bool aCanResize = true);
371 static QRegion flip (const QRegion &aRegion);
372
373 static void centerWidget (QWidget *aWidget, QWidget *aRelative,
374 bool aCanResize = true);
375
376 static QChar decimalSep();
377 static QString sizeRegexp();
378
379 static quint64 parseSize (const QString &);
380 static QString formatSize (quint64 aSize, uint aDecimal = 2, FormatSize aMode = FormatSize_Round);
381
382 static quint64 requiredVideoMemory(const QString &strGuestOSTypeId, int cMonitors = 1);
383
384 static QString locationForHTML (const QString &aFileName);
385
386 static QString highlight (const QString &aStr, bool aToolTip = false);
387
388 static QString replaceHtmlEntities(QString strText);
389 static QString emphasize (const QString &aStr);
390
391 static QString systemLanguageId();
392
393 static bool activateWindow (WId aWId, bool aSwitchDesktop = true);
394
395#ifdef VBOX_WS_X11
396 /** X11: Test whether the current window manager supports full screen mode. */
397 static bool supportsFullScreenMonitorsProtocolX11();
398 /** X11: Performs mapping of the passed @a pWidget to host-screen with passed @a uScreenId. */
399 static bool setFullScreenMonitorX11(QWidget *pWidget, ulong uScreenId);
400
401 /** X11: Returns a list of current _NET_WM_STATE flags for passed @a pWidget. */
402 static QVector<Atom> flagsNetWmState(QWidget *pWidget);
403 /** X11: Check whether _NET_WM_STATE_FULLSCREEN flag is set for passed @a pWidget. */
404 static bool isFullScreenFlagSet(QWidget *pWidget);
405 /** X11: Sets _NET_WM_STATE_FULLSCREEN flag for passed @a pWidget. */
406 static void setFullScreenFlag(QWidget *pWidget);
407 /** X11: Sets _NET_WM_STATE_SKIP_TASKBAR flag for passed @a pWidget. */
408 static void setSkipTaskBarFlag(QWidget *pWidget);
409 /** X11: Sets _NET_WM_STATE_SKIP_PAGER flag for passed @a pWidget. */
410 static void setSkipPagerFlag(QWidget *pWidget);
411#endif /* VBOX_WS_X11 */
412
413 static QString removeAccelMark (const QString &aText);
414
415 static QString insertKeyToActionText (const QString &aText, const QString &aKey);
416
417 static QPixmap joinPixmaps (const QPixmap &aPM1, const QPixmap &aPM2);
418
419 static QWidget *findWidget (QWidget *aParent, const char *aName,
420 const char *aClassName = NULL,
421 bool aRecursive = false);
422
423 static QList <QPair <QString, QString> > MediumBackends(KDeviceType enmDeviceType);
424 static QList <QPair <QString, QString> > HDDBackends();
425 static QList <QPair <QString, QString> > DVDBackends();
426 static QList <QPair <QString, QString> > FloppyBackends();
427
428 static QString documentsPath();
429
430#ifdef VBOX_WITH_VIDEOHWACCEL
431 static bool isAcceleration2DVideoAvailable();
432
433 /** additional video memory required for the best 2D support performance
434 * total amount of VRAM required is thus calculated as requiredVideoMemory + required2DOffscreenVideoMemory */
435 static quint64 required2DOffscreenVideoMemory();
436#endif
437
438#ifdef VBOX_WITH_CRHGSMI
439 static bool isWddmCompatibleOsType(const QString &strGuestOSTypeId);
440#endif /* VBOX_WITH_CRHGSMI */
441
442 /* Returns full medium-format name for the given base medium-format name: */
443 static QString fullMediumFormatName(const QString &strBaseMediumFormatName);
444
445
446#ifdef RT_OS_LINUX
447 static void checkForWrongUSBMounted();
448#endif /* RT_OS_LINUX */
449
450 /* Shame on Qt it hasn't stuff for tuning
451 * widget size suitable for reflecting content of desired size.
452 * For example QLineEdit, QSpinBox and similar widgets should have a methods
453 * to strict the minimum width to reflect at least [n] symbols. */
454 static void setMinimumWidthAccordingSymbolCount(QSpinBox *pSpinBox, int cCount);
455
456 /** Assigns top-level @a pWidget geometry passed as QRect coordinates.
457 * @note Take into account that this request may fail on X11. */
458 static void setTopLevelGeometry(QWidget *pWidget, int x, int y, int w, int h);
459 /** Assigns top-level @a pWidget geometry passed as @a rect.
460 * @note Take into account that this request may fail on X11. */
461 static void setTopLevelGeometry(QWidget *pWidget, const QRect &rect);
462
463signals:
464
465 /** Notifies listeners about the VBoxSVC availability change. */
466 void sigVBoxSVCAvailabilityChange();
467
468 /* Notifiers: Medium-processing stuff: */
469 void sigMediumCreated(const QString &strMediumID);
470 void sigMediumDeleted(const QString &strMediumID);
471
472 /* Notifiers: Medium-enumeration stuff: */
473 void sigMediumEnumerationStarted();
474 void sigMediumEnumerated(const QString &strMediumID);
475 void sigMediumEnumerationFinished();
476
477public slots:
478
479 bool openURL (const QString &aURL);
480
481 void sltGUILanguageChange(QString strLang);
482
483protected slots:
484
485 /* Handlers: Prepare/cleanup stuff: */
486 void prepare();
487 void cleanup();
488
489 /** Handles @a manager request for emergency session shutdown. */
490 void sltHandleCommitDataRequest(QSessionManager &manager);
491
492 /** Shows UI. */
493 void showUI();
494
495 /** Handles the VBoxSVC availability change. */
496 void sltHandleVBoxSVCAvailabilityChange(bool fAvailable);
497
498protected:
499
500 bool eventFilter (QObject *, QEvent *);
501
502private:
503
504 /* Constructor/destructor: */
505 VBoxGlobal();
506 ~VBoxGlobal();
507
508 /** Re-initializes COM wrappers and containers. */
509 void comWrappersReinit();
510
511#ifdef VBOX_WS_WIN
512 /** Wraps WinAPI ShutdownBlockReasonCreate function.
513 * @remark This function defined starting from Vista only. */
514 static BOOL ShutdownBlockReasonCreateAPI(HWND hWnd, LPCWSTR pwszReason);
515#endif
516
517#ifdef VBOX_WITH_DEBUGGER_GUI
518 void initDebuggerVar(int *piDbgCfgVar, const char *pszEnvVar, const char *pszExtraDataName, bool fDefault = false);
519 void setDebuggerVar(int *piDbgCfgVar, bool fState);
520 bool isDebuggerWorker(int *piDbgCfgVar, const char *pszExtraDataName) const;
521#endif
522
523 bool mValid;
524
525#ifdef VBOX_WS_MAC
526 /** Mac OS X: Holds the #MacOSXRelease determined using <i>uname</i> call. */
527 MacOSXRelease m_osRelease;
528#endif /* VBOX_WS_MAC */
529
530 /** COM cleanup protection token. */
531 QReadWriteLock m_comCleanupProtectionToken;
532
533 /** Holds the instance of VirtualBox client wrapper. */
534 CVirtualBoxClient m_client;
535 /** Holds the copy of VirtualBox object wrapper. */
536 CVirtualBox m_vbox;
537 /** Holds the copy of VirtualBox host-object wrapper. */
538 CHost m_host;
539 /** Holds the symbolic VirtualBox home-folder representation. */
540 QString m_strHomeFolder;
541 /** Holds the guest OS family IDs. */
542 QList<QString> m_guestOSFamilyIDs;
543 /** Holds the guest OS types for each family ID. */
544 QList<QList<CGuestOSType> > m_guestOSTypes;
545
546 /** Holds whether acquired COM wrappers are currently valid. */
547 bool m_fWrappersValid;
548 /** Holds whether VBoxSVC is currently available. */
549 bool m_fVBoxSVCAvailable;
550
551 /** Holds whether GUI is separate (from VM) process. */
552 bool m_fSeparateProcess;
553
554 QString vmUuid;
555 QList<QUrl> m_ArgUrlList;
556
557 /** Whether to show error message boxes for VM start errors. */
558 bool mShowStartVMErrors;
559
560 /* Variable: Medium-enumeration stuff: */
561 UIMediumEnumerator *m_pMediumEnumerator;
562 mutable QReadWriteLock m_mediumEnumeratorDtorRwLock;
563
564 /** Holds whether the Extension Pack installation was requested at startup. */
565 bool m_fEPInstallationRequested;
566
567#ifdef VBOX_WS_X11
568 /** X11: Holds whether the Window Manager we are running at is composition one. */
569 bool m_fCompositingManagerRunning;
570 /** X11: Holds the type of the Window Manager we are running under. */
571 X11WMType m_enmWindowManagerType;
572#endif /* VBOX_WS_X11 */
573
574 /** The --aggressive-caching / --no-aggressive-caching option. */
575 bool mAgressiveCaching;
576 /** The --restore-current option. */
577 bool mRestoreCurrentSnapshot;
578
579 /** @name Ad-hoc VM reconfiguration.
580 * @{ */
581 /** Floppy image. */
582 QString m_strFloppyImage;
583 /** DVD image. */
584 QString m_strDvdImage;
585 /** @} */
586
587 /** @name VMM options
588 * @{ */
589 /** The --disable-patm option. */
590 bool mDisablePatm;
591 /** The --disable-csam option. */
592 bool mDisableCsam;
593 /** The --recompile-supervisor option. */
594 bool mRecompileSupervisor;
595 /** The --recompile-user option. */
596 bool mRecompileUser;
597 /** The --execute-all-in-iem option. */
598 bool mExecuteAllInIem;
599 /** The --warp-factor option value. */
600 uint32_t mWarpPct;
601 /** @} */
602
603#ifdef VBOX_WITH_DEBUGGER_GUI
604 /** Whether the debugger should be accessible or not.
605 * Use --dbg, the env.var. VBOX_GUI_DBG_ENABLED,
606 * --debug or the env.var. VBOX_GUI_DBG_AUTO_SHOW to enable. */
607 mutable int m_fDbgEnabled;
608 /** Whether to show the debugger automatically with the console.
609 * Use --debug or the env.var. VBOX_GUI_DBG_AUTO_SHOW to enable. */
610 mutable int m_fDbgAutoShow;
611 /** Whether to show the command line window when m_fDbgAutoShow is set. */
612 mutable int m_fDbgAutoShowCommandLine;
613 /** Whether to show the statistics window when m_fDbgAutoShow is set. */
614 mutable int m_fDbgAutoShowStatistics;
615 /** VBoxDbg module handle. */
616 RTLDRMOD m_hVBoxDbg;
617
618 /** Whether --start-running, --start-paused or nothing was given. */
619 enum StartRunning m_enmStartRunning;
620#endif
621
622#if defined (VBOX_WS_WIN)
623 DWORD dwHTMLHelpCookie;
624#endif
625
626 QString mVerString;
627 QString mBrandingConfig;
628
629 int m3DAvailable;
630
631 QString mDiskTypes_Differencing;
632
633 QString mUserDefinedPortName;
634
635 QPixmap mWarningIcon, mErrorIcon;
636
637 QFileIconProvider m_globalIconProvider;
638
639#ifdef VBOX_GUI_WITH_PIDFILE
640 QString m_strPidfile;
641#endif
642
643 char mSettingsPw[256];
644 bool mSettingsPwSet;
645
646 /** General icon-pool. */
647 UIIconPoolGeneral *m_pIconPool;
648 /** Holds the thread-pool instance. */
649 UIThreadPool *m_pThreadPool;
650
651 /* API: Instance stuff: */
652 static bool m_sfCleanupInProgress;
653 static VBoxGlobal* m_spInstance;
654 friend VBoxGlobal& vboxGlobal();
655};
656
657/* Shortcut to the static VBoxGlobal::instance() method: */
658inline VBoxGlobal& vboxGlobal() { return *VBoxGlobal::instance(); }
659
660#endif /* !___VBoxGlobal_h___ */
661
Note: See TracBrowser for help on using the repository browser.

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