2014-12-18 01:30:50 +00:00
|
|
|
/*
|
2015-06-10 21:27:11 +00:00
|
|
|
* This file Copyright (C) 2009-2015 Mnemosyne LLC
|
2014-12-18 01:30:50 +00:00
|
|
|
*
|
2014-12-21 23:49:39 +00:00
|
|
|
* It may be used under the GNU GPL versions 2 or 3
|
2014-12-18 01:30:50 +00:00
|
|
|
* or any future license endorsed by Mnemosyne LLC.
|
|
|
|
*
|
|
|
|
* $Id$
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <QStyleOption>
|
|
|
|
#include <QStyleOptionToolButton>
|
|
|
|
#include <QStylePainter>
|
|
|
|
|
2015-06-10 21:27:11 +00:00
|
|
|
#include "IconToolButton.h"
|
2014-12-18 01:30:50 +00:00
|
|
|
|
2015-06-10 21:27:11 +00:00
|
|
|
IconToolButton::IconToolButton (QWidget * parent):
|
2014-12-18 01:30:50 +00:00
|
|
|
QToolButton (parent)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2015-06-10 21:27:11 +00:00
|
|
|
void IconToolButton::paintEvent (QPaintEvent * /*event*/)
|
2014-12-18 01:30:50 +00:00
|
|
|
{
|
|
|
|
QStylePainter painter(this);
|
|
|
|
QStyleOptionToolButton option;
|
|
|
|
initStyleOption (&option);
|
|
|
|
option.features &= ~QStyleOptionToolButton::HasMenu;
|
|
|
|
painter.drawComplexControl(QStyle::CC_ToolButton, option);
|
|
|
|
}
|