Index: trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk	(revision 41587)
@@ -725,14 +725,10 @@
 ## @todo kBuild: Non-existing +| targets should be tried remade or what?
 VirtualBox_BLDDIRS       += $(VirtualBox_0_OUTDIR)/include
-VirtualBox_INTERMEDIATES += $(VirtualBox_0_OUTDIR)/include/COMWrappers.h
-VirtualBox_CLEAN         += \
-	$(VirtualBox_0_OUTDIR)/include/COMWrappers \
-	$(VirtualBox_0_OUTDIR)/include/COMWrappers.tmp \
-	$(VirtualBox_0_OUTDIR)/include/COMWrappers.h \
-	$(VirtualBox_0_OUTDIR)/include/COMWrappers.cpp
+VirtualBox_INTERMEDIATES += $(VirtualBox_0_OUTDIR)/include/COMEnums.h
+VirtualBox_CLEAN         += $(wildcard $(VirtualBox_0_OUTDIR)/include/*)
 VirtualBox_SOURCES       += $(VirtualBox_0_OUTDIR)/include/COMWrappers.cpp
 
 $$(VirtualBox_0_OUTDIR)/include/COMWrappers \
-+| $$(VirtualBox_0_OUTDIR)/include/COMWrappers.h \
++| $$(VirtualBox_0_OUTDIR)/include/COMEnums.h \
 +| $$(VirtualBox_0_OUTDIR)/include/COMWrappers.cpp: \
 		$(VBOX_XIDL_FILE) \
@@ -740,24 +736,7 @@
 		| $$(dir $$@)
 	$(call MSG_GENERATE,VirtualBox,$<,$@)
-	$(QUIET)$(RM) -f $@ $@.tmp $@.h $@.cpp
+	$(QUIET)$(RM) -f COMWrappers* COMEnums.h C*.h
 	$(QUIET)$(VBOX_XSLTPROC) -o $@ $(VBOX_VIRTUALBOX4_SRC)/src/globals/COMWrappers.xsl $<
-
-	$(QUIET)$(SED) -e '1,/\/\/ wrapper definitions/ !d' \
-		--output $@.tmp $@
-	$(QUIET)$(CP) --changed $@.tmp $@.h
-
-	$(QUIET)$(APPEND) -t -n $@.tmp \
-		'/*' \
-		' * DO NOT EDIT! This is a generated file, see COMWrappers.h for details.' \
-		' */' \
-		'' \
-		'#include "VBoxGlobal.h"' \
-		''
-	$(QUIET)$(SED) -e '/\/\/ wrapper definitions/,9999999 !d' \
-		-e 's/^inline //' \
-		--append $@.tmp $@
-	$(QUIET)$(CP) --changed $@.tmp $@.cpp
-	$(QUIET)$(RM) -f $@.tmp
-
+	$(QUIET)$(VBOX_FILESPLIT) $@ $(VirtualBox_0_OUTDIR)/include
 
 # alias for generating the COM Wrappers file.
Index: trunk/src/VBox/Frontends/VirtualBox/src/UIMediumTypeChangeDialog.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/UIMediumTypeChangeDialog.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/UIMediumTypeChangeDialog.h	(revision 41587)
@@ -20,8 +20,13 @@
 #define __UIMediumTypeChangeDialog_h__
 
-/* Local includes: */
+/* GUI includes: */
 #include "QIDialog.h"
 #include "QIWithRetranslateUI.h"
-#include "COMDefs.h"
+
+/* COM includes: */
+#include "COMEnums.h"
+#include "CProgress.h"
+#include "CMediumFormat.h"
+#include "CMedium.h"
 
 /* Forward declarations: */
Index: trunk/src/VBox/Frontends/VirtualBox/src/UIVMLogViewer.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/UIVMLogViewer.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/UIVMLogViewer.cpp	(revision 41587)
@@ -21,5 +21,6 @@
 # include "precomp.h"
 #else  /* !VBOX_WITH_PRECOMPILED_HEADERS */
-/* Global includes: */
+
+/* Qt includes: */
 #include <QCheckBox>
 #include <QDateTime>
@@ -31,5 +32,5 @@
 #include <QTextEdit>
 
-/* Local includes: */
+/* GUI includes: */
 #include "UIVMLogViewer.h"
 #include "QITabWidget.h"
@@ -39,4 +40,9 @@
 #include "UIMessageCenter.h"
 #include "VBoxUtils.h"
+
+/* COM includes: */
+#include "COMEnums.h"
+#include "CSystemProperties.h"
+
 #endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/UIVMLogViewer.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/UIVMLogViewer.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/UIVMLogViewer.h	(revision 41587)
@@ -20,13 +20,16 @@
 #define __UIVMLogViewer_h__
 
-/* Global includes: */
+/* Qt includes: */
 #include <QMainWindow>
 #include <QMap>
 #include <QPair>
 
-/* Local includes: */
+/* GUI includes: */
 #include "UIVMLogViewer.gen.h"
 #include "QIWithRetranslateUI.h"
-#include "COMDefs.h"
+
+/* COM includes: */
+#include "COMEnums.h"
+#include "CMachine.h"
 
 /* Forward declarations: */
Index: trunk/src/VBox/Frontends/VirtualBox/src/VBoxFBOverlay.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/VBoxFBOverlay.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/VBoxFBOverlay.cpp	(revision 41587)
@@ -20,17 +20,25 @@
 # include "precomp.h"
 #else  /* !VBOX_WITH_PRECOMPILED_HEADERS */
+
 #define LOG_GROUP LOG_GROUP_GUI
 
+/* Qt includes: */
+#include <QGLWidget>
+#include <QFile>
+#include <QTextStream>
+
+/* GUI includes: */
 #include "VBoxFBOverlay.h"
-
 #include "UIMessageCenter.h"
 #include "VBoxGlobal.h"
 
+/* COM includes: */
+#include "CDisplay.h"
+
+/* Other VBox includes: */
+#include <iprt/asm.h>
+#include <iprt/semaphore.h>
 #include <VBox/VBoxGL2D.h>
-
-/* Qt includes */
-#include <QGLWidget>
-
-#include <iprt/asm.h>
+#include <VBox/err.h>
 
 #ifdef VBOX_WITH_VIDEOHWACCEL
@@ -38,11 +46,6 @@
 #include <VBox/types.h>
 #include <VBox/vmm/ssm.h>
-#endif
-#include <iprt/semaphore.h>
-
-#include <VBox/err.h>
-
-#include <QFile>
-#include <QTextStream>
+#endif /* VBOX_WITH_VIDEOHWACCEL */
+
 #endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/VBoxFBOverlay.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/VBoxFBOverlay.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/VBoxFBOverlay.h	(revision 41587)
@@ -25,13 +25,20 @@
 //#define VBOXVHWADBG_RENDERCHECK
 
-#include "COMDefs.h"
+/* Qt includes: */
 #include <QGLWidget>
+
+/* GUI includes: */
+#include "VBoxFBOverlayCommon.h"
+
+/* COM includes: */
+#include "COMEnums.h"
+#include "CSession.h"
+
+/* Other VBox includes: */
 #include <iprt/assert.h>
 #include <iprt/critsect.h>
 #include <iprt/asm.h>
 #include <iprt/err.h>
-
 #include <VBox/VBoxGL2D.h>
-#include "VBoxFBOverlayCommon.h"
 
 #define VBOXVHWA_ALLOW_PRIMARY_AND_OVERLAY_ONLY 1
Index: trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobalSettings.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobalSettings.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobalSettings.cpp	(revision 41587)
@@ -21,12 +21,18 @@
 # include "precomp.h"
 #else  /* !VBOX_WITH_PRECOMPILED_HEADERS */
-/* Qt includes */
+
+/* Qt includes: */
 #include <QString>
 #include <QRegExp>
 #include <QVariant>
 
+/* GUI includes: */
 #include "VBoxGlobalSettings.h"
 #include "UIHotKeyEditor.h"
-#include "COMDefs.h"
+
+/* COM includes: */
+#include "COMEnums.h"
+#include "CVirtualBox.h"
+
 #endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/VBoxMediaManagerDlg.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/VBoxMediaManagerDlg.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/VBoxMediaManagerDlg.cpp	(revision 41587)
@@ -21,5 +21,6 @@
 # include "precomp.h"
 #else  /* !VBOX_WITH_PRECOMPILED_HEADERS */
-/* Global includes */
+
+/* Qt includes: */
 #include <QCloseEvent>
 #include <QDir>
@@ -34,5 +35,5 @@
 #include <QUrl>
 
-/* Local includes */
+/* GUI includes */
 #include "VBoxGlobal.h"
 #include "VBoxMediaManagerDlg.h"
@@ -46,4 +47,10 @@
 #include "UIVirtualBoxEventHandler.h"
 #include "UIMediumTypeChangeDialog.h"
+
+/* COM includes: */
+#include "COMEnums.h"
+#include "CStorageController.h"
+#include "CMediumAttachment.h"
+
 #endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/VBoxMediaManagerDlg.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/VBoxMediaManagerDlg.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/VBoxMediaManagerDlg.h	(revision 41587)
@@ -20,7 +20,6 @@
 #define __VBoxMediaManagerDlg_h__
 
-/* Local includes */
+/* GUI includes */
 #include "VBoxMediaManagerDlg.gen.h"
-#include "COMDefs.h"
 #include "QIMainDialog.h"
 #include "QIWithRetranslateUI.h"
@@ -28,5 +27,5 @@
 #include "VBoxMediaComboBox.h"
 
-/* Local forwards */
+/* Forward declarations: */
 class MediaItem;
 class VBoxProgressBar;
Index: trunk/src/VBox/Frontends/VirtualBox/src/VBoxMedium.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/VBoxMedium.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/VBoxMedium.cpp	(revision 41587)
@@ -21,11 +21,16 @@
 # include "precomp.h"
 #else  /* !VBOX_WITH_PRECOMPILED_HEADERS */
-/* Global includes */
+
+/* Qt includes: */
 #include <QDir>
 
-/* Local includes */
+/* GUI includes */
 #include "VBoxMedium.h"
 #include "VBoxGlobal.h"
 #include "UIMessageCenter.h"
+
+/* COM includes: */
+#include "CSnapshot.h"
+
 #endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/VBoxMedium.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/VBoxMedium.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/VBoxMedium.h	(revision 41587)
@@ -20,12 +20,14 @@
 #define __VBoxMedium_h__
 
-/* Global includes */
+/* Qt includes: */
 #include <QPixmap>
 #include <QLinkedList>
 
-/* Local includes */
-#include "COMDefs.h"
-
+/* GUI includes: */
 #include <iprt/cpp/utils.h>
+
+/* COM includes: */
+#include "COMEnums.h"
+#include "CMedium.h"
 
 /**
Index: trunk/src/VBox/Frontends/VirtualBox/src/VBoxSnapshotDetailsDlg.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/VBoxSnapshotDetailsDlg.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/VBoxSnapshotDetailsDlg.h	(revision 41587)
@@ -20,10 +20,12 @@
 #define __VBoxSnapshotDetailsDlg_h__
 
-/* Local includes */
+/* GUI includes: */
 #include "VBoxSnapshotDetailsDlg.gen.h"
 #include "QIWithRetranslateUI.h"
-#include "COMDefs.h"
 
-/* Global forwards */
+/* COM includes: */
+#include "CSnapshot.h"
+
+/* Forward declarations: */
 class QScrollArea;
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/VBoxTakeSnapshotDlg.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/VBoxTakeSnapshotDlg.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/VBoxTakeSnapshotDlg.cpp	(revision 41587)
@@ -21,8 +21,9 @@
 # include "precomp.h"
 #else  /* !VBOX_WITH_PRECOMPILED_HEADERS */
-/* Global includes */
+
+/* Qt includes: */
 #include <QPushButton>
 
-/* Local includes */
+/* GUI includes: */
 #include "VBoxTakeSnapshotDlg.h"
 #include "UIMessageCenter.h"
@@ -32,4 +33,10 @@
 # include "VBoxSnapshotsWgt.h"
 #endif /* Q_WS_MAC */
+
+/* COM includes: */
+#include "COMEnums.h"
+#include "CMachine.h"
+#include "CMedium.h"
+#include "CMediumAttachment.h"
 
 #endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
Index: trunk/src/VBox/Frontends/VirtualBox/src/VBoxTakeSnapshotDlg.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/VBoxTakeSnapshotDlg.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/VBoxTakeSnapshotDlg.h	(revision 41587)
@@ -20,9 +20,11 @@
 #define __VBoxTakeSnapshotDlg_h__
 
-/* Local includes */
+/* GUI includes: */
 #include "VBoxTakeSnapshotDlg.gen.h"
 #include "QIWithRetranslateUI.h"
-#include "COMDefs.h"
 #include "QIDialog.h"
+
+/* Forward declarations: */
+class CMachine;
 
 class VBoxTakeSnapshotDlg : public QIWithRetranslateUI<QIDialog>, public Ui::VBoxTakeSnapshotDlg
Index: trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMInformationDlg.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMInformationDlg.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMInformationDlg.cpp	(revision 41587)
@@ -22,5 +22,9 @@
 #else  /* !VBOX_WITH_PRECOMPILED_HEADERS */
 
-/* Local Includes */
+/* Qt includes: */
+#include <QTimer>
+#include <QScrollBar>
+
+/* GUI includes: */
 #include "UIIconPool.h"
 #include "UIMachineLogic.h"
@@ -31,7 +35,14 @@
 #include "VBoxVMInformationDlg.h"
 
-/* Global Includes */
-#include <QTimer>
-#include <QScrollBar>
+/* COM includes: */
+#include "COMEnums.h"
+#include "CSystemProperties.h"
+#include "CMachineDebugger.h"
+#include "CDisplay.h"
+#include "CGuest.h"
+#include "CStorageController.h"
+#include "CMediumAttachment.h"
+#include "CNetworkAdapter.h"
+#include "CVRDEServerInfo.h"
 
 #endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
Index: trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMInformationDlg.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMInformationDlg.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMInformationDlg.h	(revision 41587)
@@ -20,8 +20,12 @@
 #define __VBoxVMInformationDlg_h__
 
+/* Local includes: */
 #include "VBoxVMInformationDlg.gen.h"
 #include "QIMainDialog.h"
-#include "COMDefs.h"
 #include "QIWithRetranslateUI.h"
+
+/* COM includes: */
+#include "COMEnums.h"
+#include "CSession.h"
 
 class UIMachineWindow;
Index: trunk/src/VBox/Frontends/VirtualBox/src/globals/COMDefs.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/globals/COMDefs.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/globals/COMDefs.cpp	(revision 41587)
@@ -18,5 +18,7 @@
  */
 
+/* COM includes: */
 #include "COMDefs.h"
+#include "CVirtualBoxErrorInfo.h"
 
 #if !defined (VBOX_WITH_XPCOM)
@@ -25,18 +27,16 @@
 #else /* !defined (VBOX_WITH_XPCOM) */
 
-/* Qt includes */
+/* Qt includes: */
 #include <QObject>
 #include <QSocketNotifier>
 
+/* Other VBox includes: */
+#include <iprt/env.h>
+#include <iprt/err.h>
+#include <iprt/path.h>
+#include <iprt/param.h>
 #include <nsEventQueueUtils.h>
 #include <nsIEventQueue.h>
-
-// for exception fetching
 #include <nsIExceptionService.h>
-
-#include <iprt/env.h>
-#include <iprt/path.h>
-#include <iprt/param.h>
-#include <iprt/err.h>
 
 /* Mac OS X (Carbon mode) and OS/2 will notify the native queue
Index: trunk/src/VBox/Frontends/VirtualBox/src/globals/COMDefs.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/globals/COMDefs.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/globals/COMDefs.h	(revision 41587)
@@ -899,19 +899,4 @@
 };
 
-/////////////////////////////////////////////////////////////////////////////
-
-/* Include the generated header containing wrapper definitions: */
-#include "COMWrappers.h"
-
-/* Declare metatypes for particular wrappers: */
-Q_DECLARE_METATYPE(CProgress);
-Q_DECLARE_METATYPE(CHost);
-Q_DECLARE_METATYPE(CMachine);
-Q_DECLARE_METATYPE(CConsole);
-Q_DECLARE_METATYPE(CHostNetworkInterface);
-Q_DECLARE_METATYPE(CMedium);
-Q_DECLARE_METATYPE(CMediumFormat);
-Q_DECLARE_METATYPE(CGuestOSType);
-
 /** @} */
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/globals/COMWrappers.xsl
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/globals/COMWrappers.xsl	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/globals/COMWrappers.xsl	(revision 41587)
@@ -3,21 +3,19 @@
 <!--
 /*
- *  A template to generate wrapper classes for [XP]COM interfaces (defined
- *  in XIDL) to use them in the main Qt-based GUI in platform-independent
- *  script-like manner.
+ *  A template to generate wrapper classes for [XP]COM interfaces
+ *  (defined in XIDL) to use them in the main Qt-based GUI
+ *  in platform-independent script-like manner.
+ */
+
+/*
+ *  Copyright (C) 2006-2012 Oracle Corporation
  *
- *  The generated header requires COMDefs.h and must be included from there.
- */
-
-/*
-     Copyright (C) 2006-2008 Oracle Corporation
-
-     This file is part of VirtualBox Open Source Edition (OSE), as
-     available from http://www.virtualbox.org. This file is free software;
-     you can redistribute it and/or modify it under the terms of the GNU
-     General Public License (GPL) as published by the Free Software
-     Foundation, in version 2 as it comes in the "COPYING" file of the
-     VirtualBox OSE distribution. VirtualBox OSE is distributed in the
-     hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ *  This file is part of VirtualBox Open Source Edition (OSE), as
+ *  available from http://www.virtualbox.org. This file is free software;
+ *  you can redistribute it and/or modify it under the terms of the GNU
+ *  General Public License (GPL) as published by the Free Software
+ *  Foundation, in version 2 as it comes in the "COPYING" file of the
+ *  VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ *  hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
  */
 -->
@@ -25,15 +23,9 @@
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 <xsl:output method="text"/>
-
 <xsl:strip-space elements="*"/>
 
 
 <!--
-//  helper definitions
-/////////////////////////////////////////////////////////////////////////////
--->
-
-<!--
- *  capitalizes the first letter
+ *  Capitalizes the first letter:
 -->
 <xsl:template name="capitalize">
@@ -48,6 +40,6 @@
 
 <!--
- *  uncapitalizes the first letter only if the second one is not capital
- *  otherwise leaves the string unchanged
+ *  Uncapitalizes the first letter only if the second one is not capital
+ *  otherwise leaves the string unchanged:
 -->
 <xsl:template name="uncapitalize">
@@ -68,6 +60,7 @@
 </xsl:template>
 
-<!--
- *  translates the string to uppercase
+
+<!--
+ *  Translates the string to uppercase:
 -->
 <xsl:template name="uppercase">
@@ -80,11 +73,22 @@
 
 <!--
-//  templates
-/////////////////////////////////////////////////////////////////////////////
--->
-
-
-<!--
- *  shut down all implicit templates
+ *  File start bracket
+-->
+<xsl:template name="startFile">
+  <xsl:param name="file" />
+  <xsl:value-of select="concat('&#10;// ##### BEGINFILE &quot;', $file, '&quot;&#10;')" />
+</xsl:template>
+
+<!--
+ *  File end bracket
+-->
+<xsl:template name="endFile">
+  <xsl:param name="file" />
+  <xsl:value-of select="concat('&#10;// ##### ENDFILE &quot;', $file, '&quot;&#10;&#10;')" />
+</xsl:template>
+
+
+<!--
+ *  Shut down all implicit templates
 -->
 <xsl:template match="*"/>
@@ -96,54 +100,14 @@
 
 <!--
- *  header
--->
-<xsl:template match="/idl">
-
-<xsl:text>
-/*
- *  DO NOT EDIT! This is a generated file.
- *
- *  Qt-based wrapper classes for VirtualBox Main API (COM interfaces)
- *  generated from XIDL (XML interface definition).
- *
- *  Source    : src/VBox/Main/idl/VirtualBox.xidl
- *  Generator : src/VBox/Frontends/VirtualBox/include/COMWrappers.xsl
- *
- *  Note: this header must be included from COMDefs.h, never directly.
- */
-</xsl:text>
-
-<!-- all enum declarations -->
-<xsl:text>
-// all enums
-
-</xsl:text>
-  <xsl:for-each select="*/enum">
-    <xsl:text>enum </xsl:text>
-    <xsl:value-of select="concat('K',@name)"/>
-    <xsl:text>&#x0A;{&#x0A;</xsl:text>
-    <xsl:for-each select="const">
-      <xsl:text>    </xsl:text>
-      <xsl:value-of select="concat('K',../@name,'_',@name)"/>
-      <xsl:text> = ::</xsl:text>
-      <xsl:value-of select="concat(../@name,'_',@name)"/>
-      <xsl:text>,&#x0A;</xsl:text>
-    </xsl:for-each>
-    <xsl:text>    </xsl:text>
-    <xsl:value-of select="concat('K',@name)"/>
-    <xsl:text>_Max&#x0A;</xsl:text>
-    <xsl:text>};&#x0A;&#x0A;Q_DECLARE_METATYPE(</xsl:text>
-    <xsl:value-of select="concat('K',@name)"/>
-    <xsl:text>)&#x0A;&#x0A;</xsl:text>
-  </xsl:for-each>
-  <xsl:text>&#x0A;&#x0A;</xsl:text>
-
+ *  Main entry point (idl):
+-->
+<xsl:template match="idl">
+  <!-- Apply underlying template (library): -->
   <xsl:apply-templates/>
-
-</xsl:template>
-
-
-<!--
- *  encloses |if| element's contents (unconditionally expanded by
+</xsl:template>
+
+
+<!--
+ *  Encloses |if| element's contents (unconditionally expanded by
  *  <apply-templates mode="define"/>) with #ifdef / #endif.
  *
@@ -161,7 +125,6 @@
 </xsl:template>
 
-
-<!--
- *  encloses |if| element's contents (unconditionally expanded by
+<!--
+ *  Encloses |if| element's contents (unconditionally expanded by
  *  <apply-templates mode="declare"/>) with #ifdef / #endif.
  *
@@ -179,5 +142,4 @@
 </xsl:template>
 
-
 <!--
  *  |<if target="...">| element): begin and end.
@@ -218,82 +180,219 @@
 
 <!--
- *  libraries
+ *  Library
 -->
 <xsl:template match="library">
-  <!-- forward declarations -->
-  <xsl:text>// forward declarations&#x0A;&#x0A;</xsl:text>
-  <xsl:for-each select="interface">
+    <!-- Declare enums: -->
+    <xsl:call-template name="declareEnums"/>
+
+    <!-- Declare interfaces: -->
+    <xsl:apply-templates select="if | interface[not(@internal='yes')]" mode="declare"/>
+
+    <!-- Define interfaces: -->
+    <xsl:call-template name="defineInterfaces"/>
+</xsl:template>
+
+
+<!--
+ *  Declare enums:
+-->
+<xsl:template name="declareEnums">
+    <!-- Starting COMEnums.h file: -->
+    <xsl:call-template name="startFile">
+        <xsl:with-param name="file" select="'COMEnums.h'" />
+    </xsl:call-template>
+
+    <!-- Write down file header: -->
+    <xsl:text>/*&#x0A;</xsl:text>
+    <xsl:text> * DO NOT EDIT! This is a generated file.&#x0A;</xsl:text>
+    <xsl:text> *&#x0A;</xsl:text>
+    <xsl:text> * Qt-based wrappers for VirtualBox Main API (COM) enums.&#x0A;</xsl:text>
+    <xsl:text> * Generated from XIDL (XML interface definition).&#x0A;</xsl:text>
+    <xsl:text> *&#x0A;</xsl:text>
+    <xsl:text> * Source    : src/VBox/Main/idl/VirtualBox.xidl&#x0A;</xsl:text>
+    <xsl:text> * Generator : src/VBox/Frontends/VirtualBox/include/COMWrappers.xsl&#x0A;</xsl:text>
+    <xsl:text> */&#x0A;&#x0A;</xsl:text>
+    <xsl:text>#ifndef __COMEnums_h__&#x0A;</xsl:text>
+    <xsl:text>#define __COMEnums_h__&#x0A;&#x0A;</xsl:text>
+    <xsl:text>/* GUI includes: */&#x0A;</xsl:text>
+    <xsl:text>#include "COMDefs.h"&#x0A;&#x0A;</xsl:text>
+
+    <!-- Enumerate all enums: -->
+    <xsl:for-each select="enum">
+        <xsl:text>/* </xsl:text>
+        <xsl:value-of select="concat('K',@name)"/>
+        <xsl:text> enum: */&#x0A;</xsl:text>
+        <xsl:text>enum </xsl:text>
+        <xsl:value-of select="concat('K',@name)"/>
+        <xsl:text>&#x0A;{&#x0A;</xsl:text>
+        <xsl:for-each select="const">
+            <xsl:text>    </xsl:text>
+            <xsl:value-of select="concat('K',../@name,'_',@name)"/>
+            <xsl:text> = ::</xsl:text>
+            <xsl:value-of select="concat(../@name,'_',@name)"/>
+            <xsl:text>,&#x0A;</xsl:text>
+        </xsl:for-each>
+        <xsl:text>    </xsl:text>
+        <xsl:value-of select="concat('K',@name)"/>
+        <xsl:text>_Max&#x0A;</xsl:text>
+        <xsl:text>};&#x0A;&#x0A;</xsl:text>
+    </xsl:for-each>
+
+    <!-- Declare enums to QMetaObject: -->
+    <xsl:text>/* Let QMetaType know about generated enums: */&#x0A;</xsl:text>
+    <xsl:for-each select="enum">
+        <xsl:text>Q_DECLARE_METATYPE(</xsl:text>
+        <xsl:value-of select="concat('K',@name)"/>
+        <xsl:text>)&#x0A;</xsl:text>
+    </xsl:for-each>
+    <xsl:text>&#x0A;</xsl:text>
+
+    <!-- Write down file footer: -->
+    <xsl:text>#endif /* __COMEnums_h__ */&#x0A;&#x0A;</xsl:text>
+
+    <!-- Finishing COMEnums.h file: -->
+    <xsl:call-template name="endFile">
+        <xsl:with-param name="file" select="'COMEnums.h'" />
+    </xsl:call-template>
+</xsl:template>
+
+
+<!--
+ *  Define interfaces:
+-->
+<xsl:template name="defineInterfaces">
+    <!-- Starting COMWrappers.cpp file: -->
+    <xsl:call-template name="startFile">
+        <xsl:with-param name="file" select="'COMWrappers.cpp'" />
+    </xsl:call-template>
+
+    <!-- Write down file header: -->
+    <xsl:text>/*&#x0A;</xsl:text>
+    <xsl:text> * DO NOT EDIT! This is a generated file.&#x0A;</xsl:text>
+    <xsl:text> *&#x0A;</xsl:text>
+    <xsl:text> * Qt-based wrappers definitions for VirtualBox Main API (COM) interfaces.&#x0A;</xsl:text>
+    <xsl:text> * Generated from XIDL (XML interface definition).&#x0A;</xsl:text>
+    <xsl:text> *&#x0A;</xsl:text>
+    <xsl:text> * Source    : src/VBox/Main/idl/VirtualBox.xidl&#x0A;</xsl:text>
+    <xsl:text> * Generator : src/VBox/Frontends/VirtualBox/include/COMWrappers.xsl&#x0A;</xsl:text>
+    <xsl:text> */&#x0A;&#x0A;</xsl:text>
+    <xsl:text>/* COM includes: */&#x0A;</xsl:text>
+    <xsl:text>#include "COMEnums.h"&#x0A;</xsl:text>
+
+    <!-- Enumerate all interface definitions: -->
+    <xsl:for-each select="interface[not(@internal='yes')]">
+        <xsl:text>#include "C</xsl:text>
+        <xsl:value-of select="substring(@name,2)"/>
+        <xsl:text>.h"&#x0A;</xsl:text>
+    </xsl:for-each>
+    <xsl:text>&#x0A;</xsl:text>
+    <xsl:apply-templates select="if | interface[not(@internal='yes')]" mode="define"/>
+
+    <!-- Finishing COMEnums.h file: -->
+    <xsl:call-template name="endFile">
+        <xsl:with-param name="file" select="'COMWrappers.cpp'" />
+    </xsl:call-template>
+</xsl:template>
+
+
+<!--
+ *  Declare interface:
+-->
+<xsl:template match="interface" mode="declare">
+    <!-- Starting file: -->
+    <xsl:call-template name="startFile">
+        <xsl:with-param name="file" select="concat('C', substring(@name,2), '.h')" />
+    </xsl:call-template>
+
+    <!-- Write down file header: -->
+    <xsl:text>/*&#x0A;</xsl:text>
+    <xsl:text> * DO NOT EDIT! This is a generated file.&#x0A;</xsl:text>
+    <xsl:text> *&#x0A;</xsl:text>
+    <xsl:text> * Qt-based wrapper declaration for VirtualBox Main API (COM) interface.&#x0A;</xsl:text>
+    <xsl:text> * Generated from XIDL (XML interface definition).&#x0A;</xsl:text>
+    <xsl:text> *&#x0A;</xsl:text>
+    <xsl:text> * Source    : src/VBox/Main/idl/VirtualBox.xidl&#x0A;</xsl:text>
+    <xsl:text> * Generator : src/VBox/Frontends/VirtualBox/include/COMWrappers.xsl&#x0A;</xsl:text>
+    <xsl:text> */&#x0A;&#x0A;</xsl:text>
+    <xsl:text>#ifndef __C</xsl:text>
+    <xsl:value-of select="substring(@name,2)"/>
+    <xsl:text>_h__&#x0A;</xsl:text>
+    <xsl:text>#define __C</xsl:text>
+    <xsl:value-of select="substring(@name,2)"/>
+    <xsl:text>_h__&#x0A;&#x0A;</xsl:text>
+    <xsl:text>/* GUI includes: */&#x0A;</xsl:text>
+    <xsl:text>#include "COMDefs.h"&#x0A;&#x0A;</xsl:text>
+
+    <!-- Forward declarations: -->
+    <xsl:text>/* Forward declarations: */&#x0A;</xsl:text>
+    <xsl:for-each select="//interface[not(@internal='yes')]">
+        <xsl:text>class C</xsl:text>
+        <xsl:value-of select="substring(@name,2)"/>
+        <xsl:text>;&#x0A;</xsl:text>
+    </xsl:for-each>
+    <xsl:text>&#x0A;</xsl:text>
+
+    <!-- Interface declaration: -->
+    <xsl:text>/* Interface declaration: */&#x0A;</xsl:text>
     <xsl:text>class C</xsl:text>
     <xsl:value-of select="substring(@name,2)"/>
-    <xsl:text>;&#x0A;</xsl:text>
-  </xsl:for-each>
-  <xsl:text>&#x0A;</xsl:text>
-  <!-- array typedefs -->
-  <xsl:text>// array typedefs&#x0A;&#x0A;</xsl:text>
-  <xsl:for-each select="interface[not(@internal='yes')]">
+    <xsl:text> : public CInterface&lt;</xsl:text>
+    <xsl:value-of select="@name"/>
+
+    <!-- Use the correct base if supportsErrorInfo: -->
+    <xsl:call-template name="tryComposeFetchErrorInfo">
+        <xsl:with-param name="mode" select="'getBaseClassName'"/>
+    </xsl:call-template>
+    <xsl:text>&gt;&#x0A;{&#x0A;public:&#x0A;&#x0A;</xsl:text>
+
+    <!-- Generate the Base typedef: -->
+    <xsl:text>    typedef CInterface&lt;</xsl:text>
+    <xsl:value-of select="@name"/>
+
+    <!-- Use the correct base if supportsErrorInfo: -->
+    <xsl:call-template name="tryComposeFetchErrorInfo">
+        <xsl:with-param name="mode" select="'getBaseClassName'"/>
+    </xsl:call-template>
+    <xsl:text>&gt; Base;&#x0A;&#x0A;</xsl:text>
+
+    <!-- Generate member declarations: -->
+    <xsl:if test="name()='interface'">
+        <xsl:call-template name="declareMembers"/>
+    </xsl:if>
+
+    <!-- Interface declaration: -->
+    <xsl:text>};&#x0A;&#x0A;</xsl:text>
+
+    <!-- Declare metatype: -->
+    <xsl:text>/* Let QMetaType know about generated interface: */&#x0A;</xsl:text>
+    <xsl:text>Q_DECLARE_METATYPE(</xsl:text>
+    <xsl:value-of select="concat('C',substring(@name,2))"/>
+    <xsl:text>)&#x0A;&#x0A;</xsl:text>
+
+    <!-- Declare safe-array -->
     <xsl:if test="
-      (//attribute[@safearray='yes' and not(@internal='yes') and @type=current()/@name])
-      or
-      (//param[@safearray='yes' and not(../@internal='yes') and @type=current()/@name])
-    ">
-      <xsl:text>typedef QVector&lt;C</xsl:text>
-      <xsl:value-of select="substring(@name,2)"/>
-      <xsl:text>&gt; C</xsl:text>
-      <xsl:value-of select="substring(@name,2)"/>
-      <xsl:text>Vector;&#x0A;</xsl:text>
+        (name()='interface')
+        and
+        ((//attribute[@safearray='yes' and not(@internal='yes') and @type=current()/@name])
+         or
+         (//param[@safearray='yes' and not(../@internal='yes') and @type=current()/@name]))
+        ">
+            <xsl:text>/* Declare safe-array: */&#x0A;</xsl:text>
+            <xsl:text>typedef QVector&lt;C</xsl:text>
+            <xsl:value-of select="substring(@name,2)"/>
+            <xsl:text>&gt; C</xsl:text>
+            <xsl:value-of select="substring(@name,2)"/>
+            <xsl:text>Vector;&#x0A;&#x0A;</xsl:text>
     </xsl:if>
-  </xsl:for-each>
-  <xsl:text>&#x0A;</xsl:text>
-  <!-- wrapper declarations -->
-  <xsl:text>// wrapper declarations&#x0A;&#x0A;</xsl:text>
-  <xsl:apply-templates select="
-      if |
-      interface[not(@internal='yes')]
-    "
-    mode="declare"
-  />
-  <!-- wrapper definitions -->
-  <xsl:text>// wrapper definitions&#x0A;&#x0A;</xsl:text>
-  <xsl:apply-templates select="
-      if |
-      interface[not(@internal='yes')]
-    "
-    mode="define"
-  />
-</xsl:template>
-
-
-<!--
- *  interface declarations
--->
-<xsl:template match="interface" mode="declare">
-
-  <xsl:text>// </xsl:text>
-  <xsl:value-of select="@name"/>
-  <xsl:text> wrapper&#x0A;&#x0A;class C</xsl:text>
-  <xsl:value-of select="substring(@name,2)"/>
-  <xsl:text> : public CInterface&lt;</xsl:text>
-  <xsl:value-of select="@name"/>
-  <!-- use the correct base if supportsErrorInfo -->
-  <xsl:call-template name="tryComposeFetchErrorInfo">
-    <xsl:with-param name="mode" select="'getBaseClassName'"/>
-  </xsl:call-template>
-  <xsl:text>&gt;&#x0A;{&#x0A;public:&#x0A;&#x0A;</xsl:text>
-
-  <!-- generate the Base typedef-->
-  <xsl:text>    typedef CInterface&lt;</xsl:text>
-  <xsl:value-of select="@name"/>
-  <!-- Use the correct base if supportsErrorInfo -->
-  <xsl:call-template name="tryComposeFetchErrorInfo">
-    <xsl:with-param name="mode" select="'getBaseClassName'"/>
-  </xsl:call-template>
-  <xsl:text>&gt; Base;&#x0A;&#x0A;</xsl:text>
-
-  <xsl:if test="name()='interface'">
-    <xsl:call-template name="declareMembers"/>
-  </xsl:if>
-
-  <xsl:text>};&#x0A;&#x0A;</xsl:text>
-
+
+    <!-- Write down file footer: -->
+    <xsl:text>#endif /* __C</xsl:text>
+    <xsl:value-of select="substring(@name,2)"/>
+    <xsl:text>_h__ */&#x0A;&#x0A;</xsl:text>
+
+    <!-- Finishing file: -->
+    <xsl:call-template name="endFile">
+        <xsl:with-param name="file" select="concat('C', substring(@name,2), '.h')" />
+    </xsl:call-template>
 </xsl:template>
 
@@ -386,14 +485,10 @@
 <xsl:text>    void SetExtraDataBool(const QString &amp;strKey, bool fValue);
     bool GetExtraDataBool(const QString &amp;strKey, bool fDef = true);
-
     void SetExtraDataInt(const QString &amp;strKey, int value);
     int GetExtraDataInt(const QString &amp;strKey, int def = 0);
-
     void SetExtraDataRect(const QString &amp;strKey, const QRect &amp;value);
     QRect GetExtraDataRect(const QString &amp;strKey, const QRect &amp;def = QRect());
-
     void SetExtraDataStringList(const QString &amp;strKey, const QStringList &amp;value);
     QStringList GetExtraDataStringList(const QString &amp;strKey, QStringList def = QStringList());
-
     void SetExtraDataIntList(const QString &amp;strKey, const QList&lt;int&gt; &amp;value);
     QList&lt;int&gt; GetExtraDataIntList(const QString &amp;strKey, QList&lt;int&gt; def = QList&lt;int&gt;());
@@ -405,6 +500,5 @@
 <xsl:template name="declareMembers">
 
-  <xsl:text>    // constructors and assignments taking CUnknown and </xsl:text>
-  <xsl:text>raw iface pointer&#x0A;&#x0A;</xsl:text>
+  <xsl:text>    /* Constructors and assignments taking CUnknown and raw iface pointer: */&#x0A;&#x0A;</xsl:text>
   <!-- default constructor -->
   <xsl:text>    C</xsl:text>
@@ -491,10 +585,10 @@
   <xsl:text>&#x0A;</xsl:text>
 
-  <xsl:text>    // attributes (properties)&#x0A;&#x0A;</xsl:text>
+  <xsl:text>    /* Attributes (properties): */&#x0A;</xsl:text>
   <xsl:call-template name="declareAttributes">
     <xsl:with-param name="iface" select="."/>
   </xsl:call-template>
 
-  <xsl:text>    // methods&#x0A;&#x0A;</xsl:text>
+  <xsl:text>    /* Methods: */&#x0A;</xsl:text>
   <xsl:call-template name="declareMethods">
     <xsl:with-param name="iface" select="."/>
@@ -502,5 +596,5 @@
 
   <xsl:if test="@name='IVirtualBox' or @name='IMachine'">
-    <xsl:text>    // ExtraData helpers&#x0A;&#x0A;</xsl:text>
+    <xsl:text>    /* ExtraData helpers: */&#x0A;</xsl:text>
     <xsl:call-template name="declareExtraDataHelpers">
       <xsl:with-param name="iface" select="."/>
@@ -508,5 +602,5 @@
   </xsl:if>
 
-  <xsl:text>    // friend wrappers&#x0A;&#x0A;</xsl:text>
+  <xsl:text>    /* Friend wrappers: */&#x0A;</xsl:text>
   <xsl:text>    friend class CUnknown;&#x0A;</xsl:text>
   <xsl:variable name="name" select="@name"/>
@@ -844,5 +938,5 @@
   </xsl:call-template>
   <xsl:if test="@name='IVirtualBox' or @name='IMachine'">
-    <xsl:text>// ExtraData helpers&#x0A;&#x0A;</xsl:text>
+    <xsl:text>/* ExtraData helpers: */&#x0A;</xsl:text>
     <xsl:call-template name="defineExtraDataHelpers">
       <xsl:with-param name="iface" select="."/>
@@ -933,5 +1027,5 @@
       <xsl:choose>
         <xsl:when test="$define">
-          <xsl:text>inline </xsl:text>
+          <xsl:text></xsl:text>
         </xsl:when>
         <xsl:otherwise>
@@ -966,5 +1060,5 @@
       <xsl:choose>
         <xsl:when test="$define">
-          <xsl:text>inline </xsl:text>
+          <xsl:text></xsl:text>
         </xsl:when>
         <xsl:otherwise>
Index: trunk/src/VBox/Frontends/VirtualBox/src/globals/UIExtraDataEventHandler.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/globals/UIExtraDataEventHandler.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/globals/UIExtraDataEventHandler.cpp	(revision 41587)
@@ -18,5 +18,8 @@
  */
 
-/* Local includes */
+/* Qt includes: */
+#include <QMutex>
+
+/* GUI includes: */
 #include "UIExtraDataEventHandler.h"
 #include "UIMainEventListener.h"
@@ -24,8 +27,7 @@
 #include "VBoxGlobalSettings.h"
 
-/* Global includes */
-//#include <iprt/thread.h>
-//#include <iprt/stream.h>
-#include <QMutex>
+/* COM includes: */
+#include "COMEnums.h"
+#include "CEventSource.h"
 
 class UIExtraDataEventHandlerPrivate: public QObject
Index: trunk/src/VBox/Frontends/VirtualBox/src/globals/UIExtraDataEventHandler.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/globals/UIExtraDataEventHandler.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/globals/UIExtraDataEventHandler.h	(revision 41587)
@@ -20,8 +20,8 @@
 #define __UIExtraDataEventHandler_h__
 
-/* Local includes */
-#include "COMDefs.h"
+/* COM includes: */
+#include "CEventListener.h"
 
-/* Local forward declarations */
+/* Forward declarations: */
 class UIExtraDataEventHandlerPrivate;
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMainEventListener.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMainEventListener.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMainEventListener.cpp	(revision 41587)
@@ -18,10 +18,30 @@
  */
 
-/* Local includes */
+/* GUI includes: */
 #include "UIMainEventListener.h"
 
-/* Global includes */
-//#include <iprt/thread.h>
-//#include <iprt/stream.h>
+/* COM includes: */
+#include "COMEnums.h"
+#include "CVirtualBoxErrorInfo.h"
+#include "CUSBDevice.h"
+#include "CEvent.h"
+#include "CMachineStateChangedEvent.h"
+#include "CMachineDataChangedEvent.h"
+#include "CExtraDataCanChangeEvent.h"
+#include "CExtraDataChangedEvent.h"
+#include "CMachineRegisteredEvent.h"
+#include "CSessionStateChangedEvent.h"
+#include "CSnapshotChangedEvent.h"
+#include "CMousePointerShapeChangedEvent.h"
+#include "CMouseCapabilityChangedEvent.h"
+#include "CKeyboardLedsChangedEvent.h"
+#include "CStateChangedEvent.h"
+#include "CNetworkAdapterChangedEvent.h"
+#include "CMediumChangedEvent.h"
+#include "CUSBDeviceStateChangedEvent.h"
+#include "CRuntimeErrorEvent.h"
+#include "CCanShowWindowEvent.h"
+#include "CShowWindowEvent.h"
+#include "CGuestMonitorChangedEvent.h"
 
 UIMainEventListener::UIMainEventListener()
Index: trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMainEventListener.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMainEventListener.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMainEventListener.h	(revision 41587)
@@ -20,8 +20,12 @@
 #define __UIMainEventListener_h__
 
-/* Local includes */
-#include "COMDefs.h"
+/* COM includes: */
+#include "COMEnums.h"
+#include "CVirtualBoxErrorInfo.h"
+#include "CMediumAttachment.h"
+#include "CNetworkAdapter.h"
+#include "CUSBDevice.h"
 
-/* VBox includes */
+/* Other VBox includes: */
 #include <VBox/com/listeners.h>
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp	(revision 41587)
@@ -18,5 +18,5 @@
  */
 
-/* Global includes */
+/* Qt includes: */
 #include <QDir>
 #include <QDesktopWidget>
@@ -26,11 +26,7 @@
 #ifdef Q_WS_MAC
 # include <QPushButton>
-#endif
-
-#include <iprt/err.h>
-#include <iprt/param.h>
-#include <iprt/path.h>
-
-/* Local includes */
+#endif /* Q_WS_MAC */
+
+/* GUI includes: */
 #include "UIMessageCenter.h"
 #include "VBoxGlobal.h"
@@ -47,9 +43,23 @@
 #ifdef Q_WS_MAC
 # include "VBoxUtils-darwin.h"
-#endif
-
-#if defined (Q_WS_WIN32)
+#endif /* Q_WS_MAC */
+#ifdef Q_WS_WIN
 # include <Htmlhelp.h>
-#endif
+#endif /* Q_WS_WIN */
+
+/* COM includes: */
+#include "CSystemProperties.h"
+#include "CVirtualBoxErrorInfo.h"
+#include "CMediumAttachment.h"
+#include "CMediumFormat.h"
+#include "CAppliance.h"
+#include "CExtPackManager.h"
+#include "CExtPackFile.h"
+#include "CHostNetworkInterface.h"
+
+/* Other VBox includes: */
+#include <iprt/err.h>
+#include <iprt/param.h>
+#include <iprt/path.h>
 
 bool UIMessageCenter::isAnyWarningShown()
Index: trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h	(revision 41587)
@@ -20,13 +20,16 @@
 #define __UIMessageCenter_h__
 
-/* Global includes */
+/* Qt includes: */
 #include <QObject>
 #include <QPointer>
 
-/* Local includes */
-#include "COMDefs.h"
+/* GUI includes: */
+#include "CProgress.h"
 #include "QIMessageBox.h"
 
-/* Forward declarations */
+/* COM includes: */
+#include "COMEnums.h"
+
+/* Forward declarations: */
 class VBoxMedium;
 struct StorageSlot;
Index: trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp	(revision 41587)
@@ -16,37 +16,5 @@
  */
 
-#include "VBoxGlobal.h"
-#include <VBox/vd.h>
-#include <VBox/version.h>
-
-#include "VBoxUtils.h"
-#include "VBoxDefs.h"
-#include "UISelectorWindow.h"
-#include "UIMessageCenter.h"
-#include "QIMessageBox.h"
-#include "QIDialogButtonBox.h"
-#include "UIIconPool.h"
-#include "UIActionPoolSelector.h"
-#include "UIActionPoolRuntime.h"
-#include "UIExtraDataEventHandler.h"
-#include "QIFileDialog.h"
-#include "UINetworkManager.h"
-#include "UIUpdateManager.h"
-
-#include "UIMachine.h"
-#include "UISession.h"
-#ifdef VBOX_WITH_REGISTRATION
-# include "UIRegistrationWzd.h"
-#endif
-#ifdef VBOX_WITH_VIDEOHWACCEL
-# include "VBoxFBOverlay.h"
-#endif /* VBOX_WITH_VIDEOHWACCEL */
-
-#ifdef Q_WS_MAC
-# include "UIMachineWindowFullscreen.h"
-# include "UIMachineWindowSeamless.h"
-#endif /* Q_WS_MAC */
-
-/* Qt includes */
+/* Qt includes: */
 #include <QProgressDialog>
 #include <QLibraryInfo>
@@ -68,9 +36,35 @@
 #include <QNetworkProxy>
 
+#ifdef Q_WS_WIN
+# include <QEventLoop>
+#endif /* Q_WS_WIN */
+
+#ifdef Q_WS_X11
+# include <QTextBrowser>
+# include <QScrollBar>
+# include <QX11Info>
+#endif /* Q_WS_X11 */
+
 #ifdef VBOX_GUI_WITH_PIDFILE
 # include <QTextStream>
 #endif /* VBOX_GUI_WITH_PIDFILE */
 
-#include <math.h>
+/* GUI includes: */
+#include "VBoxGlobal.h"
+#include "VBoxUtils.h"
+#include "VBoxDefs.h"
+#include "UISelectorWindow.h"
+#include "UIMessageCenter.h"
+#include "QIMessageBox.h"
+#include "QIDialogButtonBox.h"
+#include "UIIconPool.h"
+#include "UIActionPoolSelector.h"
+#include "UIActionPoolRuntime.h"
+#include "UIExtraDataEventHandler.h"
+#include "QIFileDialog.h"
+#include "UINetworkManager.h"
+#include "UIUpdateManager.h"
+#include "UIMachine.h"
+#include "UISession.h"
 
 #ifdef Q_WS_X11
@@ -79,20 +73,75 @@
 #  include "VBoxLicenseViewer.h"
 # endif /* VBOX_OSE */
-# include <QTextBrowser>
-# include <QScrollBar>
-# include <QX11Info>
 # include "VBoxX11Helper.h"
-#endif
+#endif /* Q_WS_X11 */
 
 #ifdef Q_WS_MAC
 # include "VBoxUtils-darwin.h"
+# include "UIMachineWindowFullscreen.h"
+# include "UIMachineWindowSeamless.h"
 #endif /* Q_WS_MAC */
 
-#if defined (Q_WS_WIN)
+#ifdef VBOX_WITH_VIDEOHWACCEL
+# include "VBoxFBOverlay.h"
+#endif /* VBOX_WITH_VIDEOHWACCEL */
+
+#ifdef VBOX_WITH_REGISTRATION
+# include "UIRegistrationWzd.h"
+#endif /* VBOX_WITH_REGISTRATION */
+
+#ifdef VBOX_GUI_WITH_SYSTRAY
+#include <iprt/process.h>
+#if defined(RT_OS_WINDOWS) || defined(RT_OS_OS2)
+#define HOSTSUFF_EXE ".exe"
+#else /* !RT_OS_WINDOWS */
+#define HOSTSUFF_EXE ""
+#endif /* !RT_OS_WINDOWS */
+#endif /* VBOX_GUI_WITH_SYSTRAY */
+
+/* COM includes: */
+#include "CSystemProperties.h"
+#include "CUSBDevice.h"
+#include "CUSBDeviceFilter.h"
+#include "CBIOSSettings.h"
+#include "CVRDEServer.h"
+#include "CStorageController.h"
+#include "CMediumAttachment.h"
+#include "CAudioAdapter.h"
+#include "CNetworkAdapter.h"
+#include "CSerialPort.h"
+#include "CParallelPort.h"
+#include "CUSBController.h"
+#include "CHostUSBDevice.h"
+#include "CMediumFormat.h"
+#include "CSharedFolder.h"
+
+/* Other VBox includes: */
+#include <iprt/asm.h>
+#include <iprt/err.h>
+#include <iprt/param.h>
+#include <iprt/path.h>
+#include <iprt/env.h>
+#include <iprt/file.h>
+#include <iprt/ldr.h>
+#include <iprt/system.h>
+
+#include <VBox/vd.h>
+#include <VBox/version.h>
+#include <VBox/sup.h>
+#include <VBox/com/Guid.h>
+#include <VBox/VBoxOGLTest.h>
+
+#ifdef Q_WS_X11
+#include <iprt/mem.h>
+#endif /* Q_WS_X11 */
+
+/* External includes: */
+#include <math.h>
+
+#ifdef Q_WS_WIN
 #include "shlobj.h"
-#include <QEventLoop>
-#endif
-
-#if defined (Q_WS_X11)
+#endif /* Q_WS_WIN */
+
+#ifdef Q_WS_X11
 #undef BOOL /* typedef CARD8 BOOL in Xmd.h conflicts with #define BOOL PRBool
              * in COMDefs.h. A better fix would be to isolate X11-specific
@@ -104,33 +153,5 @@
 #include <X11/extensions/Xinerama.h>
 #define BOOL PRBool
-#endif
-
-#include <VBox/sup.h>
-#include <VBox/com/Guid.h>
-
-#include <iprt/asm.h>
-#include <iprt/err.h>
-#include <iprt/param.h>
-#include <iprt/path.h>
-#include <iprt/env.h>
-#include <iprt/file.h>
-#include <iprt/ldr.h>
-#include <iprt/system.h>
-
-#ifdef VBOX_GUI_WITH_SYSTRAY
-#include <iprt/process.h>
-
-#if defined(RT_OS_WINDOWS) || defined(RT_OS_OS2)
-#define HOSTSUFF_EXE ".exe"
-#else /* !RT_OS_WINDOWS */
-#define HOSTSUFF_EXE ""
-#endif /* !RT_OS_WINDOWS */
-#endif
-
-#if defined (Q_WS_X11)
-#include <iprt/mem.h>
-#endif
-
-#include <VBox/VBoxOGLTest.h>
+#endif /* Q_WS_X11 */
 
 //#define VBOX_WITH_FULL_DETAILS_REPORT /* hidden for now */
Index: trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h	(revision 41587)
@@ -20,11 +20,5 @@
 #define __VBoxGlobal_h__
 
-#include "COMDefs.h"
-#include "VBox/com/Guid.h"
-
-#include "VBoxGlobalSettings.h"
-#include "VBoxMedium.h"
-
-/* Qt includes */
+/* Qt includes: */
 #include <QApplication>
 #include <QLayout>
@@ -35,8 +29,26 @@
 #include <QFileIconProvider>
 
+/* GUI includes: */
+#include "VBoxGlobalSettings.h"
+#include "VBoxMedium.h"
+
+/* COM includes: */
+#include "VBox/com/Guid.h"
+#include "COMEnums.h"
+#include "CHost.h"
+#include "CVirtualBox.h"
+#include "CSession.h"
+#include "CConsole.h"
+#include "CMachine.h"
+#include "CMedium.h"
+#include "CGuestOSType.h"
+#include "CUSBDevice.h"
+
+/* Other VBox includes: */
 #ifdef Q_WS_X11
 # include <sys/wait.h>
-#endif
-
+#endif /* Q_WS_X11 */
+
+/* Forward declarations: */
 class QAction;
 class QLabel;
Index: trunk/src/VBox/Frontends/VirtualBox/src/net/UIUpdateManager.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/net/UIUpdateManager.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/net/UIUpdateManager.cpp	(revision 41587)
@@ -18,5 +18,5 @@
  */
 
-/* Global includes: */
+/* Qt includes: */
 #include <QNetworkReply>
 #include <QTimer>
@@ -25,5 +25,5 @@
 #include <VBox/version.h>
 
-/* Local includes: */
+/* GUI includes: */
 #include "UIUpdateDefs.h"
 #include "UIUpdateManager.h"
@@ -37,4 +37,8 @@
 #include "VBoxDefs.h"
 
+/* COM includes: */
+#include "CExtPack.h"
+#include "CExtPackManager.h"
+
 /* Forward declarations: */
 class UIUpdateStep;
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIConsoleEventHandler.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIConsoleEventHandler.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIConsoleEventHandler.cpp	(revision 41587)
@@ -18,17 +18,15 @@
  */
 
-/* Local includes */
+/* GUI includes: */
 #include "UIConsoleEventHandler.h"
 #include "UIMainEventListener.h"
 #include "VBoxGlobal.h"
 #include "UISession.h"
-
 #ifdef Q_WS_MAC
 # include "VBoxUtils.h"
 #endif /* Q_WS_MAC */
 
-/* Global includes */
-//#include <iprt/thread.h>
-//#include <iprt/stream.h>
+/* COM includes: */
+#include "CEventSource.h"
 
 /* static */
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIConsoleEventHandler.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIConsoleEventHandler.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIConsoleEventHandler.h	(revision 41587)
@@ -20,8 +20,13 @@
 #define __UIConsoleEventHandler_h__
 
-/* Local includes */
-#include "COMDefs.h"
+/* COM includes: */
+#include "COMEnums.h"
+#include "CVirtualBoxErrorInfo.h"
+#include "CEventListener.h"
+#include "CMediumAttachment.h"
+#include "CNetworkAdapter.h"
+#include "CUSBDevice.h"
 
-/* Local forward declarations */
+/* Forward declarations: */
 class UISession;
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.h	(revision 41587)
@@ -20,12 +20,16 @@
 #define ___UIFrameBuffer_h___
 
-/* Global includes */
+/* Qt includes: */
 #include <QRegion>
 #include <QPaintEvent>
 
-/* Local includes */
-#include "COMDefs.h"
+/* GUI includes: */
+#include "VBoxDefs.h"
+#include "CFramebuffer.h"
+
+/* Other VBox includes: */
 #include <iprt/critsect.h>
 
+/* Forward declarations: */
 class UIMachineView;
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIIndicatorsPool.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIIndicatorsPool.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIIndicatorsPool.cpp	(revision 41587)
@@ -18,14 +18,27 @@
  */
 
-/* Global includes */
-#include <iprt/time.h>
+/* Qt includes: */
 #include <QTimer>
 
-/* Local includes */
+/* GUI includes: */
 #include "UIIndicatorsPool.h"
 #include "VBoxGlobal.h"
-#include "COMDefs.h"
 #include "UIMachineDefs.h"
 #include "QIWithRetranslateUI.h"
+
+/* COM includes: */
+#include "CSystemProperties.h"
+#include "CMachineDebugger.h"
+#include "CGuest.h"
+#include "CStorageController.h"
+#include "CMediumAttachment.h"
+#include "CNetworkAdapter.h"
+#include "CUSBController.h"
+#include "CUSBDevice.h"
+#include "CSharedFolder.h"
+#include "CVRDEServer.h"
+
+/* Other VBox includes: */
+#include <iprt/time.h>
 
 class UIIndicatorHardDisks : public QIWithRetranslateUI<QIStateIndicator>
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIKeyboardHandler.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIKeyboardHandler.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIKeyboardHandler.h	(revision 41587)
@@ -20,12 +20,10 @@
 #define ___UIKeyboardHandler_h___
 
-/* Global includes */
+/* Qt includes: */
 #include <QObject>
 #include <QMap>
 
-/* Local includes */
+/* GUI includes: */
 #include "UIMachineDefs.h"
-#include "COMDefs.h"
-
 #ifdef Q_WS_MAC
 # include <CoreFoundation/CFBase.h>
@@ -33,8 +31,9 @@
 #endif /* Q_WS_MAC */
 
-/* Global forwards */
+/* COM includes: */
+#include "CKeyboard.h"
+
+/* Forward declarations: */
 class QWidget;
-
-/* Local forwards */
 class CSession;
 class UISession;
@@ -174,5 +173,5 @@
     bool m_fPassCAD : 1;
     /** Whether the debugger is active.
-     * Currently only affects auto capturing. */ 
+     * Currently only affects auto capturing. */
     bool m_fDebuggerActive : 1;
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.h	(revision 41587)
@@ -20,15 +20,16 @@
 #define __UIMachine_h__
 
-/* Global includes */
+/* Qt includes: */
 #include <QObject>
 
-/* Local includes */
-#include "COMDefs.h"
+/* GUI includes:  */
 #include "UIMachineDefs.h"
 
-/* Global forwards: */
+/* COM includes: */
+#include "COMEnums.h"
+#include "CSession.h"
+
+/* Forward declarations: */
 class QWidget;
-
-/* Local forwards */
 class UISession;
 class UIVisualState;
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp	(revision 41587)
@@ -18,6 +18,13 @@
  */
 
-/* Local includes */
-#include "COMDefs.h"
+/* Qt includes: */
+#include <QDesktopWidget>
+#include <QDir>
+#include <QFileInfo>
+#include <QImageWriter>
+#include <QPainter>
+#include <QTimer>
+
+/* GUI includes: */
 #include "QIFileDialog.h"
 #include "UIActionPoolRuntime.h"
@@ -46,22 +53,26 @@
 #endif /* Q_WS_MAC */
 
-/* Global includes */
+/* COM includes: */
+#include "CVirtualBoxErrorInfo.h"
+#include "CMachineDebugger.h"
+#include "CSnapshot.h"
+#include "CDisplay.h"
+#include "CStorageController.h"
+#include "CMediumAttachment.h"
+#include "CHostUSBDevice.h"
+#include "CUSBDevice.h"
+#include "CVRDEServer.h"
+
+/* Other VBox includes: */
 #include <iprt/path.h>
-
 #ifdef VBOX_WITH_DEBUGGER_GUI
 # include <iprt/ldr.h>
 #endif /* VBOX_WITH_DEBUGGER_GUI */
 
+/* External includes: */
 #ifdef Q_WS_X11
 # include <XKeyboard.h>
 # include <QX11Info>
 #endif /* Q_WS_X11 */
-
-#include <QDesktopWidget>
-#include <QDir>
-#include <QFileInfo>
-#include <QImageWriter>
-#include <QPainter>
-#include <QTimer>
 
 struct MediumTarget
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h	(revision 41587)
@@ -20,5 +20,5 @@
 #define __UIMachineLogic_h__
 
-/* Local includes: */
+/* GUI includes: */
 #include "UIMachineDefs.h"
 #include <QIWithRetranslateUI.h>
@@ -30,9 +30,4 @@
 class QAction;
 class QActionGroup;
-class CSession;
-class CMachine;
-class CSnapshot;
-class CUSBDevice;
-class CVirtualBoxErrorInfo;
 class UISession;
 class UIKeyboardHandler;
@@ -41,4 +36,9 @@
 class UIMachineView;
 class UIDockIconPreview;
+class CSession;
+class CMachine;
+class CSnapshot;
+class CUSBDevice;
+class CVirtualBoxErrorInfo;
 
 /* Machine logic interface: */
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp	(revision 41587)
@@ -18,5 +18,5 @@
  */
 
-/* Global includes */
+/* Qt includes: */
 #include <QDesktopWidget>
 #include <QMainWindow>
@@ -27,6 +27,9 @@
 #include <VBox/VBoxVideo.h>
 #include <iprt/asm.h>
-
-/* Local includes */
+#ifdef Q_WS_X11
+# include <QX11Info>
+#endif /* Q_WS_X11 */
+
+/* GUI includes: */
 #include "VBoxGlobal.h"
 #include "UIMessageCenter.h"
@@ -49,8 +52,13 @@
 #ifdef VBOX_WITH_DRAG_AND_DROP
 # include "UIDnDHandler.h"
-#endif
-
+#endif /* VBOX_WITH_DRAG_AND_DROP */
+
+/* COM includes: */
+#include "CSession.h"
+#include "CDisplay.h"
+#include "CFramebuffer.h"
+
+/* Other VBox includes: */
 #ifdef Q_WS_X11
-# include <QX11Info>
 # include <X11/XKBlib.h>
 # ifdef KeyPress
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h	(revision 41587)
@@ -20,21 +20,23 @@
 #define ___UIMachineView_h___
 
-/* Global includes */
+/* Qt includes: */
 #include <QAbstractScrollArea>
 #include <QEventLoop>
 
-/* Local includes */
-#include "COMDefs.h"
+/* GUI includes: */
 #include "UIMachineDefs.h"
-
 #ifdef Q_WS_MAC
 # include <CoreFoundation/CFBase.h>
 #endif /* Q_WS_MAC */
 
-/* Local forwards */
+/* COM includes: */
+#include "COMEnums.h"
+
+/* Forward declarations: */
 class UISession;
 class UIMachineLogic;
 class UIMachineWindow;
 class UIFrameBuffer;
+class CSession;
 
 class UIMachineView : public QAbstractScrollArea
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp	(revision 41587)
@@ -18,14 +18,10 @@
  */
 
-/* Global includes: */
+/* Qt includes: */
 #include <QCloseEvent>
 #include <QTimer>
 #include <VBox/version.h>
-#ifdef VBOX_BLEEDING_EDGE
-# include <iprt/buildconfig.h>
-#endif /* VBOX_BLEEDING_EDGE */
-
-/* Local includes: */
-#include "COMDefs.h"
+
+/* GUI includes: */
 #include "VBoxGlobal.h"
 #include "UIMessageCenter.h"
@@ -44,4 +40,12 @@
 # include <X11/Xlib.h>
 #endif /* Q_WS_X11 */
+
+/* COM includes: */
+#include "CSnapshot.h"
+
+/* Other VBox includes: */
+#ifdef VBOX_BLEEDING_EDGE
+# include <iprt/buildconfig.h>
+#endif /* VBOX_BLEEDING_EDGE */
 
 /* static */
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.h	(revision 41587)
@@ -20,11 +20,14 @@
 #define __UIMachineWindow_h__
 
-/* Global includes: */
+/* Qt includes: */
 #include <QMainWindow>
 
-/* Local includes: */
+/* GUI includes: */
 #include "QIWithRetranslateUI.h"
 #include "UIMachineDefs.h"
-#include "COMDefs.h"
+
+/* COM includes: */
+#include "COMEnums.h"
+#include "CMachine.h"
 
 /* Forward declarations: */
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.cpp	(revision 41587)
@@ -18,9 +18,9 @@
  */
 
-/* Global includes */
+/* Qt includes: */
 #include <QDesktopWidget>
 #include <QMouseEvent>
 
-/* Local includes */
+/* GUI includes: */
 #include "VBoxGlobal.h"
 #include "UIMessageCenter.h"
@@ -54,4 +54,9 @@
 # include "VBoxUtils-darwin.h"
 #endif /* Q_WS_MAC */
+
+/* COM includes: */
+#include "CMouse.h"
+#include "CFramebuffer.h"
+#include "CDisplay.h"
 
 /* Factory function to create mouse-handler: */
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.h	(revision 41587)
@@ -20,5 +20,5 @@
 #define ___UIMouseHandler_h___
 
-/* Global includes */
+/* Qt includes: */
 #include <QObject>
 #include <QPoint>
@@ -26,12 +26,9 @@
 #include <QRect>
 
-/* Local includes */
+/* GUI includes: */
 #include "UIMachineDefs.h"
 
-/* Global forwards */
+/* Forward declarations: */
 class QWidget;
-
-/* Local forwards */
-class CSession;
 class UISession;
 class UIMachineLogic;
@@ -41,4 +38,5 @@
 typedef union  _XEvent XEvent;
 #endif /* Q_WS_X11 */
+class CSession;
 
 /* Delegate to control VM mouse functionality: */
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMultiScreenLayout.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMultiScreenLayout.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMultiScreenLayout.cpp	(revision 41587)
@@ -18,7 +18,12 @@
  */
 
-/* Local includes */
+/* Qt includes: */
+#include <QApplication>
+#include <QDesktopWidget>
+#include <QMap>
+#include <QMenu>
+
+/* GUI includes: */
 #include "UIMultiScreenLayout.h"
-#include "COMDefs.h"
 #include "UIActionPoolRuntime.h"
 #include "UIMachineLogic.h"
@@ -26,9 +31,10 @@
 #include "UIMessageCenter.h"
 
-/* Global includes */
-#include <QApplication>
-#include <QDesktopWidget>
-#include <QMap>
-#include <QMenu>
+/* COM includes: */
+#include "COMEnums.h"
+#include "CSession.h"
+#include "CConsole.h"
+#include "CMachine.h"
+#include "CDisplay.h"
 
 UIMultiScreenLayout::UIMultiScreenLayout(UIMachineLogic *pMachineLogic)
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp	(revision 41587)
@@ -18,10 +18,10 @@
  */
 
-/* Global includes */
+/* Qt includes: */
 #include <QApplication>
 #include <QWidget>
 #include <QTimer>
 
-/* Local includes */
+/* GUI includes: */
 #include "VBoxGlobal.h"
 #include "UISession.h"
@@ -37,5 +37,5 @@
 #ifdef VBOX_WITH_VIDEOHWACCEL
 # include "VBoxFBOverlay.h"
-#endif
+#endif /* VBOX_WITH_VIDEOHWACCEL */
 
 #ifdef Q_WS_X11
@@ -45,6 +45,6 @@
 # ifndef VBOX_WITHOUT_XCURSOR
 #  include <X11/Xcursor/Xcursor.h>
-# endif
-#endif
+# endif /* VBOX_WITHOUT_XCURSOR */
+#endif /* Q_WS_X11 */
 
 #ifdef VBOX_GUI_WITH_KEYS_RESET_HANDLER
@@ -52,4 +52,16 @@
 # include <signal.h>
 #endif /* VBOX_GUI_WITH_KEYS_RESET_HANDLER */
+
+/* COM includes: */
+#include "CSystemProperties.h"
+#include "CMachineDebugger.h"
+#include "CGuest.h"
+#include "CStorageController.h"
+#include "CMediumAttachment.h"
+#include "CDisplay.h"
+#include "CFramebuffer.h"
+#include "CNetworkAdapter.h"
+#include "CVRDEServer.h"
+#include "CUSBController.h"
 
 UISession::UISession(UIMachine *pMachine, CSession &sessionReference)
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h	(revision 41587)
@@ -20,13 +20,15 @@
 #define ___UIConsole_h___
 
-/* Global includes */
+/* Qt includes: */
 #include <QObject>
 #include <QCursor>
 
-/* Local includes */
-#include "COMDefs.h"
+/* GUI includes: */
 #include "UIMachineDefs.h"
 
-/* Global forwards */
+/* COM includes: */
+#include "COMEnums.h"
+
+/* Forward declarations: */
 class QMenu;
 class QMenuBar;
@@ -40,10 +42,12 @@
 # endif /* !Q_WS_MAC */
 #endif /* VBOX_GUI_WITH_KEYS_RESET_HANDLER */
-
-/* Local forwards */
 class UIFrameBuffer;
 class UIMachine;
 class UIMachineLogic;
 class UIMachineMenuBar;
+class CSession;
+class CUSBDevice;
+class CNetworkAdapter;
+class CMediumAttachment;
 
 /* CConsole callback event types: */
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp	(revision 41587)
@@ -18,9 +18,8 @@
  */
 
-/* Global includes: */
+/* Qt includes: */
 #include <QDesktopWidget>
 
-/* Local includes: */
-#include "COMDefs.h"
+/* GUI includes: */
 #include "VBoxGlobal.h"
 #include "UIMessageCenter.h"
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp	(revision 41587)
@@ -18,5 +18,5 @@
  */
 
-/* Global includes: */
+/* Qt includes: */
 #include <QDesktopWidget>
 #include <QMenu>
@@ -26,5 +26,5 @@
 #endif /* Q_WS_MAC */
 
-/* Local includes: */
+/* GUI includes: */
 #include "VBoxMiniToolBar.h"
 #include "UISession.h"
@@ -32,4 +32,8 @@
 #include "UIMachineLogicFullscreen.h"
 #include "UIMachineWindowFullscreen.h"
+
+/* COM includes: */
+#include "CMachine.h"
+#include "CSnapshot.h"
 
 UIMachineWindowFullscreen::UIMachineWindowFullscreen(UIMachineLogic *pMachineLogic, ulong uScreenId)
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.cpp	(revision 41587)
@@ -18,9 +18,8 @@
  */
 
-/* Global includes: */
+/* Qt includes: */
 #include <QMenu>
 
-/* Local includes: */
-#include "COMDefs.h"
+/* GUI includes: */
 #include "VBoxGlobal.h"
 #include "UIMessageCenter.h"
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp	(revision 41587)
@@ -18,5 +18,5 @@
  */
 
-/* Global includes: */
+/* Qt includes: */
 #include <QDesktopWidget>
 #include <QMenuBar>
@@ -25,5 +25,5 @@
 #include <QResizeEvent>
 
-/* Local includes: */
+/* GUI includes: */
 #include "VBoxGlobal.h"
 #include "UISession.h"
@@ -42,4 +42,8 @@
 # include "UIImageTools.h"
 #endif /* Q_WS_MAC */
+
+/* COM includes: */
+#include "CMediumAttachment.h"
+#include "CUSBController.h"
 
 UIMachineWindowNormal::UIMachineWindowNormal(UIMachineLogic *pMachineLogic, ulong uScreenId)
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineLogicScale.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineLogicScale.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineLogicScale.cpp	(revision 41587)
@@ -18,6 +18,5 @@
  */
 
-/* Local includes: */
-#include "COMDefs.h"
+/* GUI includes: */
 #include "VBoxGlobal.h"
 #include "UIMessageCenter.h"
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineViewScale.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineViewScale.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineViewScale.cpp	(revision 41587)
@@ -18,5 +18,10 @@
  */
 
-/* Local includes */
+/* Qt includes: */
+#include <QDesktopWidget>
+#include <QMainWindow>
+#include <QTimer>
+
+/* GUI includes */
 #include "VBoxGlobal.h"
 #include "UISession.h"
@@ -30,8 +35,6 @@
 #endif /* VBOX_GUI_USE_QUARTZ2D */
 
-/* Global includes */
-#include <QDesktopWidget>
-#include <QMainWindow>
-#include <QTimer>
+/* COM includes: */
+#include "CDisplay.h"
 
 UIMachineViewScale::UIMachineViewScale(  UIMachineWindow *pMachineWindow
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineWindowScale.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineWindowScale.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineWindowScale.cpp	(revision 41587)
@@ -18,5 +18,5 @@
  */
 
-/* Global includes: */
+/* Qt includes: */
 #include <QDesktopWidget>
 #include <QMenu>
@@ -28,5 +28,5 @@
 #endif /* Q_WS_MAC */
 
-/* Local includes: */
+/* GUI includes: */
 #include "UISession.h"
 #include "UIMachineLogic.h"
@@ -40,4 +40,7 @@
 # include "UIImageTools.h"
 #endif /* Q_WS_MAC */
+
+/* COM includes: */
+#include "CMachine.h"
 
 UIMachineWindowScale::UIMachineWindowScale(UIMachineLogic *pMachineLogic, ulong uScreenId)
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineLogicSeamless.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineLogicSeamless.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineLogicSeamless.cpp	(revision 41587)
@@ -18,9 +18,8 @@
  */
 
-/* Global includes: */
+/* Qt includes: */
 #include <QDesktopWidget>
 
-/* Local includes: */
-#include "COMDefs.h"
+/* GUI includes: */
 #include "VBoxGlobal.h"
 #include "UIMessageCenter.h"
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.cpp	(revision 41587)
@@ -18,5 +18,5 @@
  */
 
-/* Global includes */
+/* Qt includes: */
 #include <QApplication>
 #include <QDesktopWidget>
@@ -25,10 +25,7 @@
 #ifdef Q_WS_MAC
 #include <QMenuBar>
-#endif
-#ifdef Q_WS_X11
-#include <limits.h>
-#endif
-
-/* Local includes */
+#endif /* Q_WS_MAC */
+
+/* GUI includes: */
 #include "VBoxGlobal.h"
 #include "UISession.h"
@@ -37,4 +34,12 @@
 #include "UIMachineViewSeamless.h"
 #include "UIFrameBuffer.h"
+
+/* COM includes: */
+#include "CDisplay.h"
+
+/* External includes: */
+#ifdef Q_WS_X11
+#include <limits.h>
+#endif /* Q_WS_X11 */
 
 UIMachineViewSeamless::UIMachineViewSeamless(  UIMachineWindow *pMachineWindow
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp	(revision 41587)
@@ -18,5 +18,5 @@
  */
 
-/* Global includes: */
+/* Qt includes: */
 #include <QDesktopWidget>
 #include <QMenu>
@@ -26,5 +26,5 @@
 #endif /* Q_WS_MAC */
 
-/* Local includes: */
+/* GUI includes: */
 #include "VBoxGlobal.h"
 #include "UISession.h"
@@ -39,4 +39,7 @@
 # include "VBoxUtils.h"
 #endif /* Q_WS_MAC */
+
+/* COM includes: */
+#include "CSnapshot.h"
 
 UIMachineWindowSeamless::UIMachineWindowSeamless(UIMachineLogic *pMachineLogic, ulong uScreenId)
Index: trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.h	(revision 41587)
@@ -20,5 +20,5 @@
 #define __UISelectorWindow_h__
 
-/* Global includes: */
+/* Qt includes: */
 #include <QMainWindow>
 #include <QUrl>
@@ -27,8 +27,7 @@
 #endif /* VBOX_GUI_WITH_SYSTRAY */
 
-/* Local includes: */
+/* GUI includes: */
 #include "QIWithRetranslateUI.h"
 #include "VBoxMedium.h"
-#include "COMDefs.h"
 #include "UINetworkDefs.h"
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/selector/UIVMDesktop.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/selector/UIVMDesktop.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/selector/UIVMDesktop.cpp	(revision 41587)
@@ -18,5 +18,5 @@
  */
 
-/* Global includes */
+/* Qt includes: */
 #include <QDir>
 #include <QLabel>
@@ -27,7 +27,5 @@
 #include <QUrl>
 
-#include <iprt/assert.h>
-
-/* Local includes */
+/* GUI includes */
 #include "QILabel.h"
 #include "UIBar.h"
@@ -44,4 +42,19 @@
 #include "UIToolBar.h"
 #include "VBoxUtils.h"
+
+/* COM includes: */
+#include "CSystemProperties.h"
+#include "CStorageController.h"
+#include "CMediumAttachment.h"
+#include "CVRDEServer.h"
+#include "CAudioAdapter.h"
+#include "CNetworkAdapter.h"
+#include "CSerialPort.h"
+#include "CUSBController.h"
+#include "CUSBDeviceFilter.h"
+#include "CSharedFolder.h"
+
+/* Other VBox includes: */
+#include <iprt/assert.h>
 
 /* Forward declarations: */
Index: trunk/src/VBox/Frontends/VirtualBox/src/selector/UIVMItem.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/selector/UIVMItem.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/selector/UIVMItem.cpp	(revision 41587)
@@ -22,14 +22,15 @@
 #else  /* !VBOX_WITH_PRECOMPILED_HEADERS */
 
-/* Local includes */
+/* Qt includes: */
+#include <QFileInfo>
+
+/* GUI includes: */
 #include "UIVMItem.h"
-
-/* Qt includes */
-#include <QFileInfo>
-
 #ifdef Q_WS_MAC
-//# include "VBoxUtils.h"
 # include <ApplicationServices/ApplicationServices.h>
 #endif /* Q_WS_MAC */
+
+/* COM includes: */
+#include "CSnapshot.h"
 
 #endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
Index: trunk/src/VBox/Frontends/VirtualBox/src/selector/UIVMItem.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/selector/UIVMItem.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/selector/UIVMItem.h	(revision 41587)
@@ -20,10 +20,13 @@
 #define __UIVMItem_h__
 
-/* Local includes */
+/* Qt includes: */
+#include <QDateTime>
+#include <QMimeData>
+
+/* GUI includes: */
 #include "VBoxGlobal.h"
 
-/* Global includes */
-#include <QDateTime>
-#include <QMimeData>
+/* COM includes: */
+#include "CVirtualBoxErrorInfo.h"
 
 class UIVMItem
Index: trunk/src/VBox/Frontends/VirtualBox/src/selector/UIVMPreviewWindow.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/selector/UIVMPreviewWindow.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/selector/UIVMPreviewWindow.cpp	(revision 41587)
@@ -18,5 +18,5 @@
  */
 
-/* Global includes: */
+/* Qt includes: */
 #include <QContextMenuEvent>
 #include <QMenu>
@@ -24,9 +24,12 @@
 #include <QTimer>
 
-/* Local includes: */
+/* GUI includes: */
 #include "UIVMPreviewWindow.h"
 #include "UIVirtualBoxEventHandler.h"
 #include "UIImageTools.h"
 #include "VBoxGlobal.h"
+
+/* COM includes: */
+#include "CDisplay.h"
 
 /* Initialize map: */
Index: trunk/src/VBox/Frontends/VirtualBox/src/selector/UIVMPreviewWindow.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/selector/UIVMPreviewWindow.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/selector/UIVMPreviewWindow.h	(revision 41587)
@@ -20,11 +20,15 @@
 #define __UIVMPreviewWindow_h__
 
-/* Local includes */
-#include "QIWithRetranslateUI.h"
-#include "COMDefs.h"
-
-/* Global includes: */
+/* Qt includes: */
 #include <QWidget>
 #include <QHash>
+
+/* GUI includes: */
+#include "QIWithRetranslateUI.h"
+
+/* COM includes: */
+#include "COMEnums.h"
+#include "CSession.h"
+#include "CMachine.h"
 
 /* Forward declarations: */
Index: trunk/src/VBox/Frontends/VirtualBox/src/selector/UIVirtualBoxEventHandler.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/selector/UIVirtualBoxEventHandler.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/selector/UIVirtualBoxEventHandler.cpp	(revision 41587)
@@ -18,12 +18,11 @@
  */
 
-/* Local includes */
+/* GUI includes: */
 #include "UIVirtualBoxEventHandler.h"
 #include "UIMainEventListener.h"
 #include "VBoxGlobal.h"
 
-/* Global includes */
-//#include <iprt/thread.h>
-//#include <iprt/stream.h>
+/* COM includes: */
+#include "CEventSource.h"
 
 /* static */
Index: trunk/src/VBox/Frontends/VirtualBox/src/selector/UIVirtualBoxEventHandler.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/selector/UIVirtualBoxEventHandler.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/selector/UIVirtualBoxEventHandler.h	(revision 41587)
@@ -20,6 +20,7 @@
 #define __UIVirtualBoxEventHandler_h__
 
-/* Local includes */
-#include "COMDefs.h"
+/* COM includes: */
+#include "COMEnums.h"
+#include "CEventListener.h"
 
 class UIVirtualBoxEventHandler: public QObject
Index: trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDefs.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDefs.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDefs.h	(revision 41587)
@@ -24,6 +24,6 @@
 #include <QMap>
 
-/* VBox includes: */
-#include "COMDefs.h"
+/* COM includes: */
+#include "COMEnums.h"
 
 /* Settings dialog namespace: */
Index: trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.cpp	(revision 41587)
@@ -18,5 +18,5 @@
  */
 
-/* Global includes */
+/* Qt includes: */
 #include <QStackedWidget>
 #include <QThread>
@@ -25,5 +25,5 @@
 #include <QTimer>
 
-/* Local includes */
+/* GUI includes: */
 #include "UISettingsDialogSpecific.h"
 #include "UISettingsDefs.h"
@@ -53,4 +53,7 @@
 #include "UIMachineSettingsUSB.h"
 #include "UIMachineSettingsSF.h"
+
+/* COM includes: */
+#include "CUSBController.h"
 
 #if 0 /* Global USB filters are DISABLED now: */
Index: trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.h	(revision 41587)
@@ -20,7 +20,12 @@
 #define __UISettingsDialogSpecific_h__
 
-/* Local includes */
-#include "COMDefs.h"
+/* GUI includes: */
 #include "UISettingsDialog.h"
+
+/* COM includes: */
+#include "COMEnums.h"
+#include "CSession.h"
+#include "CConsole.h"
+#include "CMachine.h"
 
 /* Dialog which encapsulate all the specific functionalities of the Global Settings */
Index: trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsPage.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsPage.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsPage.h	(revision 41587)
@@ -20,15 +20,20 @@
 #define __UISettingsPage_h__
 
-/* Qt includes */
+/* Qt includes: */
 #include <QWidget>
 #include <QVariant>
 
-/* Other includes */
+/* GUI includes: */
 #include "QIWithRetranslateUI.h"
-#include "COMDefs.h"
 #include "UISettingsDefs.h"
 #include "VBoxGlobalSettings.h"
 
-/* Forward declarations */
+/* COM includes: */
+#include "COMEnums.h"
+#include "CMachine.h"
+#include "CConsole.h"
+#include "CSystemProperties.h"
+
+/* Forward declarations: */
 class QIWidgetValidator;
 class QShowEvent;
Index: trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsExtension.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsExtension.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsExtension.cpp	(revision 41587)
@@ -16,8 +16,8 @@
  */
 
-/* Global includes */
+/* Qt includes: */
 #include <QHeaderView>
 
-/* Local includes */
+/* GUI includes: */
 #include "UIGlobalSettingsExtension.h"
 #include "UIIconPool.h"
@@ -26,4 +26,9 @@
 #include "UIMessageCenter.h"
 #include "VBoxLicenseViewer.h"
+
+/* COM includes: */
+#include "CExtPackManager.h"
+#include "CExtPack.h"
+#include "CExtPackFile.h"
 
 /* Extension package item: */
Index: trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsNetwork.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsNetwork.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsNetwork.cpp	(revision 41587)
@@ -18,9 +18,9 @@
  */
 
-/* Global includes */
+/* Qt includes: */
 #include <QHeaderView>
 #include <QHostAddress>
 
-/* Local includes */
+/* GUI includes: */
 #include "QIWidgetValidator.h"
 #include "UIIconPool.h"
@@ -29,4 +29,8 @@
 #include "VBoxGlobal.h"
 #include "UIMessageCenter.h"
+
+/* COM includes: */
+#include "CHostNetworkInterface.h"
+#include "CDHCPServer.h"
 
 /* Host-network item constructor: */
Index: trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsAudio.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsAudio.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsAudio.cpp	(revision 41587)
@@ -18,6 +18,10 @@
  */
 
+/* GUI includes: */
 #include "UIMachineSettingsAudio.h"
 #include "VBoxGlobal.h"
+
+/* COM includes: */
+#include "CAudioAdapter.h"
 
 UIMachineSettingsAudio::UIMachineSettingsAudio()
Index: trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsAudio.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsAudio.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsAudio.h	(revision 41587)
@@ -20,7 +20,7 @@
 #define __UIMachineSettingsAudio_h__
 
+/* GUI includes: */
 #include "UISettingsPage.h"
 #include "UIMachineSettingsAudio.gen.h"
-#include "COMDefs.h"
 
 /* Machine settings / Audio page / Data: */
Index: trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.cpp	(revision 41587)
@@ -18,4 +18,8 @@
  */
 
+/* Qt includes: */
+#include <QDesktopWidget>
+
+/* GUI includes: */
 #include "QIWidgetValidator.h"
 #include "UIMachineSettingsDisplay.h"
@@ -23,5 +27,6 @@
 #include "UIMessageCenter.h"
 
-#include <QDesktopWidget>
+/* COM includes: */
+#include "CVRDEServer.h"
 
 /**
Index: trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.h	(revision 41587)
@@ -20,7 +20,10 @@
 #define __UIMachineSettingsDisplay_h__
 
-#include "COMDefs.h"
+/* GUI includes: */
 #include "UISettingsPage.h"
 #include "UIMachineSettingsDisplay.gen.h"
+
+/* COM includes: */
+#include "CGuestOSType.h"
 
 /* Machine settings / Display page / Data: */
Index: trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsGeneral.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsGeneral.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsGeneral.h	(revision 41587)
@@ -20,7 +20,7 @@
 #define __UIMachineSettingsGeneral_h__
 
+/* Local includes: */
 #include "UISettingsPage.h"
 #include "UIMachineSettingsGeneral.gen.h"
-#include "COMDefs.h"
 
 /* Machine settings / General page / Data: */
Index: trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsNetwork.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsNetwork.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsNetwork.cpp	(revision 41587)
@@ -18,5 +18,5 @@
  */
 
-/* Local includes: */
+/* GUI includes: */
 #include "QIWidgetValidator.h"
 #include "QIArrowButtonSwitch.h"
@@ -25,4 +25,10 @@
 #include "QITabWidget.h"
 
+/* COM includes: */
+#include "CNetworkAdapter.h"
+#include "CNATEngine.h"
+#include "CHostNetworkInterface.h"
+
+/* Other VBox includes: */
 #ifdef VBOX_WITH_VDE
 # include <iprt/ldr.h>
Index: trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsParallel.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsParallel.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsParallel.cpp	(revision 41587)
@@ -18,4 +18,8 @@
  */
 
+/* Qt includes: */
+#include <QDir>
+
+/* GUI includes: */
 #include "UIMachineSettingsParallel.h"
 #include "QIWidgetValidator.h"
@@ -23,5 +27,6 @@
 #include "QITabWidget.h"
 
-#include <QDir>
+/* COM includes: */
+#include "CParallelPort.h"
 
 /* UIMachineSettingsParallel stuff */
Index: trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsParallel.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsParallel.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsParallel.h	(revision 41587)
@@ -20,9 +20,9 @@
 #define __UIMachineSettingsParallel_h__
 
+/* GUI includes: */
 #include "UISettingsPage.h"
 #include "UIMachineSettingsParallel.gen.h"
-#include "COMDefs.h"
 
-/* Forward declarations */
+/* Forward declarations: */
 class UIMachineSettingsParallelPage;
 class QITabWidget;
Index: trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsPortForwardingDlg.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsPortForwardingDlg.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsPortForwardingDlg.h	(revision 41587)
@@ -20,8 +20,10 @@
 #define __UIMachineSettingsPortForwardingDlg_h__
 
-/* Local includes */
+/* GUI includes */
 #include "QIWithRetranslateUI.h"
 #include "QIDialog.h"
-#include "COMDefs.h"
+
+/* COM includes: */
+#include "COMEnums.h"
 
 /* Forward declarations: */
Index: trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSF.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSF.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSF.h	(revision 41587)
@@ -20,9 +20,12 @@
 #define __UIMachineSettingsSF_h__
 
-/* Local includes */
+/* GUI includes: */
 #include "UISettingsPage.h"
 #include "UIMachineSettingsSF.gen.h"
 
-/* Local forwards */
+/* COM includes: */
+#include "CSharedFolder.h"
+
+/* Forward declarations: */
 class SFTreeViewItem;
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSerial.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSerial.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSerial.cpp	(revision 41587)
@@ -18,4 +18,8 @@
  */
 
+/* Qt includes: */
+#include <QDir>
+
+/* GUI includes: */
 #include "UIMachineSettingsSerial.h"
 #include "QIWidgetValidator.h"
@@ -23,5 +27,6 @@
 #include "QITabWidget.h"
 
-#include <QDir>
+/* COM includes: */
+#include "CSerialPort.h"
 
 /* UIMachineSettingsSerial stuff */
Index: trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSerial.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSerial.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSerial.h	(revision 41587)
@@ -20,7 +20,7 @@
 #define __UIMachineSettingsSerial_h__
 
+/* GUI includes: */
 #include "UISettingsPage.h"
 #include "UIMachineSettingsSerial.gen.h"
-#include "COMDefs.h"
 
 /* Forward declarations */
Index: trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.cpp	(revision 41587)
@@ -18,14 +18,5 @@
  */
 
-/* Local Includes */
-#include "QIWidgetValidator.h"
-#include "UIIconPool.h"
-#include "UIWizardNewVD.h"
-#include "VBoxGlobal.h"
-#include "QIFileDialog.h"
-#include "UIMessageCenter.h"
-#include "UIMachineSettingsStorage.h"
-
-/* Global Includes */
+/* Qt includes: */
 #include <QHeaderView>
 #include <QItemEditorFactory>
@@ -36,4 +27,17 @@
 #include <QTimer>
 #include <QCommonStyle>
+
+/* GUI includes: */
+#include "QIWidgetValidator.h"
+#include "UIIconPool.h"
+#include "UIWizardNewVD.h"
+#include "VBoxGlobal.h"
+#include "QIFileDialog.h"
+#include "UIMessageCenter.h"
+#include "UIMachineSettingsStorage.h"
+
+/* COM includes: */
+#include "CStorageController.h"
+#include "CMediumAttachment.h"
 
 QString compressText (const QString &aText)
Index: trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.h	(revision 41587)
@@ -20,5 +20,5 @@
 #define __UIMachineSettingsStorage_h__
 
-/* Global includes */
+/* Qt includes: */
 #include <QtGlobal> /* for Q_WS_MAC */
 #ifdef Q_WS_MAC
@@ -31,10 +31,9 @@
 #include <QPointer>
 
-/* Local includes */
+/* GUI includes: */
 #include "UISettingsPage.h"
 #include "UIMachineSettingsStorage.gen.h"
-#include "COMDefs.h"
-
-/* Local forwards */
+
+/* Forward declarations: */
 class AttachmentItem;
 class ControllerItem;
Index: trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSystem.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSystem.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSystem.cpp	(revision 41587)
@@ -18,5 +18,8 @@
  */
 
-/* Local includes */
+/* Qt includes: */
+#include <QHeaderView>
+
+/* GUI includes: */
 #include "QIWidgetValidator.h"
 #include "UIIconPool.h"
@@ -24,7 +27,9 @@
 #include "UIMachineSettingsSystem.h"
 
-/* Global includes */
+/* COM includes: */
+#include "CBIOSSettings.h"
+
+/* Other VBox includes: */
 #include <iprt/cdefs.h>
-#include <QHeaderView>
 
 UIMachineSettingsSystem::UIMachineSettingsSystem()
Index: trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSystem.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSystem.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSystem.h	(revision 41587)
@@ -20,5 +20,5 @@
 #define __UIMachineSettingsSystem_h__
 
-#include "COMDefs.h"
+/* GUI includes: */
 #include "UISettingsPage.h"
 #include "UIMachineSettingsSystem.gen.h"
Index: trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSB.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSB.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSB.cpp	(revision 41587)
@@ -18,8 +18,8 @@
  */
 
-/* Global includes */
+/* Qt includes: */
 #include <QHeaderView>
 
-/* Local includes */
+/* GUI includes: */
 #include "QIWidgetValidator.h"
 #include "UIIconPool.h"
@@ -30,4 +30,13 @@
 #include "UIMachineSettingsUSBFilterDetails.h"
 #include "VBoxDefs.h"
+
+/* COM includes: */
+#include "CUSBController.h"
+#include "CUSBDevice.h"
+#include "CUSBDeviceFilter.h"
+#include "CHostUSBDevice.h"
+#include "CHostUSBDeviceFilter.h"
+#include "CExtPackManager.h"
+#include "CExtPack.h"
 
 /* Using declarations: */
Index: trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSB.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSB.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSB.h	(revision 41587)
@@ -20,8 +20,9 @@
 #define __UIMachineSettingsUSB_h__
 
+/* GUI includes: */
 #include "UISettingsPage.h"
 #include "UIMachineSettingsUSB.gen.h"
-#include "COMDefs.h"
-
+
+/* Forward declarations: */
 class VBoxUSBMenu;
 class UIToolBar;
Index: trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceEditorWidget.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceEditorWidget.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceEditorWidget.cpp	(revision 41587)
@@ -18,12 +18,5 @@
  */
 
-/* VBox includes */
-#include "UIApplianceEditorWidget.h"
-#include "VBoxGlobal.h"
-#include "UIMessageCenter.h"
-#include "VBoxOSTypeSelectorButton.h"
-#include "UILineTextEdit.h"
-
-/* Qt includes */
+/* Qt includes: */
 #include <QItemDelegate>
 #include <QSortFilterProxyModel>
@@ -33,4 +26,14 @@
 #include <QSpinBox>
 #include <QComboBox>
+
+/* GUI includes: */
+#include "UIApplianceEditorWidget.h"
+#include "VBoxGlobal.h"
+#include "UIMessageCenter.h"
+#include "VBoxOSTypeSelectorButton.h"
+#include "UILineTextEdit.h"
+
+/* COM includes: */
+#include "CSystemProperties.h"
 
 ////////////////////////////////////////////////////////////////////////////////
Index: trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceEditorWidget.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceEditorWidget.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceEditorWidget.h	(revision 41587)
@@ -20,14 +20,17 @@
 #define __UIApplianceEditorWidget_h__
 
-/* VBox includes */
-#include "COMDefs.h"
+/* Qt includes: */
+#include <QSortFilterProxyModel>
+#include <QItemDelegate>
+
+/* GUI includes: */
 #include "UIApplianceEditorWidget.gen.h"
 #include "QIWithRetranslateUI.h"
 
-/* Qt includes */
-#include <QSortFilterProxyModel>
-#include <QItemDelegate>
-
-/* vbOX Forward declarations */
+/* COM includes: */
+#include "COMEnums.h"
+#include "CVirtualSystemDescription.h"
+
+/* Forward declarations: */
 class ModelItem;
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceExportEditorWidget.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceExportEditorWidget.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceExportEditorWidget.cpp	(revision 41587)
@@ -18,8 +18,11 @@
  */
 
-/* VBox includes */
+/* GUI includes: */
 #include "UIApplianceExportEditorWidget.h"
 #include "VBoxGlobal.h"
 #include "UIMessageCenter.h"
+
+/* COM includes: */
+#include "CAppliance.h"
 
 ////////////////////////////////////////////////////////////////////////////////
Index: trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceExportEditorWidget.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceExportEditorWidget.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceExportEditorWidget.h	(revision 41587)
@@ -20,4 +20,5 @@
 #define __UIApplianceExportEditorWidget_h__
 
+/* GUI includes: */
 #include "UIApplianceEditorWidget.h"
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceImportEditorWidget.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceImportEditorWidget.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceImportEditorWidget.cpp	(revision 41587)
@@ -18,8 +18,11 @@
  */
 
-/* VBox includes */
+/* GUI includes: */
 #include "UIApplianceImportEditorWidget.h"
 #include "VBoxGlobal.h"
 #include "UIMessageCenter.h"
+
+/* COM includes: */
+#include "CAppliance.h"
 
 ////////////////////////////////////////////////////////////////////////////////
Index: trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceImportEditorWidget.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceImportEditorWidget.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceImportEditorWidget.h	(revision 41587)
@@ -20,5 +20,5 @@
 #define __UIApplianceImportEditorWidget_h__
 
-/* VBox includes */
+/* GUI includes: */
 #include "UIApplianceEditorWidget.h"
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIBootTable.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIBootTable.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIBootTable.h	(revision 41587)
@@ -20,10 +20,12 @@
 #define __UIBootTable_h__
 
-/* Local includes */
-#include <COMDefs.h>
+/* Qt includes: */
+#include <QListWidget>
+
+/* GUI includes: */
 #include "QIWithRetranslateUI.h"
 
-/* Global includes */
-#include <QListWidget>
+/* COM includes: */
+#include "COMEnums.h"
 
 class UIBootTableItem : public QListWidgetItem
Index: trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIProgressDialog.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIProgressDialog.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIProgressDialog.cpp	(revision 41587)
@@ -18,17 +18,5 @@
  */
 
-/* VBox includes */
-#include "UIProgressDialog.h"
-#include "COMDefs.h"
-#include "QIDialogButtonBox.h"
-#include "QILabel.h"
-#include "UISpecialControls.h"
-#include "VBoxGlobal.h"
-
-#ifdef Q_WS_MAC
-# include "VBoxUtils-darwin.h"
-#endif /* Q_WS_MAC */
-
-/* Qt includes */
+/* Qt includes: */
 #include <QCloseEvent>
 #include <QEventLoop>
@@ -37,4 +25,17 @@
 #include <QTimer>
 #include <QVBoxLayout>
+
+/* GUI includes: */
+#include "UIProgressDialog.h"
+#include "QIDialogButtonBox.h"
+#include "QILabel.h"
+#include "UISpecialControls.h"
+#include "VBoxGlobal.h"
+#ifdef Q_WS_MAC
+# include "VBoxUtils-darwin.h"
+#endif /* Q_WS_MAC */
+
+/* COM includes: */
+#include "CProgress.h"
 
 const char *UIProgressDialog::m_spcszOpDescTpl = "%1 ... (%2/%3)";
Index: trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIProgressDialog.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIProgressDialog.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIProgressDialog.h	(revision 41587)
@@ -20,14 +20,12 @@
 #define __UIProgressDialog_h__
 
-/* Qt includes */
+/* Qt includes: */
 #include "QIDialog.h"
 
-/* VBox forward declarations */
-class CProgress;
+/* Forward declarations: */
+class QProgressBar;
 class QILabel;
 class UIMiniCancelButton;
-
-/* Qt forward declarations */
-class QProgressBar;
+class CProgress;
 
 /**
Index: trunk/src/VBox/Frontends/VirtualBox/src/widgets/VBoxGuestRAMSlider.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/widgets/VBoxGuestRAMSlider.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/widgets/VBoxGuestRAMSlider.cpp	(revision 41587)
@@ -18,7 +18,10 @@
  */
 
-/* VBox includes */
+/* GUI includes: */
 #include "VBoxGuestRAMSlider.h"
 #include "VBoxGlobal.h"
+
+/* COM includes: */
+#include "CSystemProperties.h"
 
 VBoxGuestRAMSlider::VBoxGuestRAMSlider (QWidget *aParent /* = 0 */)
Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVD.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVD.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVD.cpp	(revision 41587)
@@ -18,8 +18,8 @@
  */
 
-/* Global includes: */
+/* Qt includes: */
 #include <QVariant>
 
-/* Local includes: */
+/* GUI includes: */
 #include "UIWizardCloneVD.h"
 #include "UIWizardCloneVDPageBasic1.h"
@@ -30,4 +30,7 @@
 #include "VBoxGlobal.h"
 #include "UIMessageCenter.h"
+
+/* COM includes: */
+#include "CMediumFormat.h"
 
 UIWizardCloneVD::UIWizardCloneVD(QWidget *pParent, const CMedium &sourceVirtualDisk)
Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVD.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVD.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVD.h	(revision 41587)
@@ -20,7 +20,10 @@
 #define __UIWizardCloneVD_h__
 
-/* Local includes: */
+/* GUI includes: */
 #include "UIWizard.h"
-#include "COMDefs.h"
+
+/* COM includes: */
+#include "COMEnums.h"
+#include "CMedium.h"
 
 /* Clone Virtual Hard Drive wizard: */
Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageBasic1.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageBasic1.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageBasic1.h	(revision 41587)
@@ -20,7 +20,10 @@
 #define __UIWizardCloneVDPageBasic1_h__
 
-/* Local includes: */
+/* GUI includes: */
 #include "UIWizardPage.h"
-#include "COMDefs.h"
+
+/* COM includes: */
+#include "COMEnums.h"
+#include "CMedium.h"
 
 /* Forward declarations: */
Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageBasic2.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageBasic2.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageBasic2.cpp	(revision 41587)
@@ -18,14 +18,17 @@
  */
 
-/* Global includes: */
+/* Qt includes: */
 #include <QVBoxLayout>
 #include <QButtonGroup>
 #include <QRadioButton>
 
-/* Local includes: */
+/* GUI includes: */
 #include "UIWizardCloneVDPageBasic2.h"
 #include "UIWizardCloneVD.h"
 #include "VBoxGlobal.h"
 #include "QIRichTextLabel.h"
+
+/* COM includes: */
+#include "CSystemProperties.h"
 
 UIWizardCloneVDPage2::UIWizardCloneVDPage2()
Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageBasic2.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageBasic2.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageBasic2.h	(revision 41587)
@@ -20,7 +20,10 @@
 #define __UIWizardCloneVDPageBasic2_h__
 
-/* Local includes: */
+/* GUI includes: */
 #include "UIWizardPage.h"
-#include "COMDefs.h"
+
+/* COM includes: */
+#include "COMEnums.h"
+#include "CMediumFormat.h"
 
 /* Forward declarations: */
Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageBasic3.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageBasic3.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageBasic3.cpp	(revision 41587)
@@ -18,5 +18,5 @@
  */
 
-/* Global includes: */
+/* Qt includes: */
 #include <QVBoxLayout>
 #include <QButtonGroup>
@@ -24,9 +24,11 @@
 #include <QCheckBox>
 
-/* Local includes: */
+/* GUI includes: */
 #include "UIWizardCloneVDPageBasic3.h"
 #include "UIWizardCloneVD.h"
-#include "COMDefs.h"
 #include "QIRichTextLabel.h"
+
+/* COM includes: */
+#include "CMediumFormat.h"
 
 UIWizardCloneVDPage3::UIWizardCloneVDPage3()
Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageBasic4.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageBasic4.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageBasic4.cpp	(revision 41587)
@@ -18,5 +18,5 @@
  */
 
-/* Global includes: */
+/* Qt includes: */
 #include <QDir>
 #include <QVBoxLayout>
@@ -24,8 +24,7 @@
 #include <QLineEdit>
 
-/* Local includes: */
+/* GUI includes: */
 #include "UIWizardCloneVDPageBasic4.h"
 #include "UIWizardCloneVD.h"
-#include "COMDefs.h"
 #include "VBoxGlobal.h"
 #include "UIMessageCenter.h"
@@ -34,4 +33,7 @@
 #include "QIRichTextLabel.h"
 #include "QIToolButton.h"
+
+/* COM includes: */
+#include "CMediumFormat.h"
 
 UIWizardCloneVDPage4::UIWizardCloneVDPage4()
Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageBasic4.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageBasic4.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageBasic4.h	(revision 41587)
@@ -20,10 +20,9 @@
 #define __UIWizardCloneVDPageBasic4_h__
 
-/* Global includes: */
+/* Qt includes: */
 #include <QVariant>
 
-/* Local includes: */
+/* GUI includes: */
 #include "UIWizardPage.h"
-#include "COMDefs.h"
 
 /* Forward declarations: */
Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageExpert.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageExpert.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPageExpert.cpp	(revision 41587)
@@ -18,5 +18,5 @@
  */
 
-/* Global includes: */
+/* Qt includes: */
 #include <QGridLayout>
 #include <QVBoxLayout>
@@ -28,5 +28,5 @@
 #include <QLineEdit>
 
-/* Local includes: */
+/* GUI includes: */
 #include "UIWizardCloneVDPageExpert.h"
 #include "UIWizardCloneVD.h"
@@ -35,4 +35,7 @@
 #include "VBoxMediaComboBox.h"
 #include "QIToolButton.h"
+
+/* COM includes: */
+#include "CSystemProperties.h"
 
 UIWizardCloneVDPageExpert::UIWizardCloneVDPageExpert(const CMedium &sourceVirtualDisk)
Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVM.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVM.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVM.h	(revision 41587)
@@ -20,7 +20,11 @@
 #define __UIWizardCloneVM_h__
 
-/* Local includes: */
+/* GUI includes: */
 #include "UIWizard.h"
-#include "COMDefs.h"
+
+/* COM includes: */
+#include "COMEnums.h"
+#include "CMachine.h"
+#include "CSnapshot.h"
 
 /* Clone VM wizard: */
Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageBasic1.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageBasic1.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageBasic1.cpp	(revision 41587)
@@ -18,13 +18,12 @@
  */
 
-/* Global includes: */
+/* Qt includes: */
 #include <QVBoxLayout>
 #include <QLineEdit>
 #include <QCheckBox>
 
-/* Local includes: */
+/* GUI includes: */
 #include "UIWizardCloneVMPageBasic1.h"
 #include "UIWizardCloneVM.h"
-#include "COMDefs.h"
 #include "QIRichTextLabel.h"
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageBasic2.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageBasic2.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageBasic2.cpp	(revision 41587)
@@ -18,13 +18,12 @@
  */
 
-/* Global includes: */
+/* Qt includes: */
 #include <QVBoxLayout>
 #include <QRadioButton>
 #include <QButtonGroup>
 
-/* Local includes: */
+/* GUI includes: */
 #include "UIWizardCloneVMPageBasic2.h"
 #include "UIWizardCloneVM.h"
-#include "COMDefs.h"
 #include "QIRichTextLabel.h"
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageBasic3.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageBasic3.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMPageBasic3.h	(revision 41587)
@@ -20,7 +20,9 @@
 #define __UIWizardCloneVMPageBasic3_h__
 
-/* Local includes: */
+/* GUI includes: */
 #include "UIWizardPage.h"
-#include "COMDefs.h"
+
+/* COM includes: */
+#include "COMEnums.h"
 
 /* Forward declaration: */
Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportApp.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportApp.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportApp.cpp	(revision 41587)
@@ -18,9 +18,9 @@
  */
 
-/* Global includes: */
+/* Qt includes: */
 #include <QVariant>
 #include <QFileInfo>
 
-/* Local includes: */
+/* GUI includes: */
 #include "UIWizardExportApp.h"
 #include "UIWizardExportAppDefs.h"
@@ -30,6 +30,9 @@
 #include "UIWizardExportAppPageBasic4.h"
 #include "UIWizardExportAppPageExpert.h"
-#include "COMDefs.h"
 #include "UIMessageCenter.h"
+
+/* COM includes: */
+#include "CAppliance.h"
+#include "CVFSExplorer.h"
 
 UIWizardExportApp::UIWizardExportApp(QWidget *pParent, const QStringList &selectedVMNames)
Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic4.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic4.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic4.cpp	(revision 41587)
@@ -18,8 +18,8 @@
  */
 
-/* Global includes: */
+/* Qt includes: */
 #include <QVBoxLayout>
 
-/* Local includes: */
+/* GUI includes: */
 #include "UIWizardExportAppPageBasic4.h"
 #include "UIWizardExportApp.h"
@@ -28,4 +28,7 @@
 #include "QILabelSeparator.h"
 #include "QIRichTextLabel.h"
+
+/* COM includes: */
+#include "CAppliance.h"
 
 UIWizardExportAppPage4::UIWizardExportAppPage4()
Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/firstrun/UIWizardFirstRun.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/firstrun/UIWizardFirstRun.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/firstrun/UIWizardFirstRun.cpp	(revision 41587)
@@ -18,9 +18,13 @@
  */
 
-/* Local includes: */
+/* GUI includes: */
 #include "UIWizardFirstRun.h"
 #include "UIWizardFirstRunPageBasic.h"
 #include "VBoxGlobal.h"
 #include "UIMessageCenter.h"
+
+/* COM includes: */
+#include "CStorageController.h"
+#include "CMediumAttachment.h"
 
 UIWizardFirstRun::UIWizardFirstRun(QWidget *pParent, const CMachine &machine)
Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/firstrun/UIWizardFirstRun.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/firstrun/UIWizardFirstRun.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/firstrun/UIWizardFirstRun.h	(revision 41587)
@@ -20,7 +20,10 @@
 #define __UIWizardFirstRun_h__
 
-/* Local includes: */
+/* GUI includes: */
 #include "UIWizard.h"
-#include "COMDefs.h"
+
+/* COM includes: */
+#include "COMEnums.h"
+#include "CMachine.h"
 
 /* First Run wizard: */
Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/firstrun/UIWizardFirstRunPageBasic.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/firstrun/UIWizardFirstRunPageBasic.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/firstrun/UIWizardFirstRunPageBasic.cpp	(revision 41587)
@@ -18,12 +18,11 @@
  */
 
-/* Global includes: */
+/* Qt includes: */
 #include <QVBoxLayout>
 #include <QHBoxLayout>
 
-/* Local includes: */
+/* GUI includes: */
 #include "UIWizardFirstRunPageBasic.h"
 #include "UIWizardFirstRun.h"
-#include "COMDefs.h"
 #include "UIIconPool.h"
 #include "VBoxGlobal.h"
Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVD.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVD.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVD.cpp	(revision 41587)
@@ -18,8 +18,8 @@
  */
 
-/* Global includes: */
+/* Qt includes: */
 #include <QVariant>
 
-/* Local includes: */
+/* GUI includes: */
 #include "UIWizardNewVD.h"
 #include "UIWizardNewVDPageBasic1.h"
@@ -29,4 +29,7 @@
 #include "VBoxGlobal.h"
 #include "UIMessageCenter.h"
+
+/* COM includes: */
+#include "CMediumFormat.h"
 
 UIWizardNewVD::UIWizardNewVD(QWidget *pParent,
Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVD.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVD.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVD.h	(revision 41587)
@@ -20,7 +20,10 @@
 #define __UIWizardNewVD_h__
 
-/* Local includes: */
+/* GUI includes: */
 #include "UIWizard.h"
-#include "COMDefs.h"
+
+/* COM includes: */
+#include "COMEnums.h"
+#include "CMedium.h"
 
 /* New Virtual Hard Drive wizard: */
Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageBasic1.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageBasic1.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageBasic1.cpp	(revision 41587)
@@ -18,14 +18,17 @@
  */
 
-/* Global includes: */
+/* Qt includes: */
 #include <QVBoxLayout>
 #include <QButtonGroup>
 #include <QRadioButton>
 
-/* Local includes: */
+/* GUI includes: */
 #include "UIWizardNewVDPageBasic1.h"
 #include "UIWizardNewVD.h"
 #include "VBoxGlobal.h"
 #include "QIRichTextLabel.h"
+
+/* COM includes: */
+#include "CSystemProperties.h"
 
 UIWizardNewVDPage1::UIWizardNewVDPage1()
Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageBasic1.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageBasic1.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageBasic1.h	(revision 41587)
@@ -20,7 +20,10 @@
 #define __UIWizardNewVDPageBasic1_h__
 
-/* Local includes: */
+/* GUI includes: */
 #include "UIWizardPage.h"
-#include "COMDefs.h"
+
+/* COM includes: */
+#include "COMEnums.h"
+#include "CMediumFormat.h"
 
 /* Forward declarations: */
Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageBasic2.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageBasic2.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageBasic2.cpp	(revision 41587)
@@ -18,5 +18,5 @@
  */
 
-/* Global includes: */
+/* Qt includes: */
 #include <QVBoxLayout>
 #include <QButtonGroup>
@@ -24,9 +24,11 @@
 #include <QCheckBox>
 
-/* Local includes: */
+/* GUI includes: */
 #include "UIWizardNewVDPageBasic2.h"
 #include "UIWizardNewVD.h"
-#include "COMDefs.h"
 #include "QIRichTextLabel.h"
+
+/* COM includes: */
+#include "CMediumFormat.h"
 
 UIWizardNewVDPage2::UIWizardNewVDPage2()
Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageBasic3.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageBasic3.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageBasic3.cpp	(revision 41587)
@@ -18,5 +18,5 @@
  */
 
-/* Global includes: */
+/* Qt includes: */
 #include <QDir>
 #include <QRegExpValidator>
@@ -28,8 +28,7 @@
 #include <QSpacerItem>
 
-/* Local includes: */
+/* GUI includes: */
 #include "UIWizardNewVDPageBasic3.h"
 #include "UIWizardNewVD.h"
-#include "COMDefs.h"
 #include "VBoxGlobal.h"
 #include "UIMessageCenter.h"
@@ -39,4 +38,8 @@
 #include "QIToolButton.h"
 #include "QILineEdit.h"
+
+/* COM includes: */
+#include "CSystemProperties.h"
+#include "CMediumFormat.h"
 
 UIWizardNewVDPage3::UIWizardNewVDPage3(const QString &strDefaultName, const QString &strDefaultPath)
Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageBasic3.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageBasic3.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageBasic3.h	(revision 41587)
@@ -20,7 +20,6 @@
 #define __UIWizardNewVDPageBasic3_h__
 
-/* Local includes: */
+/* GUI includes: */
 #include "UIWizardPage.h"
-#include "COMDefs.h"
 
 /* Forward declarations: */
Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageExpert.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageExpert.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageExpert.cpp	(revision 41587)
@@ -18,5 +18,5 @@
  */
 
-/* Global includes: */
+/* Qt includes: */
 #include <QGridLayout>
 #include <QVBoxLayout>
@@ -30,5 +30,5 @@
 #include <QLabel>
 
-/* Local includes: */
+/* GUI includes: */
 #include "UIWizardNewVDPageExpert.h"
 #include "UIWizardNewVD.h"
@@ -39,4 +39,7 @@
 #include "QIToolButton.h"
 #include "QILineEdit.h"
+
+/* COM includes: */
+#include "CSystemProperties.h"
 
 UIWizardNewVDPageExpert::UIWizardNewVDPageExpert(const QString &strDefaultName, const QString &strDefaultPath, qulonglong uDefaultSize)
Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.cpp	(revision 41587)
@@ -18,5 +18,5 @@
  */
 
-/* Local includes: */
+/* GUI includes: */
 #include "UIWizardNewVM.h"
 #include "UIWizardNewVMPageBasic1.h"
@@ -27,4 +27,10 @@
 #include "VBoxGlobal.h"
 #include "UIMessageCenter.h"
+
+/* COM includes: */
+#include "CAudioAdapter.h"
+#include "CUSBController.h"
+#include "CExtPackManager.h"
+#include "CStorageController.h"
 
 /* Using declarations: */
Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.h	(revision 41587)
@@ -20,7 +20,10 @@
 #define __UIWizardNewVM_h__
 
-/* Local includes: */
+/* GUI includes: */
 #include "UIWizard.h"
-#include "COMDefs.h"
+
+/* COM includes: */
+#include "COMEnums.h"
+#include "CMachine.h"
 
 /* New Virtual Machine wizard: */
Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic1.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic1.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic1.cpp	(revision 41587)
@@ -18,5 +18,5 @@
  */
 
-/* Global includes: */
+/* Qt includes: */
 #include <QDir>
 #include <QVBoxLayout>
@@ -24,5 +24,5 @@
 #include <QLineEdit>
 
-/* Local includes: */
+/* GUI includes: */
 #include "UIWizardNewVMPageBasic1.h"
 #include "UIWizardNewVM.h"
@@ -30,4 +30,7 @@
 #include "UINameAndSystemEditor.h"
 #include "QIRichTextLabel.h"
+
+/* COM includes: */
+#include "CSystemProperties.h"
 
 /* Defines some patterns to guess the right OS type. Should be in sync with
Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic2.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic2.cpp	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic2.cpp	(revision 41587)
@@ -18,5 +18,5 @@
  */
 
-/* Global includes: */
+/* Qt includes: */
 #include <QIntValidator>
 #include <QVBoxLayout>
@@ -25,8 +25,7 @@
 #include <QLabel>
 
-/* Local includes: */
+/* GUI includes: */
 #include "UIWizardNewVMPageBasic2.h"
 #include "UIWizardNewVM.h"
-#include "COMDefs.h"
 #include "VBoxGlobal.h"
 #include "VBoxGuestRAMSlider.h"
Index: trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic3.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic3.h	(revision 41527)
+++ trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic3.h	(revision 41587)
@@ -20,10 +20,13 @@
 #define __UIWizardNewVMPageBasic3_h__
 
-/* Global includes: */
+/* Qt includes: */
 #include <QVariant>
 
-/* Local includes: */
+/* GUI includes: */
 #include "UIWizardPage.h"
-#include "COMDefs.h"
+
+/* COM includes: */
+#include "COMEnums.h"
+#include "CMedium.h"
 
 /* Forward declarations: */
