summaryrefslogtreecommitdiffstats
path: root/kopete/libkopete/ui/kopetelistviewsearchline.h
blob: c30cc90ffaa417ce1c470c236d5e1c8f38357184 (plain)
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
/*
    kopetelistviewsearchline.h - a widget for performing quick searches of Kopete::ListViews

    Copyright (c) 2004      by Richard Smith <[email protected]>

    Kopete    (c) 2004      by the Kopete developers <[email protected]>

    *************************************************************************
    *                                                                       *
    * 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.                                   *
    *                                                                       *
    *************************************************************************
*/

#ifndef KOPETELISTVIEWSEARCHLINE_H
#define KOPETELISTVIEWSEARCHLINE_H

#include <klistviewsearchline.h>

namespace Kopete {
namespace UI {
namespace ListView {

class ListView;

class SearchLine : public KListViewSearchLine
{
	Q_OBJECT
  TQ_OBJECT
public:
	/**
	 * Constructs a SearchLine with \a listView being the
	 * ListView to be filtered.
	 *
	 * If \a listView is null then the widget will be disabled until a listview
	 * is set with setListView().
	 */
	SearchLine( TQWidget *parent, ListView *listView = 0, const char *name = 0 );
	/**
	 * Constructs a SearchLine without any ListView to filter. The
	 * KListView object has to be set later with setListView().
	 */
	SearchLine(TQWidget *parent, const char *name);
	/**
	 * Destroys the SearchLine.
	 */
	~SearchLine();
	
	void updateSearch( const TQString &s );
	
protected:
	virtual void checkItemParentsNotVisible();
	virtual bool checkItemParentsVisible( TQListViewItem *it );
	virtual void setItemVisible( TQListViewItem *it, bool visible );
	
private:
	TQString search;
};

} // end namespace ListView
} // end namespace UI
} // end namespace Kopete

#endif