summaryrefslogtreecommitdiffstats
path: root/kkbswitch/boldlistboxitem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kkbswitch/boldlistboxitem.cpp')
-rw-r--r--kkbswitch/boldlistboxitem.cpp39
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);
+}