1 | // |
2 | // Copyright (C) 2003 Grzegorz Jaskiewicz <gj at pointblue.com.pl> |
3 | // |
4 | // gadupubdir.h |
5 | // |
6 | // This program is free software; you can redistribute it and/or |
7 | // modify it under the terms of the GNU General Public License |
8 | // as published by the Free Software Foundation; either version 2 |
9 | // of the License, or (at your option) any later version. |
10 | // |
11 | // This program is distributed in the hope that it will be useful, |
12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | // GNU General Public License for more details. |
15 | // |
16 | // You should have received a copy of the GNU General Public License |
17 | // along with this program; if not, write to the Free Software |
18 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
19 | // 02110-1301, USA. |
20 | // |
21 | |
22 | #ifndef GADUPUBDIR_H |
23 | #define GADUPUBDIR_H |
24 | |
25 | #include "ui_gadusearch.h" |
26 | #include "gadusession.h" |
27 | |
28 | #include <kdebug.h> |
29 | #include <kdialog.h> |
30 | #include <QPixmap> |
31 | |
32 | class GaduAccount; |
33 | class GaduProtocol; |
34 | class GaduContact; |
35 | class GaduAccount; |
36 | namespace Ui { class GaduPublicDirectory; } |
37 | class GaduContact; |
38 | |
39 | class GaduPublicDir : public KDialog |
40 | { |
41 | Q_OBJECT |
42 | |
43 | public: |
44 | explicit GaduPublicDir( GaduAccount* , QWidget *parent = 0 ); |
45 | GaduPublicDir( GaduAccount* , int searchFor, QWidget* parent = 0 ); |
46 | ~GaduPublicDir(); |
47 | QPixmap iconForStatus( uint status ); |
48 | |
49 | private slots: |
50 | void slotSearch(); |
51 | void slotNewSearch(); |
52 | void slotSearchResult( const SearchResult& result, unsigned int seq ); |
53 | void slotAddContact(); |
54 | void inputChanged( const QString& ); |
55 | void inputChanged( bool ); |
56 | void slotListSelected(); |
57 | |
58 | |
59 | private: |
60 | void getData(); |
61 | bool validateData(); |
62 | void createWidget(); |
63 | void initConnections(); |
64 | |
65 | GaduProtocol* p; |
66 | GaduAccount* mAccount; |
67 | GaduContact* mContact; |
68 | Ui::GaduPublicDirectory* mMainWidget; |
69 | |
70 | // form data |
71 | QString fName; |
72 | QString fSurname; |
73 | QString fNick; |
74 | QString fCity; |
75 | int fUin; |
76 | int fGender; |
77 | bool fOnlyOnline; |
78 | int fAgeFrom; |
79 | int fAgeTo; |
80 | }; |
81 | #endif |
82 | |