-rw-r--r-- | kaddressbook/imagewidget.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kaddressbook/imagewidget.h b/kaddressbook/imagewidget.h index b3ca0bd..afb9aa7 100644 --- a/kaddressbook/imagewidget.h +++ b/kaddressbook/imagewidget.h | |||
@@ -1,86 +1,88 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KAddressBook. | 2 | This file is part of KAddressBook. |
3 | Copyright (c) 2003 Tobias Koenig <tokoe@kde.org> | 3 | Copyright (c) 2003 Tobias Koenig <tokoe@kde.org> |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 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 | 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 | 7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | 8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program 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 | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 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 | 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. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | 18 | ||
19 | As a special exception, permission is given to link this program | 19 | As a special exception, permission is given to link this program |
20 | with any edition of Qt, and distribute the resulting executable, | 20 | with any edition of Qt, and distribute the resulting executable, |
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #ifndef IMAGEWIDGET_H | 24 | #ifndef IMAGEWIDGET_H |
25 | #define IMAGEWIDGET_H | 25 | #define IMAGEWIDGET_H |
26 | 26 | ||
27 | #include <qwidget.h> | 27 | #include <qwidget.h> |
28 | 28 | ||
29 | #include <kabc/picture.h> | 29 | #include <kabc/picture.h> |
30 | #include <kdialogbase.h> | 30 | #include <kdialogbase.h> |
31 | 31 | ||
32 | class KURL; | 32 | class KURL; |
33 | class KURLRequester; | 33 | class KURLRequester; |
34 | 34 | ||
35 | class QCheckBox; | 35 | class QCheckBox; |
36 | class QLabel; | 36 | class QLabel; |
37 | 37 | ||
38 | class ImageWidget : public QWidget | 38 | class ImageWidget : public QWidget |
39 | { | 39 | { |
40 | Q_OBJECT | 40 | Q_OBJECT |
41 | 41 | ||
42 | public: | 42 | public: |
43 | ImageWidget( QWidget *parent, const char *name = 0 ); | 43 | ImageWidget( QWidget *parent, const char *name = 0 ); |
44 | ~ImageWidget(); | 44 | ~ImageWidget(); |
45 | 45 | ||
46 | /** | 46 | /** |
47 | Sets the photo object. | 47 | Sets the photo object. |
48 | */ | 48 | */ |
49 | void setPhoto( const KABC::Picture &photo ); | 49 | void setPhoto( const KABC::Picture &photo ); |
50 | 50 | ||
51 | /** | 51 | /** |
52 | Returns a photo object. | 52 | Returns a photo object. |
53 | */ | 53 | */ |
54 | KABC::Picture photo() const; | 54 | KABC::Picture photo() const; |
55 | 55 | ||
56 | /** | 56 | /** |
57 | Sets the logo object. | 57 | Sets the logo object. |
58 | */ | 58 | */ |
59 | void setLogo( const KABC::Picture &photo ); | 59 | void setLogo( const KABC::Picture &photo ); |
60 | 60 | ||
61 | /** | 61 | /** |
62 | Returns a logo object. | 62 | Returns a logo object. |
63 | */ | 63 | */ |
64 | KABC::Picture logo() const; | 64 | KABC::Picture logo() const; |
65 | 65 | ||
66 | signals: | 66 | signals: |
67 | void changed(); | 67 | void changed(); |
68 | 68 | ||
69 | private slots: | 69 | private slots: |
70 | void loadPhoto(); | 70 | void loadPhoto(); |
71 | void loadLogo(); | 71 | void loadLogo(); |
72 | void removePhoto(); | ||
73 | void removeLogo(); | ||
72 | void updateGUI(); | 74 | void updateGUI(); |
73 | 75 | ||
74 | private: | 76 | private: |
75 | QPixmap loadPixmap( const KURL &url ); | 77 | QPixmap loadPixmap( const KURL &url ); |
76 | 78 | ||
77 | KURLRequester *mPhotoUrl; | 79 | KURLRequester *mPhotoUrl; |
78 | KURLRequester *mLogoUrl; | 80 | KURLRequester *mLogoUrl; |
79 | 81 | ||
80 | QCheckBox *mUsePhotoUrl; | 82 | QCheckBox *mUsePhotoUrl; |
81 | QCheckBox *mUseLogoUrl; | 83 | QCheckBox *mUseLogoUrl; |
82 | QLabel *mPhotoLabel; | 84 | QLabel *mPhotoLabel; |
83 | QLabel *mLogoLabel; | 85 | QLabel *mLogoLabel; |
84 | }; | 86 | }; |
85 | 87 | ||
86 | #endif | 88 | #endif |