Pimcommon

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

KDE's Doxygen guidelines are available online.