summaryrefslogtreecommitdiffstats
path: root/src/gui/listboxtext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/listboxtext.cpp')
-rw-r--r--src/gui/listboxtext.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/gui/listboxtext.cpp b/src/gui/listboxtext.cpp
index 8ec6fa2..0d33a7c 100644
--- a/src/gui/listboxtext.cpp
+++ b/src/gui/listboxtext.cpp
@@ -14,34 +14,34 @@
#include "listboxtext.h"
#include "../tellico_utils.h"
-#include <qpainter.h>
+#include <tqpainter.h>
using Tellico::GUI::ListBoxText;
-ListBoxText::ListBoxText(QListBox* listbox_, const QString& text_)
- : QListBoxText(listbox_, text_), m_colored(false) {
+ListBoxText::ListBoxText(TQListBox* listbox_, const TQString& text_)
+ : TQListBoxText(listbox_, text_), m_colored(false) {
}
-ListBoxText::ListBoxText(QListBox* listbox_, const QString& text_, QListBoxItem* after_)
- : QListBoxText(listbox_, text_, after_), m_colored(false) {
+ListBoxText::ListBoxText(TQListBox* listbox_, const TQString& text_, TQListBoxItem* after_)
+ : TQListBoxText(listbox_, text_, after_), m_colored(false) {
}
-int ListBoxText::width(const QListBox* listbox_) const {
+int ListBoxText::width(const TQListBox* listbox_) const {
if(m_colored) {
- QFont font = listbox_->font();
+ TQFont font = listbox_->font();
font.setBold(true);
font.setItalic(true);
- QFontMetrics fm(font);
+ TQFontMetrics fm(font);
return fm.width(text()) + 6;
} else {
- return QListBoxText::width(listbox_);
+ return TQListBoxText::width(listbox_);
}
}
// I don't want the height to change when colored
// so all the items are at the same level for multi-column boxes
-int ListBoxText::height(const QListBox* listbox_) const {
- return QListBoxText::height(listbox_);
+int ListBoxText::height(const TQListBox* listbox_) const {
+ return TQListBoxText::height(listbox_);
}
void ListBoxText::setColored(bool colored_) {
@@ -51,15 +51,15 @@ void ListBoxText::setColored(bool colored_) {
}
}
-void ListBoxText::setText(const QString& text_) {
- QListBoxText::setText(text_);
+void ListBoxText::setText(const TQString& text_) {
+ TQListBoxText::setText(text_);
listBox()->triggerUpdate(true);
}
-// mostly copied from QListBoxText::paint() in Qt 3.1.1
-void ListBoxText::paint(QPainter* painter_) {
+// mostly copied from TQListBoxText::paint() in TQt 3.1.1
+void ListBoxText::paint(TQPainter* painter_) {
if(m_colored) {
- QFont font = painter_->font();
+ TQFont font = painter_->font();
font.setBold(true);
font.setItalic(true);
painter_->setFont(font);
@@ -68,7 +68,7 @@ void ListBoxText::paint(QPainter* painter_) {
}
}
int itemHeight = height(listBox());
- QFontMetrics fm = painter_->fontMetrics();
+ TQFontMetrics fm = painter_->fontMetrics();
int yPos = ((itemHeight - fm.height()) / 2) + fm.ascent();
painter_->drawText(3, yPos, text());
}