summaryrefslogtreecommitdiffabout
path: root/kaddressbook/emaileditwidget.h
Unidiff
Diffstat (limited to 'kaddressbook/emaileditwidget.h') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/emaileditwidget.h101
1 files changed, 101 insertions, 0 deletions
diff --git a/kaddressbook/emaileditwidget.h b/kaddressbook/emaileditwidget.h
new file mode 100644
index 0000000..acdecaf
--- a/dev/null
+++ b/kaddressbook/emaileditwidget.h
@@ -0,0 +1,101 @@
1/*
2 This file is part of KAddressBook.
3 Copyright (c) 2002 Mike Pilone <mpilone@slac.com>
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9
10 This program 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
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution.
22*/
23
24#ifndef EMAILEDITWIDGET_H
25#define EMAILEDITWIDGET_H
26
27#include <kabc/addressee.h>
28#include <kdialogbase.h>
29
30#include "addresseeconfig.h"
31
32class QButtonGroup;
33class QCheckBox;
34class QListView;
35class QListBox;
36class QTextEdit;
37class QToolButton;
38
39class KComboBox;
40class KLineEdit;
41class KListView;
42
43/**
44 This widget displays a list box of the email addresses as well as buttons
45 to manipulate them (up, down, add, remove).
46*/
47class EmailEditWidget : public QWidget
48{
49 Q_OBJECT
50
51 public:
52 EmailEditWidget( QWidget *parent, const char *name = 0 );
53 ~EmailEditWidget();
54
55 void setEmails( const QStringList &list );
56 QStringList emails();
57
58 signals:
59 void modified();
60
61 private slots:
62 void edit();
63 void textChanged( const QString& );
64
65 private:
66 KLineEdit *mEmailEdit;
67 QStringList mEmailList;
68};
69
70class EmailEditDialog : public KDialogBase
71{
72 Q_OBJECT
73
74 public:
75 EmailEditDialog( const QStringList &list, QWidget *parent,
76 const char *name = 0 );
77 ~EmailEditDialog();
78
79 QStringList emails() const;
80 bool changed() const;
81
82 protected slots:
83 void add();
84 void remove();
85 void edit();
86 void standard();
87 void selectionChanged( int );
88 void emailChanged();
89
90 private:
91 KLineEdit *mEmailEdit;
92 QListBox *mEmailListBox;
93 QPushButton *mAddButton;
94 QPushButton *mRemoveButton;
95 QPushButton *mEditButton;
96 QPushButton *mStandardButton;
97
98 bool mChanged;
99};
100
101#endif