libqutim
0.3.1.0
Main Page
Related Pages
Namespaces
Classes
Globals
Globals
File List
contactsearch.h
Go to the documentation of this file.
1
/****************************************************************************
2
**
3
** qutIM - instant messenger
4
**
5
** Copyright © 2011 Ruslan Nigmatullin <euroelessar@yandex.ru>
6
**
7
*****************************************************************************
8
**
9
** $QUTIM_BEGIN_LICENSE$
10
** This program is free software: you can redistribute it and/or modify
11
** it under the terms of the GNU General Public License as published by
12
** the Free Software Foundation, either version 3 of the License, or
13
** (at your option) any later version.
14
**
15
** This program is distributed in the hope that it will be useful,
16
** but WITHOUT ANY WARRANTY; without even the implied warranty of
17
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18
** See the GNU General Public License for more details.
19
**
20
** You should have received a copy of the GNU General Public License
21
** along with this program. If not, see http://www.gnu.org/licenses/.
22
** $QUTIM_END_LICENSE$
23
**
24
****************************************************************************/
25
#ifndef CONTACTSEARCH_H
26
#define CONTACTSEARCH_H
27
28
#include "
abstractsearchrequest.h
"
29
30
namespace
qutim_sdk_0_3
31
{
32
class
Protocol
;
33
class
Account;
34
class
Contact;
35
class
Status;
36
class
ContactSearchFactoryPrivate;
37
class
GeneralContactSearchFactoryPrivate;
38
39
class
LIBQUTIM_EXPORT
ContactSearchRequest
:
public
AbstractSearchRequest
40
{
41
Q_OBJECT
42
Q_DISABLE_COPY(
ContactSearchRequest
)
43
public
:
44
ContactSearchRequest
();
45
virtual
~
ContactSearchRequest
();
46
virtual
Contact
*contact(
int
row) = 0;
47
virtual
int
actionCount()
const
;
48
virtual
QVariant actionData(
int
index,
int
role = Qt::DisplayRole);
49
virtual
void
actionActivated(
int
actionIndex,
int
row);
50
};
51
52
class
LIBQUTIM_EXPORT
ContactSearchFactory
:
public
AbstractSearchFactory
53
{
54
Q_OBJECT
55
Q_DECLARE_PRIVATE(
ContactSearchFactory
)
56
public
:
57
ContactSearchFactory
();
58
virtual
~
ContactSearchFactory
();
59
protected
:
60
ContactSearchFactory
(ContactSearchFactoryPrivate *d);
61
};
62
63
class
LIBQUTIM_EXPORT
GeneralContactSearchFactory
:
public
ContactSearchFactory
64
{
65
Q_OBJECT
66
Q_DECLARE_PRIVATE(
GeneralContactSearchFactory
)
67
public
:
68
GeneralContactSearchFactory
(
Protocol
*protocol);
69
virtual
~
GeneralContactSearchFactory
();
70
virtual
QStringList requestList()
const
;
71
virtual
QVariant data(
const
QString &request,
int
role = Qt::DisplayRole);
72
Account
*account(
const
QString &name)
const
;
73
Protocol
*protocol()
const
;
74
private
slots:
75
void
accountAdded(
qutim_sdk_0_3::Account
*account);
76
void
accountRemoved();
77
void
accountStatusChanged(
const
qutim_sdk_0_3::Status
&status);
78
};
79
}
80
81
#endif // CONTACTSEARCH_H
82
Generated by Doxygen