summaryrefslogtreecommitdiffstats
path: root/konq-plugins/domtreeviewer/domlistviewitem.cpp
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit84da08d7b7fcda12c85caeb5a10b4903770a6f69 (patch)
tree2a6aea76f2dfffb4cc04bb907c4725af94f70e72 /konq-plugins/domtreeviewer/domlistviewitem.cpp
downloadtdeaddons-84da08d7b7fcda12c85caeb5a10b4903770a6f69.tar.gz
tdeaddons-84da08d7b7fcda12c85caeb5a10b4903770a6f69.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaddons@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'konq-plugins/domtreeviewer/domlistviewitem.cpp')
-rw-r--r--konq-plugins/domtreeviewer/domlistviewitem.cpp73
1 files changed, 73 insertions, 0 deletions
diff --git a/konq-plugins/domtreeviewer/domlistviewitem.cpp b/konq-plugins/domtreeviewer/domlistviewitem.cpp
new file mode 100644
index 0000000..c24df96
--- /dev/null
+++ b/konq-plugins/domtreeviewer/domlistviewitem.cpp
@@ -0,0 +1,73 @@
+/***************************************************************************
+ domlistviewitem.cpp
+ -------------------
+
+ author : Andreas Schlapbach
+ email : schlpbch@iam.unibe.ch
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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 "domlistviewitem.h"
+
+#include <qpainter.h>
+#include <qlistview.h>
+#include <qapplication.h>
+
+#include <kglobalsettings.h>
+
+DOMListViewItem::DOMListViewItem( const DOM::Node &node, QListView *parent )
+ : QListViewItem( parent ), m_node(node)
+{
+ init();
+}
+
+DOMListViewItem::DOMListViewItem( const DOM::Node &node, QListView *parent, QListViewItem *after)
+ : QListViewItem( parent, after ), m_node(node)
+{
+ init();
+}
+
+DOMListViewItem::DOMListViewItem( const DOM::Node &node, QListViewItem *parent )
+ : QListViewItem( parent ), m_node(node)
+{
+ init();
+}
+
+DOMListViewItem::DOMListViewItem( const DOM::Node &node, QListViewItem *parent, QListViewItem *after)
+ : QListViewItem( parent, after ), m_node(node)
+{
+ init();
+}
+
+DOMListViewItem::~DOMListViewItem()
+{
+ //NOP
+}
+
+void DOMListViewItem::init()
+{
+ m_color = QApplication::palette().color( QPalette::Active, QColorGroup::Text );
+ m_font = KGlobalSettings::generalFont();
+ clos = false;
+}
+
+void DOMListViewItem::paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int alignment )
+{
+ QColorGroup _cg( cg );
+ QColor c = _cg.text();
+
+ p->setFont(m_font);
+ _cg.setColor( QColorGroup::Text, m_color );
+ QListViewItem::paintCell( p, _cg, column, width, alignment );
+ _cg.setColor( QColorGroup::Text, c );
+}
+
+