• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeabc
 

tdeabc

addresslineedit.h

00001 /*
00002     This file is part of libtdeabc.
00003     Copyright (c) 2002 Helge Deller <deller@gmx.de>
00004                   2002 Lubos Lunak <llunak@suse.cz>
00005 
00006     This library is free software; you can redistribute it and/or
00007     modify it under the terms of the GNU Library General Public
00008     License as published by the Free Software Foundation; either
00009     version 2 of the License, or (at your option) any later version.
00010 
00011     This library is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014     Library General Public License for more details.
00015 
00016     You should have received a copy of the GNU Library General Public License
00017     along with this library; see the file COPYING.LIB.  If not, write to
00018     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019     Boston, MA 02110-1301, USA.
00020 */
00021 
00022 #ifndef KABC_ADDRESSLINEEDIT_H
00023 #define KABC_ADDRESSLINEEDIT_H
00024 // $Id$
00025 
00026 #include <tqobject.h>
00027 #include <tqptrlist.h>
00028 #include <tqtimer.h>
00029 
00030 #include "klineedit.h"
00031 #include "kcompletion.h"
00032 
00033 class TDEConfig;
00034 
00035 namespace TDEABC {
00036 
00037 class LdapSearch;
00038 
00050 class KABC_EXPORT AddressLineEdit : public KLineEdit
00051 {
00052   Q_OBJECT
00053 public:
00054   AddressLineEdit(TQWidget* parent, bool useCompletion = true,
00055         const char *name = 0L);
00056   virtual ~AddressLineEdit();
00057 
00062   virtual void setFont( const TQFont& );
00063 
00064   static TDEConfig *config();
00065 
00066 public slots:
00070   void cursorAtEnd();
00074   void enableCompletion( bool enable );
00075 
00076 protected:
00081   virtual void loadAddresses();
00082   void addAddress( const TQString& );
00083   virtual void keyPressEvent(TQKeyEvent*);
00084   virtual void dropEvent(TQDropEvent *e);
00085   virtual void paste();
00086   virtual void insert(const TQString &t);
00087   virtual void mouseReleaseEvent( TQMouseEvent * e );
00088   void doCompletion(bool ctrlT);
00089 
00090 private slots:
00091   void slotCompletion() { doCompletion(false); }
00092   void slotPopupCompletion( const TQString& );
00093   void slotStartLDAPLookup();
00094   void slotLDAPSearchData( const TQStringList& );
00095 
00096 private:
00097   void init();
00098   void startLoadingLDAPEntries();
00099   void stopLDAPLookup();
00100   TQStringList addresses();
00101   TQStringList removeMailDupes( const TQStringList& adrs );
00102 
00103   TQString m_previousAddresses;
00104   bool m_useCompletion;
00105   bool m_completionInitialized;
00106   bool m_smartPaste;
00107   TQString m_typedText; // unused
00108 
00109   static bool s_addressesDirty;
00110   static TDECompletion *s_completion;
00111   static TQTimer *s_LDAPTimer;
00112   static LdapSearch *s_LDAPSearch;
00113   static TQString *s_LDAPText;
00114   static AddressLineEdit *s_LDAPLineEdit;
00115   static TDEConfig *s_config;
00116 
00117 private:
00118   class AddressLineEditPrivate* d;
00119 };
00120 
00121 }
00122 
00123 #endif      /* KABC_ADDRESSLINEEDIT_H */

tdeabc

Skip menu "tdeabc"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdeabc

Skip menu "tdeabc"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeabc by doxygen 1.7.1
This website is maintained by Timothy Pearson.