VBoxDbgGui.cpp revision 9c6395ed47514689cd7deaf5e61c979ef856459a
/* $Id$ */
/** @file
* VBox Debugger GUI - The Manager.
*/
/*
* Copyright (C) 2006-2010 Oracle Corporation
*
* 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.
*/
/*******************************************************************************
* Header Files *
*******************************************************************************/
#define LOG_GROUP LOG_GROUP_DBGG
#define VBOX_COM_NO_ATL
#include "VBoxDbgGui.h"
#include <QDesktopWidget>
#include <QApplication>
VBoxDbgGui::VBoxDbgGui() :
{
}
{
/*
* Set the VM handle and update the desktop size.
*/
return VINF_SUCCESS;
}
{
int rc = VERR_GENERAL_FAILURE;
/*
* Query the VirtualBox interfaces.
*/
m_pSession->AddRef();
{
{
{
/*
* Get the VM handle.
*/
{
if (RT_SUCCESS(rc))
return rc;
}
/* damn, failure! */
}
m_pConsole->Release();
m_pConsole = NULL;
}
m_pMachine->Release();
m_pMachine = NULL;
}
return rc;
}
VBoxDbgGui::~VBoxDbgGui()
{
if (m_pDbgStats)
{
delete m_pDbgStats;
m_pDbgStats = NULL;
}
if (m_pDbgConsole)
{
delete m_pDbgConsole;
}
if (m_pMachineDebugger)
{
}
if (m_pConsole)
{
m_pConsole->Release();
m_pConsole = NULL;
}
if (m_pMachine)
{
m_pMachine->Release();
m_pMachine = NULL;
}
if (m_pSession)
{
m_pSession->Release();
m_pSession = NULL;
}
}
void
{
}
void
{
}
int
{
if (!m_pDbgStats)
{
}
m_pDbgStats->vShow();
return VINF_SUCCESS;
}
void
{
/*
* Move it to the right side of the VBox console,
* and resize it to cover all the space to the left side of the desktop.
*/
if (m_pDbgStats)
fResize);
}
int
{
if (!m_pDbgConsole)
{
}
m_pDbgConsole->vShow();
return VINF_SUCCESS;
}
void
{
/*
* Move it to the bottom of the VBox console,
* and resize it to cover the space down to the bottom of the desktop.
*/
if (m_pDbgConsole)
fResize);
}
void
{
if (pDesktop)
m_xDesktop = Rct.x();
m_yDesktop = Rct.y();
}
void
{
/* Disregard a width less than 640 since it will mess up the console. */
if (cx < 640)
m_x = x;
m_y = y;
if (fMoved)
}
void
{
if (m_pDbgStats == pObj)
m_pDbgStats = NULL;
else if (m_pDbgConsole == pObj)
}