1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
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 <tqpainter.h>
#include <tqlistview.h>
#include <tqapplication.h>
#include <tdeglobalsettings.h>
DOMListViewItem::DOMListViewItem( const DOM::Node &node, TQListView *parent )
: TQListViewItem( parent ), m_node(node)
{
init();
}
DOMListViewItem::DOMListViewItem( const DOM::Node &node, TQListView *parent, TQListViewItem *after)
: TQListViewItem( parent, after ), m_node(node)
{
init();
}
DOMListViewItem::DOMListViewItem( const DOM::Node &node, TQListViewItem *parent )
: TQListViewItem( parent ), m_node(node)
{
init();
}
DOMListViewItem::DOMListViewItem( const DOM::Node &node, TQListViewItem *parent, TQListViewItem *after)
: TQListViewItem( parent, after ), m_node(node)
{
init();
}
DOMListViewItem::~DOMListViewItem()
{
//NOP
}
void DOMListViewItem::init()
{
m_color = TQApplication::palette().color( TQPalette::Active, TQColorGroup::Text );
m_font = TDEGlobalSettings::generalFont();
clos = false;
}
void DOMListViewItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment )
{
TQColorGroup _cg( cg );
TQColor c = _cg.text();
p->setFont(m_font);
_cg.setColor( TQColorGroup::Text, m_color );
TQListViewItem::paintCell( p, _cg, column, width, alignment );
_cg.setColor( TQColorGroup::Text, c );
}
|