author | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
commit | a08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (unidiff) | |
tree | 8ee90d686081c52e7c69b5ce946e9b1a7d690001 /kabc/distributionlistdialog.h | |
parent | 11edc920afe4f274c0964436633aa632c8288a40 (diff) | |
download | kdepimpi-p1.zip kdepimpi-p1.tar.gz kdepimpi-p1.tar.bz2 |
initial public commit of qt4 portp1
Diffstat (limited to 'kabc/distributionlistdialog.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kabc/distributionlistdialog.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/kabc/distributionlistdialog.h b/kabc/distributionlistdialog.h index b6d3c80..3627431 100644 --- a/kabc/distributionlistdialog.h +++ b/kabc/distributionlistdialog.h | |||
@@ -1,140 +1,142 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of libkabc. | 2 | This file is part of libkabc. |
3 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> |
4 | 4 | ||
5 | This library is free software; you can redistribute it and/or | 5 | This library is free software; you can redistribute it and/or |
6 | modify it under the terms of the GNU Library General Public | 6 | modify it under the terms of the GNU Library General Public |
7 | License as published by the Free Software Foundation; either | 7 | License as published by the Free Software Foundation; either |
8 | version 2 of the License, or (at your option) any later version. | 8 | version 2 of the License, or (at your option) any later version. |
9 | 9 | ||
10 | This library is distributed in the hope that it will be useful, | 10 | This library is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Library General Public License for more details. | 13 | Library General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Library General Public License | 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 | 16 | along with this library; see the file COPYING.LIB. If not, write to |
17 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 17 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
18 | Boston, MA 02111-1307, USA. | 18 | Boston, MA 02111-1307, USA. |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #ifndef KABC_DISTRIBUTIONLISTDIALOG_H | 21 | #ifndef KABC_DISTRIBUTIONLISTDIALOG_H |
22 | #define KABC_DISTRIBUTIONLISTDIALOG_H | 22 | #define KABC_DISTRIBUTIONLISTDIALOG_H |
23 | 23 | ||
24 | #include <qwidget.h> | 24 | #include <qwidget.h> |
25 | //Added by qt3to4: | ||
26 | #include <QLabel> | ||
25 | 27 | ||
26 | #include <kdialogbase.h> | 28 | #include <kdialogbase.h> |
27 | 29 | ||
28 | class QListView; | 30 | class Q3ListView; |
29 | class QLabel; | 31 | class QLabel; |
30 | class QComboBox; | 32 | class QComboBox; |
31 | class QButtonGroup; | 33 | class Q3ButtonGroup; |
32 | 34 | ||
33 | namespace KABC { | 35 | namespace KABC { |
34 | 36 | ||
35 | class AddressBook; | 37 | class AddressBook; |
36 | class DistributionListEditorWidget; | 38 | class DistributionListEditorWidget; |
37 | class DistributionListManager; | 39 | class DistributionListManager; |
38 | 40 | ||
39 | /** | 41 | /** |
40 | @short Frontend to create distribution lists | 42 | @short Frontend to create distribution lists |
41 | 43 | ||
42 | Creating a new DistributionListDialog does automatically | 44 | Creating a new DistributionListDialog does automatically |
43 | load all addressees and distribution lists from the config | 45 | load all addressees and distribution lists from the config |
44 | files. The changes will be saved when clicking the 'OK' | 46 | files. The changes will be saved when clicking the 'OK' |
45 | button. | 47 | button. |
46 | 48 | ||
47 | Example: | 49 | Example: |
48 | 50 | ||
49 | <pre> | 51 | <pre> |
50 | KABC::DistributionListDialog *dlg = new | 52 | KABC::DistributionListDialog *dlg = new |
51 | KABC::DistributionListDialog( KABC::StdAddressBook::self(), this ); | 53 | KABC::DistributionListDialog( KABC::StdAddressBook::self(), this ); |
52 | 54 | ||
53 | dlg->exec(); | 55 | dlg->exec(); |
54 | </pre> | 56 | </pre> |
55 | */ | 57 | */ |
56 | class DistributionListDialog : public KDialogBase | 58 | class DistributionListDialog : public KDialogBase |
57 | { | 59 | { |
58 | Q_OBJECT | 60 | Q_OBJECT |
59 | 61 | ||
60 | public: | 62 | public: |
61 | /** | 63 | /** |
62 | Constructor. | 64 | Constructor. |
63 | 65 | ||
64 | @param ab The addressbook, the addressees should be used from | 66 | @param ab The addressbook, the addressees should be used from |
65 | @param parent The parent widget | 67 | @param parent The parent widget |
66 | */ | 68 | */ |
67 | DistributionListDialog( AddressBook *ab, QWidget *parent ); | 69 | DistributionListDialog( AddressBook *ab, QWidget *parent ); |
68 | 70 | ||
69 | /** | 71 | /** |
70 | Destructor. | 72 | Destructor. |
71 | */ | 73 | */ |
72 | virtual ~DistributionListDialog(); | 74 | virtual ~DistributionListDialog(); |
73 | 75 | ||
74 | private: | 76 | private: |
75 | DistributionListEditorWidget *mEditor; | 77 | DistributionListEditorWidget *mEditor; |
76 | 78 | ||
77 | struct Data; | 79 | struct Data; |
78 | Data *d; | 80 | Data *d; |
79 | }; | 81 | }; |
80 | 82 | ||
81 | /** | 83 | /** |
82 | @short Helper class | 84 | @short Helper class |
83 | */ | 85 | */ |
84 | class EmailSelector : public KDialogBase | 86 | class EmailSelector : public KDialogBase |
85 | { | 87 | { |
86 | public: | 88 | public: |
87 | EmailSelector( const QStringList &emails, const QString ¤t, | 89 | EmailSelector( const QStringList &emails, const QString ¤t, |
88 | QWidget *parent ); | 90 | QWidget *parent ); |
89 | 91 | ||
90 | QString selected(); | 92 | QString selected(); |
91 | 93 | ||
92 | static QString getEmail( const QStringList &emails, const QString ¤t, | 94 | static QString getEmail( const QStringList &emails, const QString ¤t, |
93 | QWidget *parent ); | 95 | QWidget *parent ); |
94 | 96 | ||
95 | private: | 97 | private: |
96 | QButtonGroup *mButtonGroup; | 98 | Q3ButtonGroup *mButtonGroup; |
97 | }; | 99 | }; |
98 | 100 | ||
99 | /** | 101 | /** |
100 | @short Helper class | 102 | @short Helper class |
101 | */ | 103 | */ |
102 | class DistributionListEditorWidget : public QWidget | 104 | class DistributionListEditorWidget : public QWidget |
103 | { | 105 | { |
104 | Q_OBJECT | 106 | Q_OBJECT |
105 | 107 | ||
106 | public: | 108 | public: |
107 | DistributionListEditorWidget( AddressBook *, QWidget *parent ); | 109 | DistributionListEditorWidget( AddressBook *, QWidget *parent ); |
108 | virtual ~DistributionListEditorWidget(); | 110 | virtual ~DistributionListEditorWidget(); |
109 | 111 | ||
110 | private slots: | 112 | private slots: |
111 | void newList(); | 113 | void newList(); |
112 | void editList(); | 114 | void editList(); |
113 | void removeList(); | 115 | void removeList(); |
114 | void addEntry(); | 116 | void addEntry(); |
115 | void removeEntry(); | 117 | void removeEntry(); |
116 | void changeEmail(); | 118 | void changeEmail(); |
117 | void updateEntryView(); | 119 | void updateEntryView(); |
118 | void updateAddresseeView(); | 120 | void updateAddresseeView(); |
119 | void updateNameCombo(); | 121 | void updateNameCombo(); |
120 | void slotSelectionEntryViewChanged(); | 122 | void slotSelectionEntryViewChanged(); |
121 | void slotSelectionAddresseeViewChanged(); | 123 | void slotSelectionAddresseeViewChanged(); |
122 | void save(); | 124 | void save(); |
123 | 125 | ||
124 | private: | 126 | private: |
125 | QComboBox *mNameCombo; | 127 | QComboBox *mNameCombo; |
126 | QLabel *mListLabel; | 128 | QLabel *mListLabel; |
127 | QListView *mEntryView; | 129 | Q3ListView *mEntryView; |
128 | QListView *mAddresseeView; | 130 | Q3ListView *mAddresseeView; |
129 | 131 | ||
130 | AddressBook *mAddressBook; | 132 | AddressBook *mAddressBook; |
131 | DistributionListManager *mManager; | 133 | DistributionListManager *mManager; |
132 | QPushButton *mNewButton, *mEditButton, *mRemoveButton; | 134 | QPushButton *mNewButton, *mEditButton, *mRemoveButton; |
133 | QPushButton *mChangeEmailButton, *mRemoveEntryButton, *mAddEntryButton; | 135 | QPushButton *mChangeEmailButton, *mRemoveEntryButton, *mAddEntryButton; |
134 | 136 | ||
135 | struct Data; | 137 | struct Data; |
136 | Data *d; | 138 | Data *d; |
137 | }; | 139 | }; |
138 | 140 | ||
139 | } | 141 | } |
140 | #endif | 142 | #endif |