1 /* 2 * %kadu copyright begin% 3 * Copyright 2011 Piotr Galiszewski (piotr.galiszewski@kadu.im) 4 * Copyright 2011, 2014 Bartosz Brachaczek (b.brachaczek@gmail.com) 5 * Copyright 2010, 2011, 2012, 2013, 2014 Rafał Przemysław Malinowski (rafal.przemyslaw.malinowski@gmail.com) 6 * %kadu copyright end% 7 * 8 * This program is free software; you can redistribute it and/or 9 * modify it under the terms of the GNU General Public License as 10 * published by the Free Software Foundation; either version 2 of 11 * the License, or (at your option) any later version. 12 * 13 * This program 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 this program. If not, see <http://www.gnu.org/licenses/>. 20 */ 21 22 #ifndef AVATAR_H 23 #define AVATAR_H 24 25 #include <QtCore/QDateTime> 26 #include <QtGui/QPixmap> 27 28 #include "avatars/avatar-shared.h" 29 #include "storage/shared-base.h" 30 #include "exports.h" 31 32 class Contact; 33 class StoragePoint; 34 35 class KADUAPI Avatar : public SharedBase<AvatarShared> 36 { 37 KaduSharedBaseClass(Avatar) 38 39 public: 40 static Avatar null; 41 42 Avatar(); 43 Avatar(AvatarShared *data); 44 explicit Avatar(QObject *data); 45 Avatar(const Avatar ©); 46 virtual ~Avatar(); 47 48 virtual void storeAvatar(); 49 50 KaduSharedBase_PropertyBoolRead(Empty) 51 KaduSharedBase_PropertyCRW(QDateTime, lastUpdated, LastUpdated) 52 KaduSharedBase_PropertyCRW(QDateTime, nextUpdate, NextUpdate) 53 KaduSharedBase_PropertyCRW(QPixmap, pixmap, Pixmap) 54 KaduSharedBase_PropertyRead(QString, smallFilePath, SmallFilePath) 55 KaduSharedBase_PropertyCRW(QString, filePath, FilePath) 56 57 }; 58 59 Q_DECLARE_METATYPE(Avatar) 60 61 #endif // AVATAR_H 62