Fixed seg fault on logout.
[situare] / src / ui / avatarimage.h
1 /*
2    Situare - A location system for Facebook
3    Copyright (C) 2010  Ixonos Plc. Authors:
4
5        Jukka Saastamoinen - jukka.saastamoinen@ixonos.com
6        Jussi Laitinen - jussi.laitinen@ixonos.com
7        Ville Tiensuu - ville.tiensuu@ixonos.com
8
9    Situare is free software; you can redistribute it and/or
10    modify it under the terms of the GNU General Public License
11    version 2 as published by the Free Software Foundation.
12
13    Situare is distributed in the hope that it will be useful,
14    but WITHOUT ANY WARRANTY; without even the implied warranty of
15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16    GNU General Public License for more details.
17
18    You should have received a copy of the GNU General Public License
19    along with Situare; if not, write to the Free Software
20    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301,
21    USA.
22 */
23
24 #ifndef SITUAREUSER_H
25 #define SITUAREUSER_H
26
27 #include <QLabel>
28 #include <QPixmap>
29
30 /**
31 * @brief AvatarImage class creates avatar images.
32 *
33 * @class AvatarImage avatarimage.h "ui/avatarimage.h"
34 */
35 class AvatarImage
36 {
37 /*******************************************************************************
38 * MEMBER FUNCTIONS AND SLOTS
39 ******************************************************************************/
40 public:    
41     /**
42     * @brief ImageHeight used to separate friend and user images in function calls
43     */
44     enum ImageHeight {
45         Large=100,
46         Small=50 };
47
48     /**
49     * @brief Create avatar image from pixmap.
50     *
51     * @param image image to use in avatar image
52     * @param height used to scale image
53     */
54     static QPixmap create(const QPixmap &image, ImageHeight height);
55 };
56
57 #endif // AVATARIMAGE_H