VirtualBox

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

Last change on this file since 57590 was 57590, checked in by vboxsync, 9 years ago

FE/Qt: 7958: Adding more host-screen related wrappers to VBoxGlobal. Will be reused in other places.

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

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