VBoxConsoleWnd.h revision 206a1d9a998500b64d56e6560344bdd4c234bba6
/** @file
*
* VBox frontends: Qt GUI ("VirtualBox"):
* VBoxConsoleWnd class declaration
*/
/*
* Copyright (C) 2006-2007 Sun Microsystems, Inc.
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* 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.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
* Clara, CA 95054 USA or visit http://www.sun.com if you need
* additional information or have any questions.
*/
#ifndef __VBoxConsoleWnd_h__
#define __VBoxConsoleWnd_h__
#include "COMDefs.h"
#include "QIWithRetranslateUI.h"
#include "VBoxProblemReporter.h"
#include "VBoxHelpActions.h"
/* Qt includes */
#include <QMainWindow>
#include <QMap>
#include <QColor>
#include <QDialog>
#include <QMenu>
#ifdef VBOX_WITH_DEBUGGER_GUI
#endif
#ifdef Q_WS_MAC
# include <ApplicationServices/ApplicationServices.h>
#endif
/* We want to make the first action highlighted but not
* selected, but Qt makes the both or neither one of this,
* so, just move the focus to the next eligible object,
* which will be the first menu action. This little
* subclass made only for that purpose. */
{
};
{
void refreshView();
bool isWindowMaximized() const
{
#ifdef Q_WS_MAC
/* On Mac OS X we didn't really jump to the fullscreen mode but
* maximize the window. This situation has to be considered when
* checking for maximized or fullscreen mode. */
#else /* Q_WS_MAC */
return QMainWindow::isMaximized();
#endif /* Q_WS_MAC */
}
bool isWindowFullScreen() const
{
#ifdef Q_WS_MAC
/* On Mac OS X we didn't really jump to the fullscreen mode but
* maximize the window. This situation has to be considered when
* checking for maximized or fullscreen mode. */
return isTrueFullscreen() || isTrueSeamless();
#else /* Q_WS_MAC */
return QMainWindow::isFullScreen();
#endif /* Q_WS_MAC */
}
bool isTrueFullscreen() const { return mIsFullscreen; }
bool isTrueSeamless() const { return mIsSeamless; }
void setMouseIntegrationLocked (bool aDisabled);
void popupMainMenu (bool aCenter);
void clearMask();
void changeDockIconUpdate (const VBoxChangeDockIconUpdateEvent &e);
void closing();
// events
void closeEvent (QCloseEvent *e);
#if defined(Q_WS_X11)
#endif
void retranslateUi();
#ifdef VBOX_WITH_DEBUGGER_GUI
bool dbgCreated();
void dbgDestroy();
void dbgAdjustRelativePos();
#endif
void closeView();
enum /* Stuff */
{
FloppyStuff = 0x01,
DVDStuff = 0x02,
HardDiskStuff = 0x04,
PauseAction = 0x08,
NetworkStuff = 0x10,
DisableMouseIntegrAction = 0x20,
Caption = 0x40,
USBStuff = 0x80,
VRDPStuff = 0x100,
SharedFolderStuff = 0x200,
VirtualizationStuff = 0x400,
AllStuff = 0xFFFF,
};
void updateAppearanceOf (int element);
bool toggleFullscreenMode (bool, bool);
void checkRequiredFeatures();
void finalizeOpenView();
void activateUICustomizations();
void vmFullscreen (bool on);
void vmSeamless (bool on);
void vmAutoresizeGuest (bool on);
void vmAdjustWindow();
void vmTypeCAD();
void vmTypeCABS();
void vmReset();
void vmPause(bool);
void vmACPIShutdown();
void vmClose();
void vmTakeSnapshot();
void vmShowInfoDialog();
void vmDisableMouseIntegr (bool);
void devicesMountFloppyImage();
void devicesUnmountFloppy();
void devicesMountDVDImage();
void devicesUnmountDVD();
void devicesSwitchVrdp (bool);
void devicesOpenSFDialog();
void devicesInstallGuestAdditions();
void prepareFloppyMenu();
void prepareDVDMenu();
void prepareNetworkMenu();
void statusTipChanged (const QString &);
void clearStatusBar();
void updateDeviceLights();
void updateMouseState (int state);
void updateAdditionsState (const QString&, bool, bool, bool);
void updateNetworkAdarptersState();
void updateUsbState();
void updateSharedFoldersState();
void tryClose();
void dbgPrepareDebugMenu();
void dbgShowStatistics();
void dbgShowCommandLine();
void dbgLoggingToggled(bool aBool);
void onExitFullscreen();
void unlockActionsSwitch();
void mtExitMode();
void mtCloseVM();
/** Popup version of the main menu */
/* Machine actions */
#if defined(Q_WS_X11)
#endif
/* Devices actions */
#ifdef VBOX_WITH_DEBUGGER_GUI
/* Debugger actions */
#endif
/* Help actions */
/* Machine popup menus */
/* Devices popup menus */
bool mWaitForStatusBarChange : 1;
bool mStatusBarChangedInside : 1;
/* see showIndicatorContextMenu for a description of mDevicesSFMenu */
/* QMenu *mDevicesSFMenu; */
/* VBoxSwitchMenu *mDevicesVRDPMenu; */
#ifdef VBOX_WITH_DEBUGGER_GUI
// Debugger popup menu
#endif
// widgets
bool no_auto_close : 1;
#ifdef Q_WS_WIN
#endif
#ifdef Q_WS_MAC
# ifndef QT_MAC_USE_COCOA
# endif
#endif
// variables for dealing with true fullscreen
bool mIsFullscreen : 1;
bool mIsSeamless : 1;
bool mIsSeamlessSupported : 1;
bool mIsGraphicsSupported : 1;
bool mIsWaitingModeResize : 1;
bool was_max : 1;
int console_style;
bool mIsOpenViewFinished : 1;
bool mIsFirstTimeStarted : 1;
bool mIsAutoSaveMedia : 1;
#ifdef VBOX_WITH_DEBUGGER_GUI
/** The handle to the debugger gui. */
/** The virtual method table for the debugger GUI. */
#endif
#ifdef Q_WS_MAC
/* For seamless maximizing */
/* For the fade effect if the the window goes fullscreen */
#endif
};
{
void retranslateUi();
void showEvent (QShowEvent*);
};
#endif // __VBoxConsoleWnd_h__