AbstractDockIconPreview.cpp revision e64031e20c39650a7bc902a3e1aba613b9415dee
/* $Id$ */
/** @file
* Qt GUI - Realtime Dock Icon Preview
*/
/*
* Copyright (C) 2009 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.
*/
/* VBox includes */
#include "AbstractDockIconPreview.h"
#include "VBoxConsoleWnd.h"
#include "VBoxFrameBuffer.h"
AbstractDockIconPreview::AbstractDockIconPreview (VBoxConsoleWnd * /* aMainWnd */, const QPixmap& /* aOverlayImage */)
{
}
{
/* Create the image copy of the framebuffer */
CGDataProviderRef dp = CGDataProviderCreateWithData (aFrameBuffer, aFrameBuffer->address(), aFrameBuffer->bitsPerPixel() / 8 * aFrameBuffer->width() * aFrameBuffer->height(), NULL);
CGImageRef ir = CGImageCreate (aFrameBuffer->width(), aFrameBuffer->height(), 8, 32, aFrameBuffer->bytesPerLine(), cs,
/* Update the dock preview icon */
/* Release the temp data and image */
CGImageRelease (ir);
}
AbstractDockIconPreviewHelper::AbstractDockIconPreviewHelper (VBoxConsoleWnd *aMainWnd, const QPixmap& aOverlayImage)
, mDockMonitor (NULL)
, mUpdateRect (CGRectMake (0, 0, 0, 0))
, mMonitorRect (CGRectMake (0, 0, 0, 0))
{
}
{
if (mDockMonitor)
if (mDockMonitorGlossy)
}
{
if (!mDockMonitor)
{
/* Center it on the dock icon context */
}
if (!mDockMonitorGlossy)
{
/* This depends on the content of monitor.png */
118 - 7 - 2,
103 - 8 - 2);
}
}
{
img = mStatePaused;
img = mStateSaving;
else
return img;
}
{
if (mOverlayImage)
{
}
if (sImage)
{
}
}