GCE::GCommunicationWidget Class Reference

A widget that handles text messaging between users. More...

#include <GCommunicationWidget.h>

Inheritance diagram for GCE::GCommunicationWidget:

Inheritance graph
[legend]
Collaboration diagram for GCE::GCommunicationWidget:

Collaboration graph
[legend]
List of all members.

Public Slots

void replaceInternalContactList (QStringList contacts)
void replaceExternalContactList (QStringList contacts)
void clearInternalContacts ()
void clearExternalContacts ()
void addInternalContact (QString contact)
void addExternalContact (QString contact)
void removeInternalContact (QString contact)
void removeExternalContact (QString contact)
void updateContactState (QString contact, bool available, bool internal)
void receiveMessage (QString message, QString from, bool internal)
void setDestination (const QString &destination)

Signals

void contactSelected (QString contact)
void sendMessage (QString message, QString destination)

Public Member Functions

 GCommunicationWidget (QWidget *parent=0, Qt::WFlags f=0)
virtual ~GCommunicationWidget ()

Protected Slots

void prepareMessageForSending ()

Protected Member Functions

void removeContactFromList (QString contact, QListWidget *list)

Protected Attributes

QListWidget * InternalServerList
QListWidget * ExternalServerList
QTextEdit * MessageHistory
QLineEdit * MessageDestination
QLineEdit * MessageText

Detailed Description

A widget that handles text messaging between users.

Author:
Raphael Langerhorst


Constructor & Destructor Documentation

GCE::GCommunicationWidget::GCommunicationWidget ( QWidget *  parent = 0,
Qt::WFlags  f = 0 
)

Constructor

GCE::GCommunicationWidget::~GCommunicationWidget (  )  [virtual]

Destructor


Member Function Documentation

void GCE::GCommunicationWidget::prepareMessageForSending (  )  [protected, slot]

Puts a message together from destination and message edit lines. This message is then sent with the sendMessage signal.

Todo:
move into new client interface class.
See also:
sendMessage()

void GCE::GCommunicationWidget::removeContactFromList ( QString  contact,
QListWidget *  list 
) [protected]

Removes given contact from given list. This is used for internal and external contact lists.

void GCE::GCommunicationWidget::replaceInternalContactList ( QStringList  contacts  )  [slot]

Sets the list of known communication contacts inside the G Universe.

void GCE::GCommunicationWidget::updateContactState ( QString  contact,
bool  available,
bool  internal 
) [slot]

Updates contact states for internal and external lists.

Note:
the very same contact can also switch from !internal to internal through this slot, it must then be correctly moved in the different contact lists.


Member Data Documentation

QListWidget* GCE::GCommunicationWidget::ExternalServerList [protected]

Lists all known servers external to the G Universe with their JID.

QListWidget* GCE::GCommunicationWidget::InternalServerList [protected]

Lists all known servers part of the G Universe with their JID.

QLineEdit* GCE::GCommunicationWidget::MessageDestination [protected]

The destination for sent messages.

QTextEdit* GCE::GCommunicationWidget::MessageHistory [protected]

History of all communication.

QLineEdit* GCE::GCommunicationWidget::MessageText [protected]

The actual message text to be sent.


The documentation for this class was generated from the following files:
Generated on Thu Nov 16 07:49:27 2006 for G System by  doxygen 1.4.7