kaddressbook Library API Documentation

emaileditwidget.h

00001 #ifndef EMAILEDITWIDGET_H
00002 #define EMAILEDITWIDGET_H
00003 /*                                                                      
00004     This file is part of KAddressBook.                                  
00005     Copyright (c) 2002 Mike Pilone <mpilone@slac.com>                   
00006                                                                         
00007     This program is free software; you can redistribute it and/or modify
00008     it under the terms of the GNU General Public License as published by
00009     the Free Software Foundation; either version 2 of the License, or   
00010     (at your option) any later version.                                 
00011                                                                         
00012     This program is distributed in the hope that it will be useful,     
00013     but WITHOUT ANY WARRANTY; without even the implied warranty of      
00014     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the        
00015     GNU General Public License for more details.                        
00016                                                                         
00017     You should have received a copy of the GNU General Public License   
00018     along with this program; if not, write to the Free Software         
00019     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.           
00020                                                                         
00021     As a special exception, permission is given to link this program    
00022     with any edition of Qt, and distribute the resulting executable,    
00023     without including the source code for Qt in the source distribution.
00024 */                                                                      
00025 
00026 #include <kdialogbase.h>
00027 #include <kabc/addressee.h>
00028 
00029 #include "addresseeconfig.h"
00030 
00031 class QButtonGroup;
00032 class QToolButton;
00033 class QListView;
00034 class QTextEdit;
00035 class QCheckBox;
00036 
00037 class KLineEdit;
00038 class KListView;
00039 class KComboBox;
00040 
00045 class EmailEditWidget : public QWidget
00046 {
00047   Q_OBJECT
00048 
00049   public:
00050     EmailEditWidget( QWidget *parent, const char *name );
00051     ~EmailEditWidget();
00052 
00053     void setEmails(const QStringList &list);
00054     QStringList emails();
00055 
00056   signals:
00057     void modified();
00058     
00059   private slots:
00060     void edit();
00061     void textChanged(const QString&);
00062 
00063   private:
00064     KLineEdit *mEmailEdit;
00065     QStringList mEmailList;
00066 };
00067 
00068 class EmailEditDialog : public KDialogBase
00069 {
00070   Q_OBJECT
00071   
00072   public:
00073     EmailEditDialog( const QStringList &list, QWidget *parent, const char *name = 0 );
00074     ~EmailEditDialog();
00075 
00076     QStringList emails() const;
00077     bool changed() const;
00078 
00079   protected slots:
00080     void add();
00081     void remove();
00082     void edit();
00083     void standard();
00084     void selectionChanged( int );
00085     void emailChanged();
00086 
00087   private:
00088     KLineEdit *mEmailEdit;
00089     QListBox *mEmailListBox;
00090     QPushButton *mAddButton;
00091     QPushButton *mRemoveButton;
00092     QPushButton *mEditButton;
00093     QPushButton *mStandardButton;
00094 
00095     bool mChanged;
00096 };
00097 
00098 #endif
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.4.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sat Oct 18 02:47:09 2003 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001