diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2013-08-18 15:43:45 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2013-08-18 15:43:45 +0200 |
commit | ae0c828ac29043e7adc56a78fc18d816b32c12b4 (patch) | |
tree | 51cc9b30f40faa951fc029f72c5f5b5e573e863d /kkbswitch/boldlistboxitem.cpp | |
download | kkbswitch-ae0c828ac29043e7adc56a78fc18d816b32c12b4.tar.gz kkbswitch-ae0c828ac29043e7adc56a78fc18d816b32c12b4.zip |
Initial import of kkbswitch 1.4.3
Diffstat (limited to 'kkbswitch/boldlistboxitem.cpp')
-rw-r--r-- | kkbswitch/boldlistboxitem.cpp | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/kkbswitch/boldlistboxitem.cpp b/kkbswitch/boldlistboxitem.cpp new file mode 100644 index 0000000..a136f0c --- /dev/null +++ b/kkbswitch/boldlistboxitem.cpp @@ -0,0 +1,39 @@ +/*************************************************************************** + boldlistboxitem.cpp - description + ------------------- + begin : ??? ??? 12 2003 + copyright : (C) 2003 by Leonid Zeitlin + email : lz@europe.com + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include "boldlistboxitem.h" +#include <qpainter.h> + +BoldListBoxItem::BoldListBoxItem(QListBox *listbox, const QPixmap &pix, + const QString &text, bool bold) + : QListBoxPixmap(listbox, pix, text), m_bold(bold) +{ +} + +BoldListBoxItem::~BoldListBoxItem() +{ +} + +void BoldListBoxItem::paint(QPainter *painter) +{ + if (m_bold) { + QFont font = painter->font(); + font.setBold(true); + painter->setFont(font); + } + QListBoxPixmap::paint(painter); +} |