KKBSwitch – keyboard layout indicator
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

boldlistboxitem.cpp 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /***************************************************************************
  2. boldlistboxitem.cpp - description
  3. -------------------
  4. begin : ??? ??? 12 2003
  5. copyright : (C) 2003 by Leonid Zeitlin
  6. email : lz@europe.com
  7. ***************************************************************************/
  8. /***************************************************************************
  9. * *
  10. * This program is free software; you can redistribute it and/or modify *
  11. * it under the terms of the GNU General Public License as published by *
  12. * the Free Software Foundation; either version 2 of the License, or *
  13. * (at your option) any later version. *
  14. * *
  15. ***************************************************************************/
  16. #include "boldlistboxitem.h"
  17. #include <ntqpainter.h>
  18. BoldListBoxItem::BoldListBoxItem(TQListBox *listbox, const TQPixmap &pix,
  19. const TQString &text, bool bold)
  20. : TQListBoxPixmap(listbox, pix, text), m_bold(bold)
  21. {
  22. }
  23. BoldListBoxItem::~BoldListBoxItem()
  24. {
  25. }
  26. void BoldListBoxItem::paint(TQPainter *painter)
  27. {
  28. if (m_bold) {
  29. TQFont font = painter->font();
  30. font.setBold(true);
  31. painter->setFont(font);
  32. }
  33. TQListBoxPixmap::paint(painter);
  34. }