00001 /* 00002 * kmood - a mood indicator 00003 * Copyright (C) 2003 Andreas Baumann 00004 * 00005 * This program is free software; you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License as published by 00007 * the Free Software Foundation; either version 2 of the License, or 00008 * (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program; if not, write to the Free Software 00017 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00018 * 00019 */ 00020 00021 #ifndef __KMOODS_H__ 00022 #define __KMOODS_H__ 00023 00024 // Qt includes 00025 #include <qobject.h> 00026 #include <qobjectlist.h> 00027 00028 // KMood includes 00029 #include "KMood.hh" 00030 00040 class KMoods : public QObject 00041 { 00042 Q_OBJECT 00043 00044 public: 00045 00046 KMoods( ); 00047 ~KMoods( ); 00048 00049 KMood *getMoodOfCurrentUser( ); 00050 00051 QObjectList *getMoods( ); 00052 00053 virtual void writeMood( KMood *mood ) = 0; 00054 00055 signals: 00059 void moodChanged( KMood *kmood ); 00060 00064 void userAppeared( KMood *kmood ); 00065 00069 void userDisappeared( KMood *kmood ); 00070 00071 protected: 00072 QObjectList m_moods; 00073 KMood *m_moodOfCurrentUser; 00074 00075 virtual void readMoods( ); 00076 00077 KMood *findMoodOfUser( QString userName ); 00078 }; 00079 00080 #endif 00081
1.2.18