1
/***************************************************************************
2
* Copyright (C) 2003 by Jens Dagerbo *
3
* jens.dagerbo@swipnet.se *
5
* This program is free software; you can redistribute it and/or modify *
6
* it under the terms of the GNU General Public License as published by *
7
* the Free Software Foundation; either version 2 of the License, or *
8
* (at your option) any later version. *
10
***************************************************************************/
12
#ifndef __REPLACEITEM_H__
13
#define __REPLACEITEM_H__
16
#include <kdeversion.h>
19
#include "replaceview.h"
21
class ReplaceItem : public QCheckListItem
25
ReplaceItem( ReplaceView * parent, ReplaceItem * after, QString file ) :
26
QCheckListItem( parent,
30
file, QCheckListItem::CheckBox ),
31
_file( file ), _string( file ), _line( 0 ), _isfile( true ),
32
_lineclicked( false ), _clicked( true )
39
ReplaceItem( ReplaceItem * parent, ReplaceItem * after, QString file, QString string, int line ) :
40
QCheckListItem( parent,
44
QString::number( line + 1 ) + ": " + string, QCheckListItem::CheckBox ),
45
_file( file ), _string( string ), _line( line ), _isfile( false ),
46
_lineclicked( false ), _clicked( true )
51
QString const & file() const
61
QString const & string() const
83
ReplaceItem * parent() const
85
return static_cast<ReplaceItem*>( QListViewItem::parent() );
88
ReplaceItem * firstChild() const
90
return static_cast<ReplaceItem*>( QListViewItem::firstChild() );
93
ReplaceItem * nextSibling() const
95
return static_cast<ReplaceItem*>( QListViewItem::nextSibling() );
98
void activate( int column, QPoint const & localPos );
99
bool hasCheckedChildren() const;
100
virtual void stateChange( bool state );
102
static bool s_listview_done;
105
#if KDE_VERSION > 305
106
void paintCell( QPainter * p, const QColorGroup & cg, int column, int width, int align );
108
void setChecked( bool checked );