VBoxDbgBase.cpp revision a33af978add1a03aab11b2895f441af5cb2a11a6
/* $Id$ */
/** @file
* VBox Debugger GUI - Base classes.
*/
/*
* Copyright (C) 2006-2007 Oracle Corporation
*
* Oracle Corporation confidential
* All rights reserved
*/
/*******************************************************************************
* Header Files *
*******************************************************************************/
#define LOG_GROUP LOG_GROUP_DBGG
#include <limits.h>
#include "VBoxDbgBase.h"
#include "VBoxDbgGui.h"
#include <QApplication>
#include <QWidgetList>
{
/*
* Register
*/
if (pVM)
{
}
}
{
/*
* If the VM is still around.
*/
/** @todo need to do some locking here? */
if (pVM)
{
}
}
int
{
if ( pVM
return VERR_INVALID_HANDLE;
}
int
{
if ( pVM
return VERR_INVALID_HANDLE;
}
int
{
if ( pVM
return VERR_INVALID_HANDLE;
}
/*static*/ DECLCALLBACK(void)
{
switch (enmState)
{
case VMSTATE_TERMINATED:
/** @todo need to do some locking here? */
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;
#ifdef Q_WS_X11
m_fPolished(false),
#else
m_fPolished(true),
#endif
{
}
{
}
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 */
}