VBoxToolBar.h revision b9042bb7a5efd07d617a8a7d812b669d75682779
/** @file
*
* VBox frontends: Qt GUI ("VirtualBox"):
* VBoxToolBar class declaration & implementation
*/
/*
* Copyright (C) 2006 InnoTek Systemberatung GmbH
*
* 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 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.
*
* If you received this file as part of a commercial VirtualBox
* distribution, then only the terms of your commercial VirtualBox
* license agreement apply instead of the previous paragraph.
*/
#ifndef __VBoxToolBar_h__
#define __VBoxToolBar_h__
#include <qtoolbar.h>
#include <qtoolbutton.h>
#include <qmainwindow.h>
#include <qobjectlist.h>
/**
* The VBoxToolBar class is a simple QToolBar reimplementation to disable
* its built-in context menu and add some default behavior we need.
*/
{
{
setResizeEnabled (false);
setMovingEnabled (false);
};
/** Reimplements and does nothing to disable the context menu */
void contextMenuEvent (QContextMenuEvent *) {};
/**
* Substitutes for QMainWindow::setUsesBigPixmaps() when QMainWindow is
* not used (otherwise just redirects the call to #mainWindow()).
*/
void setUsesBigPixmaps (bool enable)
{
if (mainWindow())
else
{
{
++ it;
}
}
}
void setUsesTextLabel (bool enable)
{
if (mainWindow())
else
{
{
++ it;
}
}
}
};
#endif // __VBoxToolBar_h__