File indexing completed on 2025-01-26 04:52:16

0001 /*
0002  * SPDX-FileCopyrightText: 2020-2024 Laurent Montel <montel@kde.org>
0003  *
0004  * SPDX-License-Identifier: LGPL-2.0-or-later
0005  */
0006 
0007 #pragma once
0008 
0009 #include "kldapcore/ldapserver.h"
0010 #include <QListWidget>
0011 namespace KLDAPWidgets
0012 {
0013 class LdapWidgetItem : public QListWidgetItem
0014 {
0015 public:
0016     explicit LdapWidgetItem(QListWidget *parent, bool isActive = false);
0017 
0018     void setServer(const KLDAPCore::LdapServer &server);
0019 
0020     const KLDAPCore::LdapServer &server() const;
0021 
0022     void setIsActive(bool isActive);
0023 
0024     [[nodiscard]] bool isActive() const;
0025 
0026 private:
0027     KLDAPCore::LdapServer mServer;
0028     bool mIsActive = false;
0029 };
0030 }