summaryrefslogtreecommitdiffstats
path: root/lib/widgets/fancylistviewitem.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
commitd6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch)
treed109539636691d7b03036ca1c0ed29dbae6577cf /lib/widgets/fancylistviewitem.h
parent3331a47a9cad24795c7440ee8107143ce444ef34 (diff)
downloadtdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.tar.gz
tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'lib/widgets/fancylistviewitem.h')
-rw-r--r--lib/widgets/fancylistviewitem.h56
1 files changed, 28 insertions, 28 deletions
diff --git a/lib/widgets/fancylistviewitem.h b/lib/widgets/fancylistviewitem.h
index 55ac11e4..ab8b3310 100644
--- a/lib/widgets/fancylistviewitem.h
+++ b/lib/widgets/fancylistviewitem.h
@@ -20,21 +20,21 @@
#ifndef FANCYLISTVIEWITEM
#define FANCYLISTVIEWITEM
-#include <qvaluevector.h>
-#include <qpainter.h>
-#include <qfont.h>
-#include <qlistview.h>
+#include <tqvaluevector.h>
+#include <tqpainter.h>
+#include <tqfont.h>
+#include <tqlistview.h>
#include <klistview.h>
class TextPaintStyleStore {
public:
class Item {
public:
- QFont font;
- QColor color;
- QColor background;
+ TQFont font;
+ TQColor color;
+ TQColor background;
- Item(const QFont& f = QFont(), const QColor& c = QColor(), const QColor b = QColor() ) : font(f), color(c), background(b) {
+ Item(const TQFont& f = TQFont(), const TQColor& c = TQColor(), const TQColor b = TQColor() ) : font(f), color(c), background(b) {
}
bool bgValid() {
@@ -46,9 +46,9 @@ class TextPaintStyleStore {
}
};
- typedef QMap<int, Item> Store ;
+ typedef TQMap<int, Item> Store ;
- TextPaintStyleStore( QFont defaultFont=QFont() ) {
+ TextPaintStyleStore( TQFont defaultFont=TQFont() ) {
m_styles.insert( 0, Item( defaultFont ) );
}
@@ -62,7 +62,7 @@ class TextPaintStyleStore {
m_styles[num] = style;
}
- void addStyle( int num, const QFont& font ) {
+ void addStyle( int num, const TQFont& font ) {
m_styles[num] = Item( font );
}
@@ -78,24 +78,24 @@ class TextPaintStyleStore {
class TextPaintItem {
public:
struct Item {
- QString text;
+ TQString text;
int style;
- Item( const QString& t = "", int st = 0 ) : text(t), style(st) {
+ Item( const TQString& t = "", int st = 0 ) : text(t), style(st) {
}
};
- typedef QValueList<Item> Chain;
+ typedef TQValueList<Item> Chain;
Chain& items() {
return m_chain;
}
- TextPaintItem(const QString& text="") {
+ TextPaintItem(const TQString& text="") {
addItem( text );
}
- Item& addItem(const QString& item, int style = 0) {
+ Item& addItem(const TQString& item, int style = 0) {
m_chain.append( Item(item, style) );
return m_chain.back();
}
@@ -104,8 +104,8 @@ class TextPaintItem {
m_chain.clear();
}
- operator QString () const {
- QString ret;
+ operator TQString () const {
+ TQString ret;
Chain::const_iterator it = m_chain.begin();
while(it != m_chain.end()) {
ret += (*it).text;
@@ -124,18 +124,18 @@ class TextPaintItem {
class FancyListViewItem : public KListViewItem
{
public:
- FancyListViewItem(TextPaintStyleStore& styles, QListView *parent, const QString &label1, const QString &label2="") : KListViewItem(parent, label1, label2), m_styles(styles) {
+ FancyListViewItem(TextPaintStyleStore& styles, TQListView *parent, const TQString &label1, const TQString &label2="") : KListViewItem(parent, label1, label2), m_styles(styles) {
init(label1, label2);
}
- FancyListViewItem(TextPaintStyleStore& styles, QListViewItem *parent, const QString &label1, const QString &label2="") : KListViewItem(parent, label1, label2), m_styles(styles) {
+ FancyListViewItem(TextPaintStyleStore& styles, TQListViewItem *parent, const TQString &label1, const TQString &label2="") : KListViewItem(parent, label1, label2), m_styles(styles) {
init(label1, label2);
}
- virtual void paintCell(QPainter *painter, const QColorGroup &cg, int column, int width, int align);
- virtual int width(const QFontMetrics &fm, const QListView *lv, int column);
- virtual void setText ( int column, const QString & text );
- virtual QString text(int column) const;
+ virtual void paintCell(TQPainter *painter, const TQColorGroup &cg, int column, int width, int align);
+ virtual int width(const TQFontMetrics &fm, const TQListView *lv, int column);
+ virtual void setText ( int column, const TQString & text );
+ virtual TQString text(int column) const;
inline void clear() {
m_items.clear();
@@ -151,10 +151,10 @@ class FancyListViewItem : public KListViewItem
void setItem(int column, TextPaintItem item);
private:
- virtual QColor backgroundColor(int col);
- void init(const QString& label1, const QString& label2);
- int textWidth(const QFont& font, const QString& text);
- QValueVector<TextPaintItem> m_items;
+ virtual TQColor backgroundColor(int col);
+ void init(const TQString& label1, const TQString& label2);
+ int textWidth(const TQFont& font, const TQString& text);
+ TQValueVector<TextPaintItem> m_items;
protected:
TextPaintStyleStore& m_styles;
};