Mercurial > trustbridge
view ui/textoverlaybutton.cpp @ 729:efc2d16ab514
Remove (more) data files and directories.
author | Sascha Wilde <wilde@intevation.de> |
---|---|
date | Thu, 03 Jul 2014 11:01:33 +0200 |
parents | b0929968562a |
children | 0bb54205c55a |
line wrap: on
line source
/* Copyright (C) 2014 by Bundesamt für Sicherheit in der Informationstechnik * Software engineering by Intevation GmbH * * This file is Free Software under the GNU GPL (v>=2) * and comes with ABSOLUTELY NO WARRANTY! * See LICENSE.txt for details. */ #include <QPaintEvent> #include <QPainter> #include <QFont> #include <QApplication> #include <QDebug> #include "textoverlaybutton.h" void TextOverlayButton::paintEvent(QPaintEvent *e) { QToolButton::paintEvent(e); QPainter painter(this); QFont font; QRect myRect = e->rect().translated(0, 10); //font.setFamily("Comic Sans MS"); font.setPixelSize(14); font.setWeight(QFont::DemiBold); painter.setFont(font); //painter.setPen(Qt::white); //painter.drawText(myRect.translated(1,1), Qt::AlignCenter, "20"); painter.setPen(qApp->palette().color(QPalette::ButtonText)); painter.drawText(myRect, Qt::AlignCenter | Qt::AlignVCenter, mOverlay); return; }