Pimcommon

addresseelineeditldap.h
1/*
2 SPDX-FileCopyrightText: 2017-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#pragma once
8
9#include <QMap>
10#include <QObject>
11class QTimer;
12
13namespace KLDAPCore
14{
15class LdapClientSearch;
16}
17
18namespace PimCommon
19{
20class AddresseeLineEditManager;
21class AddresseeLineEdit;
22class AddresseeLineEditLdap : public QObject
23{
24public:
25 explicit AddresseeLineEditLdap(AddresseeLineEditManager *addressLineStatic, QObject *parent = nullptr);
26 ~AddresseeLineEditLdap() override;
27
28 void init();
29
30 void updateLDAPWeights();
31
32 [[nodiscard]] QMap<int, int> ldapClientToCompletionSourceMap() const;
33 [[nodiscard]] bool isLdapClientToCompletionSourceMapContains(int value) const;
34 [[nodiscard]] int ldapClientToCompletionSourceValue(int value) const;
35
36 [[nodiscard]] KLDAPCore::LdapClientSearch *ldapSearch() const;
37
38 [[nodiscard]] QTimer *ldapTimer() const;
39 [[nodiscard]] QString ldapText() const;
40 void setLdapText(const QString &ldapText);
41
42 [[nodiscard]] AddresseeLineEdit *addressLineEdit() const;
43 void setAddressLineEdit(AddresseeLineEdit *addressLineEdit);
44
45 void startLoadingLDAPEntries();
46 void stopLDAPLookup();
47 void restartLdap(const QString &searchString, AddresseeLineEdit *addressLine);
48
49private:
50 // maps LDAP client indices to completion source indices
51 // the assumption that they are always the first n indices in s_static->completion
52 // does not hold when clients are added later on
53 QMap<int, int> mLdapClientToCompletionSourceMap;
54 QString mLdapText;
55 QTimer *mLdapTimer = nullptr;
56 AddresseeLineEdit *mAddressLineEdit = nullptr;
57 KLDAPCore::LdapClientSearch *mLdapSearch = nullptr;
58
59 AddresseeLineEditManager *mAddressLineStatic = nullptr;
60};
61}
folderdialogacltab.h
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 29 2024 11:58:30 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.