VBoxDbgBase.cpp revision 98427c0ab08697e468c26dc33ee9571308577867
/* $Id$ */
/** @file
* VBox Debugger GUI - Base classes.
*/
/*
* 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
#include <limits.h>
#include "VBoxDbgBase.h"
#include "VBoxDbgGui.h"
#include <QApplication>
#include <QWidgetList>
{
/*
* Register
*/
if (m_pUVM)
{
}
}
{
/*
* If the VM is still around.
*/
/** @todo need to do some locking here? */
if (pUVM)
{
}
}
int
{
if ( pUVM
return VERR_INVALID_HANDLE;
}
int
{
if ( pUVM
return VERR_INVALID_HANDLE;
}
int
{
if ( pUVM
return VERR_INVALID_HANDLE;
}
/*static*/ DECLCALLBACK(void)
{
switch (enmState)
{
case VMSTATE_TERMINATED:
{
/** @todo need to do some locking here? */
if (pUVM2)
{
pThis->sigTerminated();
}
break;
}
case VMSTATE_DESTROYING:
pThis->sigDestroying();
break;
default:
break;
}
}
void
{
}
void
{
}
//
//
//
// V B o x D b g B a s e W i n d o w
// V B o x D b g B a s e W i n d o w
// V B o x D b g B a s e W i n d o w
//
//
//
unsigned VBoxDbgBaseWindow::m_cxBorder = 0;
unsigned VBoxDbgBaseWindow::m_cyBorder = 0;
{
}
{
}
void
{
show();
/** @todo this ain't working right. HELP! */
//activateWindow();
//setFocus();
}
void
{
if (a_fResize)
{
if (BorderSize == QSize(0,0))
}
}
bool
{
return fRc;
}
void
{
/* Ignore if already done or no size set. */
if ( m_fPolished
return;
if (BorderSize != QSize(0,0))
m_fPolished = true;
}
{
#ifdef Q_WS_X11 /* (from the qt gui) */
/* only once. */
if (!m_cxBorder && !m_cyBorder)
{
/* On X11, there is no way to determine frame geometry (including WM
* decorations) before the widget is shown for the first time. Stupidly
* enumerate other top level widgets to find the thickest frame. The code
* is based on the idea taken from QDialog::adjustPositionInternal(). */
{
continue;
}
{
m_cxBorder = extraw;
m_cyBorder = extrah;
}
}
#endif /* X11 */
}