blob: 3cdf324b880c175364f7995041c0068dcbe7585e (
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
82
83
84
85
86
87
88
89
|
/*
AddressBookSelectorWidget
Copyright (c) 2005 by Duncan Mac-Vicar Prett <duncan@kde.org>
Based on LinkAddressBookUI whose code was shamelessly stolen from
kopete's add new contact wizard, used in Konversation, and then
reappropriated by Kopete.
LinkAddressBookUI:
Copyright (c) 2004 by John Tapsell <john@geola.co.uk>
Copyright (c) 2003-2005 by Will Stephenson <will@stevello.free-online.co.uk>
Copyright (c) 2002 by Nick Betcher <nbetcher@kde.org>
Copyright (c) 2002 by Duncan Mac-Vicar Prett <duncan@kde.org>
Kopete (c) 2002-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 AddressBookSelectorWidget_H
#define AddressBookSelectorWidget_H
#include <kdialogbase.h>
#include <tdeabc/addressbook.h>
#include <kdemacros.h>
#include "kopete_export.h"
#include "addressbookselectorwidget_base.h"
namespace TDEABC {
class AddressBook;
class Addressee;
}
namespace Kopete
{
namespace UI
{
class KOPETE_EXPORT AddressBookSelectorWidget : public AddressBookSelectorWidget_Base
{
Q_OBJECT
public:
AddressBookSelectorWidget( TQWidget *parent = 0, const char *name = 0 );
~AddressBookSelectorWidget();
TDEABC::Addressee addressee();
/**
* sets the widget label message
* example: Please select a contact
* or, Choose a contact to delete
*/
void setLabelMessage( const TQString &msg );
/**
* pre-selects a contact
*/
void selectAddressee( const TQString &uid );
/**
* @return true if there is a contact selected
*/
bool addresseeSelected();
private:
TDEABC::AddressBook * m_addressBook;
TDEABC::Addressee m_addressee;
protected slots:
void slotAddAddresseeClicked();
/**
* Utility function, populates the addressee list
*/
void slotLoadAddressees();
signals:
void addresseeListClicked( TQListViewItem *addressee );
void addAddresseeClicked();
};
} // namespace UI
} // namespace Kopete
#endif
|