VBoxDbgGui.cpp revision 489ff469f658c1a9e95ec8c62fec535c9ca6c6a7
/* $Id$ */
/** @file
* VBox Debugger GUI - The Manager.
*/
/*
* 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.
*/
#define VBOX_COM_NO_ATL
#include "VBoxDbgGui.h"
#include <qdesktopwidget.h>
#include <qapplication.h>
VBoxDbgGui::VBoxDbgGui() :
{
}
{
/*
* Update the desktop size first.
*/
/*
* Query the Virtual Box interfaces.
*/
m_pSession->AddRef();
{
{
{
/*
* Get the VM handle.
*/
{
return VINF_SUCCESS;
}
/* damn, failure! */
}
m_pConsole->Release();
}
m_pMachine->Release();
}
return VERR_GENERAL_FAILURE;
}
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;
}
}
int VBoxDbgGui::showStatistics()
{
if (!m_pDbgStats)
{
}
m_pDbgStats->show();
return VINF_SUCCESS;
}
{
if (m_pDbgStats)
{
/* Move it to the right side of the VBox console. */
if (fResize)
/* Resize it to cover all the space to the left side of the desktop. */
}
}
int VBoxDbgGui::showConsole()
{
if (!m_pDbgConsole)
{
}
m_pDbgConsole->show();
return VINF_SUCCESS;
}
{
if (m_pDbgConsole)
{
/* Move it to the bottom of the VBox console. */
if (fResize)
/* Resize it to cover the space down to the bottom of the desktop. */
}
}
void VBoxDbgGui::updateDesktopSize()
{
if (pDesktop)
m_xDesktop = Rct.x();
m_yDesktop = Rct.y();
}
{
m_x = x;
m_y = y;
if (fMoved)
}
{
}
{
if (m_pDbgStats == pObj)
m_pDbgStats = NULL;
else if (m_pDbgConsole == pObj)
}