addresslineedit.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
#ifndef KABC_ADDRESSLINEEDIT_H
00023
#define KABC_ADDRESSLINEEDIT_H
00024
00025
00026
#include <qobject.h>
00027
#include <qptrlist.h>
00028
#include <qtimer.h>
00029
00030
#include "klineedit.h"
00031
#include "kcompletion.h"
00032
00033
class KConfig;
00034
00035
namespace KABC {
00036
00037
class LdapSearch;
00038
00050 class AddressLineEdit :
public KLineEdit
00051 {
00052 Q_OBJECT
00053
public:
00054
AddressLineEdit(
QWidget* parent,
bool useCompletion =
true,
00055
const char *name = 0L);
00056
virtual ~
AddressLineEdit();
00057
00062
virtual void setFont(
const QFont& );
00063
00064
static KConfig *config();
00065
00066
public slots:
00070
void cursorAtEnd();
00074
void enableCompletion(
bool enable );
00075
00076
protected:
00081
virtual void loadAddresses();
00082
void addAddress(
const QString& );
00083
virtual void keyPressEvent(
QKeyEvent*);
00084
virtual void dropEvent(
QDropEvent *e);
00085
virtual void paste();
00086
virtual void insert(
const QString &t);
00087
virtual void mouseReleaseEvent(
QMouseEvent * e );
00088
void doCompletion(
bool ctrlT);
00089
00090
private slots:
00091
void slotCompletion() { doCompletion(
false); }
00092
void slotPopupCompletion(
const QString& );
00093
void slotStartLDAPLookup();
00094
void slotLDAPSearchData(
const QStringList& );
00095
00096
private:
00097
void init();
00098
void startLoadingLDAPEntries();
00099
void stopLDAPLookup();
00100
QStringList addresses();
00101
QStringList removeMailDupes(
const QStringList& adrs );
00102
00103
QString m_previousAddresses;
00104
bool m_useCompletion;
00105
bool m_completionInitialized;
00106
bool m_smartPaste;
00107
QString m_typedText;
00108
00109
static bool s_addressesDirty;
00110
static KCompletion *s_completion;
00111
static QTimer *s_LDAPTimer;
00112
static LdapSearch *s_LDAPSearch;
00113
static QString *s_LDAPText;
00114
static AddressLineEdit *s_LDAPLineEdit;
00115
static KConfig *s_config;
00116
00117
private:
00118
class AddressLineEditPrivate* d;
00119 };
00120
00121 }
00122
00123
#endif
This file is part of the documentation for kabc Library Version 3.3.1.