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 __KMOOD_MAIN_WINDOW_H__ 00022 #define __KMOOD_MAIN_WINDOW_H__ 00023 00024 // Qt includes 00025 #include <qwidget.h> 00026 #include <qlayout.h> 00027 00028 // KDE includes 00029 #include <kmainwindow.h> 00030 #include <kaction.h> 00031 00032 // KMood includes 00033 #include "KMoods.hh" 00034 #include "KMoodWidget.hh" 00035 00044 class KMoodMainWindow : public KMainWindow 00045 { 00046 Q_OBJECT 00047 00048 public: 00049 KMoodMainWindow( QWidget *parent = 0, const char *name = 0, KMoods *moods = 0 ); 00050 ~KMoodMainWindow( ); 00051 00052 void resetViewOfCurrentUser( ); 00053 00054 private: 00055 KMoods *m_moods; 00056 int m_insertPosition; 00057 QWidget *m_mainWidget; 00058 QGridLayout *m_mainLayout; 00059 KRadioAction *m_actionVeryHappy; 00060 KRadioAction *m_actionHappy; 00061 KRadioAction *m_actionCool; 00062 KRadioAction *m_actionSad; 00063 KRadioAction *m_actionAngry; 00064 bool m_shuttingDown; 00065 00066 void clearMoodChecks( ); 00067 void setInitialMoodChecks( KMood *mood ); 00068 00069 protected: 00070 virtual void closeEvent( QCloseEvent *event ); 00071 00072 private: 00073 KMoodWidget *m_currentUserEmoticon; 00074 00075 private slots: 00076 void slotQuit( ); 00077 void slotUserAppeared( KMood *mood ); 00078 void slotMoodVeryHappy( ); 00079 void slotMoodHappy( ); 00080 void slotMoodCool( ); 00081 void slotMoodSad( ); 00082 void slotMoodAngry( ); 00083 void slotShowPreferencesDialog( ); 00084 void slotMoodCurrentUserChanged( KMood *kmood ); 00085 void slotAgeChanged( KMood *mood ); 00086 }; 00087 00088 #endif 00089
1.2.18