• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.14.10 API Reference
  • KDE Home
  • Contact Us
 

KLDAP Library

  • kldap
ldapconfigwidget.h
1/*
2 This file is part of libkldap.
3 Copyright (c) 2004-2006 Szombathelyi György <gyurco@freemail.hu>
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/
20
21#ifndef KLDAP_LDAPCONFIGWIDGET_H
22#define KLDAP_LDAPCONFIGWIDGET_H
23
24#include <QtCore/QString>
25#include <QWidget>
26
27#include "ldapdn.h"
28#include "kldap_export.h"
29#include "ldapobject.h"
30#include "ldapserver.h"
31#include "ldapurl.h"
32
33namespace KLDAP {
34
35class LdapSearch;
36
43
44class KLDAP_EXPORT LdapConfigWidget : public QWidget
45{
46 Q_OBJECT
47 Q_FLAGS( WinFlags )
48 Q_ENUMS( Security )
49 Q_ENUMS( Auth )
50 Q_PROPERTY( WinFlags features READ features WRITE setFeatures )
51 Q_PROPERTY( QString user READ user WRITE setUser )
52 Q_PROPERTY( QString bindDn READ bindDn WRITE setBindDn )
53 Q_PROPERTY( QString realm READ realm WRITE setRealm )
54 Q_PROPERTY( QString password READ password WRITE setPassword )
55 Q_PROPERTY( QString host READ host WRITE setHost )
56 Q_PROPERTY( int port READ port WRITE setPort )
57 Q_PROPERTY( int version READ version WRITE setVersion )
58 Q_PROPERTY( LdapDN dn READ dn WRITE setDn )
59 Q_PROPERTY( QString filter READ filter WRITE setFilter )
60 Q_PROPERTY( QString mech READ mech WRITE setMech )
61 Q_PROPERTY( Security security READ security WRITE setSecurity )
62 Q_PROPERTY( Auth auth READ auth WRITE setAuth )
63 Q_PROPERTY( int sizeLimit READ sizeLimit WRITE setSizeLimit )
64 Q_PROPERTY( int timeLimit READ timeLimit WRITE setTimeLimit )
65 Q_PROPERTY( int pageSize READ pageSize WRITE setPageSize )
66
67 public:
68
69 enum WinFlag {
70 W_USER = 0x1,
71 W_BINDDN = 0x2,
72 W_REALM = 0x4,
73 W_PASS = 0x8,
74 W_HOST = 0x10,
75 W_PORT = 0x20,
76 W_VER = 0x40,
77 W_DN = 0x80,
78 W_FILTER = 0x100,
79 W_SECBOX = 0x200,
80 W_AUTHBOX = 0x400,
81 W_TIMELIMIT = 0x800,
82 W_SIZELIMIT = 0x1000,
83 W_PAGESIZE = 0x2000,
84 W_ALL = 0x2fff
85 };
86
87 typedef enum {
88 None, SSL, TLS
89 } Security;
90 typedef enum {
91 Anonymous, Simple, SASL
92 } Auth;
93
94 Q_DECLARE_FLAGS( WinFlags, WinFlag )
95
96
101 explicit LdapConfigWidget( QWidget *parent = 0, Qt::WindowFlags fl = 0 );
103 explicit LdapConfigWidget( WinFlags flags, QWidget *parent = 0,
104 Qt::WindowFlags fl = 0 );
106 virtual ~LdapConfigWidget();
107
111 void setUser( const QString &user );
113 QString user() const;
114
118 void setPassword( const QString &password );
120 QString password() const;
121
127 void setBindDn( const QString &binddn );
129 QString bindDn() const;
130
134 void setRealm( const QString &realm );
136 QString realm() const;
137
141 void setHost( const QString &host );
143 QString host() const;
144
148 void setPort( int port );
150 int port() const;
151
155 void setVersion( int version );
157 int version() const;
158
162 void setDn( const LdapDN &dn );
164 LdapDN dn() const;
165
169 void setFilter( const QString &filter );
171 QString filter() const;
172
176 void setMech( const QString &mech );
178 QString mech() const;
179
185 void setSecurity( Security security );
191 Security security() const;
192
198 void setAuth( Auth auth );
204 Auth auth() const;
205
211 void setSizeLimit( int sizelimit );
216 int sizeLimit() const;
217
223 void setTimeLimit( int timelimit );
228 int timeLimit() const;
229
235 void setPageSize( int pagesize );
240 int pageSize() const;
241
242 WinFlags features() const;
243 void setFeatures( WinFlags features );
244
249 LdapUrl url() const;
254 void setUrl( const LdapUrl &url );
255
259 LdapServer server() const;
264 void setServer( const LdapServer &server );
265
266Q_SIGNALS:
270 void hostNameChanged(const QString &);
271
272 private:
273 class Private;
274 Private *const d;
275
276 Q_PRIVATE_SLOT( d, void setLDAPPort() )
277 Q_PRIVATE_SLOT( d, void setLDAPSPort() )
278 Q_PRIVATE_SLOT( d, void setAnonymous( bool ) )
279 Q_PRIVATE_SLOT( d, void setSimple( bool ) )
280 Q_PRIVATE_SLOT( d, void setSASL( bool ) )
281 Q_PRIVATE_SLOT( d, void queryDNClicked() )
282 Q_PRIVATE_SLOT( d, void queryMechClicked() )
283 Q_PRIVATE_SLOT( d, void loadData( KLDAP::LdapSearch*, const KLDAP::LdapObject& ) )
284 Q_PRIVATE_SLOT( d, void loadResult( KLDAP::LdapSearch* ) )
285};
286
287Q_DECLARE_OPERATORS_FOR_FLAGS( LdapConfigWidget::WinFlags )
288
289}
290
291#endif
KLDAP::LdapConfigWidget::LdapConfigWidget
LdapConfigWidget(QWidget *parent=0, Qt::WindowFlags fl=0)
Constructs an empty configuration widget.
Definition ldapconfigwidget.cpp:506
KLDAP::LdapConfigWidget::setUrl
void setUrl(const LdapUrl &url)
Set up the widget via an LDAP Url.
Definition ldapconfigwidget.cpp:530
KLDAP::LdapConfigWidget::setPassword
void setPassword(const QString &password)
Sets the password.
Definition ldapconfigwidget.cpp:660
KLDAP::LdapConfigWidget::LdapConfigWidget
LdapConfigWidget(WinFlags flags, QWidget *parent=0, Qt::WindowFlags fl=0)
Constructs a configuration widget.
KLDAP::LdapConfigWidget::setSizeLimit
void setSizeLimit(int sizelimit)
Sets the size limit.
Definition ldapconfigwidget.cpp:833
KLDAP::LdapConfigWidget::setDn
void setDn(const LdapDN &dn)
Sets the LDAP Base DN.
Definition ldapconfigwidget.cpp:732
KLDAP::LdapConfigWidget::setMech
void setMech(const QString &mech)
Sets the SASL Mechanism.
Definition ldapconfigwidget.cpp:756
KLDAP::LdapConfigWidget::setHost
void setHost(const QString &host)
Sets the host name.
Definition ldapconfigwidget.cpp:696
KLDAP::LdapConfigWidget::hostNameChanged
void hostNameChanged(const QString &)
KLDAP::LdapConfigWidget::setRealm
void setRealm(const QString &realm)
Sets the SASL realm.
Definition ldapconfigwidget.cpp:684
KLDAP::LdapConfigWidget::url
LdapUrl url() const
Returns a LDAP Url constructed from the settings given.
Definition ldapconfigwidget.cpp:525
KLDAP::LdapConfigWidget::setVersion
void setVersion(int version)
Sets the LDAP protocol version.
Definition ldapconfigwidget.cpp:720
KLDAP::LdapConfigWidget::setServer
void setServer(const LdapServer &server)
Set up the widget via an LdapServer object.
Definition ldapconfigwidget.cpp:595
KLDAP::LdapConfigWidget::setSecurity
void setSecurity(Security security)
Sets the security type (None, SSL, TLS).
Definition ldapconfigwidget.cpp:781
KLDAP::LdapConfigWidget::server
LdapServer server() const
Returns an LdapServer object constructed from the settings given.
Definition ldapconfigwidget.cpp:537
KLDAP::LdapConfigWidget::setPageSize
void setPageSize(int pagesize)
Sets the page size.
Definition ldapconfigwidget.cpp:857
KLDAP::LdapConfigWidget::setBindDn
void setBindDn(const QString &binddn)
Sets the bind dn.
Definition ldapconfigwidget.cpp:672
KLDAP::LdapConfigWidget::setPort
void setPort(int port)
Sets the LDAP port.
Definition ldapconfigwidget.cpp:708
KLDAP::LdapConfigWidget::setTimeLimit
void setTimeLimit(int timelimit)
Sets the time limit.
Definition ldapconfigwidget.cpp:845
KLDAP::LdapConfigWidget::setAuth
void setAuth(Auth auth)
Sets the authentication type (Anonymous, Simple, SASL).
Definition ldapconfigwidget.cpp:807
KLDAP::LdapConfigWidget::setUser
void setUser(const QString &user)
Sets the user name.
Definition ldapconfigwidget.cpp:648
KLDAP::LdapConfigWidget::setFilter
void setFilter(const QString &filter)
Sets the LDAP Filter.
Definition ldapconfigwidget.cpp:744
KLDAP::LdapObject
This class represents an LDAP Object.
Definition ldapobject.h:42
KLDAP::LdapSearch
This class starts a search operation on a LDAP server and returns the search values via a Qt signal.
Definition ldapsearch.h:46
KLDAP::LdapServer
A class that contains LDAP server connection settings.
Definition ldapserver.h:39
KLDAP::LdapUrl
A special url class for LDAP.
Definition ldapurl.h:43
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 17 2025 00:00:00 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KLDAP Library

Skip menu "KLDAP Library"
  • Main Page
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • Related Pages

kdepimlibs-4.14.10 API Reference

Skip menu "kdepimlibs-4.14.10 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal