diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:46:43 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:46:43 +0000 |
commit | ffe8a83e053396df448e9413828527613ca3bd46 (patch) | |
tree | a73d4169e02df4a50f9a12cb165fcd0ab5bac7c6 /kdeprint/treecombobox.cpp | |
parent | 682bf3bfdcbcbb1fca85e8a36ed03e062e0555d5 (diff) | |
download | tdelibs-ffe8a83e053396df448e9413828527613ca3bd46.tar.gz tdelibs-ffe8a83e053396df448e9413828527613ca3bd46.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1157647 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdeprint/treecombobox.cpp')
-rw-r--r-- | kdeprint/treecombobox.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/kdeprint/treecombobox.cpp b/kdeprint/treecombobox.cpp index e131d8c3c..1e4f1b694 100644 --- a/kdeprint/treecombobox.cpp +++ b/kdeprint/treecombobox.cpp @@ -19,15 +19,15 @@ #include "treecombobox.h" -#include <qpainter.h> +#include <tqpainter.h> -TreeListBoxItem::TreeListBoxItem(QListBox *lb, const QPixmap& pix, const QString& txt, bool oneBlock) - : QListBoxPixmap(pix, txt) +TreeListBoxItem::TreeListBoxItem(TQListBox *lb, const TQPixmap& pix, const TQString& txt, bool oneBlock) + : TQListBoxPixmap(pix, txt) { if (oneBlock) - m_path = QStringList(txt); + m_path = TQStringList(txt); else - m_path = QStringList::split('/', text(), false); + m_path = TQStringList::split('/', text(), false); m_depth = m_path.count()-1; m_child = m_next = m_parent = 0; @@ -48,7 +48,7 @@ TreeListBoxItem::TreeListBoxItem(QListBox *lb, const QPixmap& pix, const QString if (!parentItem) { // parent not found, add parent first into QListBox - parentItem = new TreeListBoxItem(lb, QPixmap(), parentStr); + parentItem = new TreeListBoxItem(lb, TQPixmap(), parentStr); } // search last "child" of the parent item, to put the new one // at the end @@ -75,21 +75,21 @@ TreeListBoxItem::TreeListBoxItem(QListBox *lb, const QPixmap& pix, const QString } } -int TreeListBoxItem::width(const QListBox *lb) const +int TreeListBoxItem::width(const TQListBox *lb) const { int w = m_depth * stepSize() + 2; if (pixmap()) w += (pixmap()->width() + 2); if (!m_path[m_depth].isEmpty()) w += (lb->fontMetrics().width(m_path[m_depth]) + 2); - return QMAX(w, QListBoxPixmap::width(lb)); + return QMAX(w, TQListBoxPixmap::width(lb)); } -void TreeListBoxItem::paint(QPainter *p) +void TreeListBoxItem::paint(TQPainter *p) { if(!static_cast<TreeListBox*>(listBox())->m_painting) { - QListBoxPixmap::paint(p); + TQListBoxPixmap::paint(p); return; } @@ -128,29 +128,29 @@ void TreeListBoxItem::paint(QPainter *p) //----------------------------------------------------------------------------------------- -TreeListBox::TreeListBox(QWidget *parent, const char *name) - : QListBox(parent, name) +TreeListBox::TreeListBox(TQWidget *parent, const char *name) + : TQListBox(parent, name) { m_painting = false; } -void TreeListBox::paintCell(QPainter *p, int row, int col) +void TreeListBox::paintCell(TQPainter *p, int row, int col) { m_painting = true; - QListBox::paintCell(p, row, col); + TQListBox::paintCell(p, row, col); m_painting = false; } //----------------------------------------------------------------------------------------- -TreeComboBox::TreeComboBox(QWidget *parent, const char *name) - : QComboBox(parent, name) +TreeComboBox::TreeComboBox(TQWidget *parent, const char *name) + : TQComboBox(parent, name) { m_listbox = new TreeListBox(this); setListBox(m_listbox); } -void TreeComboBox::insertItem(const QPixmap& pix, const QString& txt, bool oneBlock) +void TreeComboBox::insertItem(const TQPixmap& pix, const TQString& txt, bool oneBlock) { new TreeListBoxItem(m_listbox, pix, txt, oneBlock); } |