kabc Library API Documentation

resourceldapconfig.h

00001 /*
00002     This file is part of libkabc.
00003     Copyright (c) 2002 Tobias Koenig <tokoe@kde.org>
00004 
00005     This library is free software; you can redistribute it and/or
00006     modify it under the terms of the GNU Library General Public
00007     License as published by the Free Software Foundation; either
00008     version 2 of the License, or (at your option) any later version.
00009 
00010     This library is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013     Library General Public License for more details.
00014 
00015     You should have received a copy of the GNU Library General Public License
00016     along with this library; see the file COPYING.LIB.  If not, write to
00017     the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00018     Boston, MA 02111-1307, USA.
00019 */
00020 
00021 #ifndef RESOURCELDAPCONFIG_H
00022 #define RESOURCELDAPCONFIG_H
00023 
00024 #include <qmap.h>
00025 
00026 #include <kdialogbase.h>
00027 #include <kresources/configwidget.h>
00028 
00029 class QCheckBox;
00030 class QPushButton;
00031 class QSpinBox;
00032 class QString;
00033 
00034 class KComboBox;
00035 class KLineEdit;
00036 
00037 namespace KABC {
00038 
00039 class ResourceLDAPConfig : public KRES::ConfigWidget
00040 { 
00041   Q_OBJECT
00042 
00043   public:
00044     ResourceLDAPConfig( QWidget* parent = 0, const char* name = 0 );
00045 
00046   public slots:
00047     void loadSettings( KRES::Resource* );
00048     void saveSettings( KRES::Resource* );
00049 
00050   private slots:
00051     void editAttributes();
00052 
00053   private:
00054     KLineEdit *mUser;
00055     KLineEdit *mPassword;
00056     KLineEdit *mHost;
00057     QSpinBox  *mPort;
00058     KLineEdit *mDn;
00059     KLineEdit *mFilter;
00060     QCheckBox *mAnonymous;
00061     QPushButton *mEditButton;
00062     QMap<QString, QString> mAttributes;
00063 };
00064 
00065 class AttributesDialog : public KDialogBase
00066 {
00067   Q_OBJECT
00068 
00069   public:
00070     AttributesDialog( const QMap<QString, QString> &attributes, QWidget *parent,
00071                       const char *name = 0 );
00072     ~AttributesDialog();
00073 
00074     QMap<QString, QString> attributes() const;
00075 
00076   private slots:
00077     void mapChanged( int pos );
00078 
00079   private:
00080     enum { UserMap, KolabMap, NetscapeMap, EvolutionMap, OutlookMap };
00081 
00082     KComboBox *mMapCombo;
00083     QValueList< QMap<QString, QString> > mMapList;
00084 
00085     QDict<KLineEdit> mLineEditDict;
00086     QDict<QString> mNameDict;
00087 };
00088 
00089 }
00090 
00091 #endif
KDE Logo
This file is part of the documentation for kabc Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed May 5 07:18:00 2004 by doxygen 1.3.6 written by Dimitri van Heesch, © 1997-2003