Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

KMood Class Reference

The emotion of a user (model). More...

#include <KMood.hh>

Collaboration diagram for KMood:

Collaboration graph
[legend]
List of all members.

Public Types

enum  Mood {
  VeryHappy = 1000, Happy, Cool, Sad,
  Angry
}

Signals

void moodChanged (KMood *kmood)
void ageChanged (KMood *kmood)

Public Methods

 KMood ()
 KMood (QString userName)
 KMood (QString userName, Mood mood)
 KMood (QString userName, QString moodString)
 ~KMood ()
void setView (KMoodWidget *widget)
KMoodWidgetgetView ()
void setMood (Mood mood)
Mood getMood ()
void setAge (int ageMinutes)
int getAge ()
QString getMoodString ()
QString getMoodForMessages ()
void setCurrentUserName ()
QString getCurrentUserName ()

Static Public Methods

QString moodToString (Mood mood)
Mood stringToMood (QString string)

Static Protected Methods

void Init (KMood *kmood)

Private Attributes

Mood m_mood
int m_ageMinutes
QString m_userName
KMoodWidgetm_widget

Detailed Description

The emotion of a user (model).

The mood of a person. This is the model of the mood and is shown with the help of a KMoodWidget. Different possible strategies are thinkable to store the users mood and to propagate it to other users.

Author:
Andreas Baumann <andreas_baumann@users.sourceforge.net>
Version:
ProjectMajorVersion:
0


Member Enumeration Documentation

enum KMood::Mood
 

The possible moods a person can have. At the moment restricted to five basic moods.

Enumeration values:
VeryHappy 
Happy 
Cool 
Sad 
Angry 


Constructor & Destructor Documentation

KMood::KMood  
 

KMood::KMood QString    userName
 

KMood::KMood QString    userName,
Mood    mood
 

KMood::KMood QString    userName,
QString    moodString
 

KMood::~KMood  
 


Member Function Documentation

void KMood::ageChanged KMood *    kmood [signal]
 

The signal emmitted if the age of a user changed.

int KMood::getAge  
 

QString KMood::getCurrentUserName  
 

KMood::Mood KMood::getMood  
 

QString KMood::getMoodForMessages  
 

QString KMood::getMoodString  
 

KMoodWidget * KMood::getView  
 

void KMood::Init KMood *    kmood [static, protected]
 

Static initializer of objects of this class.

void KMood::moodChanged KMood *    kmood [signal]
 

The signal emmitted if the mood of a user changes.

QString KMood::moodToString Mood    mood [static]
 

void KMood::setAge int    ageMinutes
 

void KMood::setCurrentUserName  
 

Get an informative name from the currently logged in user. This can be either additional information from /etc/passwd (the field after the group id) or the login name if other information is not available.

Returns:
the name of the current user

void KMood::setMood Mood    mood
 

void KMood::setView KMoodWidget   widget
 

KMood::Mood KMood::stringToMood QString    string [static]
 


Member Data Documentation

int KMood::m_ageMinutes [private]
 

The age of the last change or confirmation of the mood. This is used to make the fading effect of emoticons work.

Mood KMood::m_mood [private]
 

The mood of a user. One of the KMood::Mood types. Represents the mood of a user.

QString KMood::m_userName [private]
 

The name of the user. Have a look at the setCurrentUserName function to see how the name of the current user logged in to the system is determined.

KMoodWidget* KMood::m_widget [private]
 

The back link to the view which has been connected to the model.


The documentation for this class was generated from the following files:
Generated on Wed Oct 8 21:52:27 2003 for kmood by doxygen1.2.18