blob: e6553da334cb67d4cec34c945d24d03255a74c8f (
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
/*
channellist.h - IRC Channel Search Widget
Copyright (c) 2004 by Jason Keirstead <jason@keirstead.org>
Kopete (c) 2004 by the Kopete developers <kopete-devel@kde.org>
*************************************************************************
* *
* 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 CHANNELLIST_H
#define CHANNELLIST_H
#include <tqwidget.h>
#include <tqmap.h>
#include <tqpair.h>
#include "kircengine.h"
class TQVBoxLayout;
class TQHBoxLayout;
class TQGridLayout;
class TQLabel;
class TQLineEdit;
class TQPushButton;
class TDEListView;
class TQSpinBox;
class TQListViewItem;
class ChannelList
: public TQWidget
{
TQ_OBJECT
public:
ChannelList( TQWidget *parent, KIRC::Engine *engine );
public slots:
void search();
void reset();
void clear();
signals:
void channelDoubleClicked( const TQString &channel );
void channelSelected( const TQString &channel );
private slots:
void slotItemDoubleClicked( TQListViewItem * i );
void slotItemSelected( TQListViewItem * i );
void slotChannelListed( const TQString & channel, uint users, const TQString & topic );
void slotListEnd();
void slotSearchCache();
void slotStatusChanged( KIRC::Engine::Status );
private:
void checkSearchResult( const TQString & channel, uint users, const TQString & topic );
TQLabel* textLabel1_2;
TQLineEdit* channelSearch;
TQSpinBox* numUsers;
TQPushButton* mSearchButton;
TDEListView* mChannelList;
TQVBoxLayout* ChannelListLayout;
TQHBoxLayout* layout72_2;
KIRC::Engine *m_engine;
bool mSearching;
TQString mSearch;
uint mUsers;
TQMap< TQString, TQPair< uint, TQString > > channelCache;
TQMap< TQString, TQPair< uint, TQString > >::const_iterator cacheIterator;
};
#endif
|