libqutim  0.3.1.0
qutim_sdk_0_3::ChatUnit Class Referenceabstract

#include <chatunit.h>

+ Inheritance diagram for qutim_sdk_0_3::ChatUnit:

Public Slots

quint64 sendMessage (const QString &text)
 
- Public Slots inherited from qutim_sdk_0_3::MenuController
void showMenu (const QPoint &pos)
 

Signals

void chatStateChanged (qutim_sdk_0_3::ChatState current, qutim_sdk_0_3::ChatState previous)
 
void lastActivityChanged (const QDateTime &current, const QDateTime &previous)
 
void lowerUnitAdded (ChatUnit *unit)
 
void titleChanged (const QString &current, const QString &previous)
 

Public Member Functions

 ChatUnit (Account *account)
 
 ChatUnit (ChatUnitPrivate &d, Account *account)
 
virtual ~ChatUnit ()
 
Accountaccount ()
 
const Accountaccount () const
 
ChatUnitbuddy ()
 
const ChatUnitbuddy () const
 
qutim_sdk_0_3::ChatState chatState () const
 
virtual const ChatUnitgetHistoryUnit () const
 
virtual QString id () const =0
 
bool isConference () const
 
QDateTime lastActivity () const
 
virtual Q_INVOKABLE QList
< qutim_sdk_0_3::ChatUnit * > 
lowerUnits ()
 
ChatUnitmetaContact ()
 
const ChatUnitmetaContact () const
 
Q_INVOKABLE bool send (const qutim_sdk_0_3::Message &message)
 
virtual bool sendMessage (const qutim_sdk_0_3::Message &message)=0
 
void setChatState (qutim_sdk_0_3::ChatState state)
 
void setLastActivity (const QDateTime &time=QDateTime::currentDateTime())
 
virtual QString title () const
 
virtual Q_INVOKABLE
qutim_sdk_0_3::ChatUnit
upperUnit ()
 
- Public Member Functions inherited from qutim_sdk_0_3::MenuController
 MenuController (QObject *parent=0)
 
virtual ~MenuController ()
 
void addAction (const ActionGenerator *gen, const QList< QByteArray > &menu=QList< QByteArray >())
 
template<int N>
void addAction (const ActionGenerator *gen, const char(&menu)[N])
 
template<int N>
Q_INLINE_TEMPLATE void addAction (const ActionGenerator *gen, const char(&menu)[N])
 
template<typename T, int N>
Q_INLINE_TEMPLATE void addAction (const ActionGenerator *gen, const char(&menu)[N])
 
template<int N>
Q_INLINE_TEMPLATE void addAction (const ActionGenerator *gen, const QMetaObject *meta, const char(&menu)[N])
 
QMenu * menu (bool deleteOnClose=true) const
 
bool removeAction (const ActionGenerator *gen)
 

Properties

qutim_sdk_0_3::Account account
 
ChatState chatState
 
bool conference
 
QString id
 
QDateTime lastActivity
 
QString title
 

Additional Inherited Members

- Public Types inherited from qutim_sdk_0_3::MenuController
enum  MenuFlag { ShowSelfActions = 0x01, ShowSuperActions = 0x02, ShowOwnerActions = 0x04 }
 
- Static Public Member Functions inherited from qutim_sdk_0_3::MenuController
static void addAction (const ActionGenerator *gen, const QMetaObject *meta, const QList< QByteArray > &menu=QList< QByteArray >())
 
template<typename T >
static void addAction (const ActionGenerator *gen, const QList< QByteArray > &menu=QList< QByteArray >())
 
template<typename T , int N>
static void addAction (const ActionGenerator *gen, const char(&menu)[N])
 
template<int N>
static void addAction (const ActionGenerator *gen, const QMetaObject *meta, const char(&menu)[N])
 
static QObject * get (QAction *)
 
template<typename T >
static T get (QAction *)
 
- Protected Member Functions inherited from qutim_sdk_0_3::MenuController
void setMenuFlags (const MenuFlags &flags)
 
void setMenuOwner (MenuController *controller)
 
virtual void virtual_hook (int id, void *data)
 

Detailed Description

ChatUnit is base class for all chat members.

Constructor & Destructor Documentation

qutim_sdk_0_3::ChatUnit::ChatUnit ( Account account)

default ChatUnit's contructor

Parameters
accountPointer to chatunit's account
qutim_sdk_0_3::ChatUnit::ChatUnit ( ChatUnitPrivate &  d,
Account account 
)

ChatUnit's contructor.

Parameters
dChatUnitPrivate
accountPointer to chatunit's account
virtual qutim_sdk_0_3::ChatUnit::~ChatUnit ( )
virtual

ChatUnit's destructor.

Member Function Documentation

Account* qutim_sdk_0_3::ChatUnit::account ( )

Returns pointer to chatunits's Account.

Returns
Pointer to account
const Account* qutim_sdk_0_3::ChatUnit::account ( ) const

Returns pointer to chatunits's Account.

Returns
Pointer to account
ChatUnit* qutim_sdk_0_3::ChatUnit::buddy ( )

Returns TODO.

Returns
Pointer to upper buddy
const ChatUnit* qutim_sdk_0_3::ChatUnit::buddy ( ) const
qutim_sdk_0_3::ChatState qutim_sdk_0_3::ChatUnit::chatState ( ) const
void qutim_sdk_0_3::ChatUnit::chatStateChanged ( qutim_sdk_0_3::ChatState  current,
qutim_sdk_0_3::ChatState  previous 
)
signal
virtual const ChatUnit* qutim_sdk_0_3::ChatUnit::getHistoryUnit ( ) const
virtual
virtual QString qutim_sdk_0_3::ChatUnit::id ( ) const
pure virtual

Returns chatunit's identification, which is unique for account.

Returns
ChatUnit's identitification string
bool qutim_sdk_0_3::ChatUnit::isConference ( ) const
QDateTime qutim_sdk_0_3::ChatUnit::lastActivity ( ) const
void qutim_sdk_0_3::ChatUnit::lastActivityChanged ( const QDateTime &  current,
const QDateTime &  previous 
)
signal
void qutim_sdk_0_3::ChatUnit::lowerUnitAdded ( ChatUnit unit)
signal

Notifies that new lower unit is added.

virtual Q_INVOKABLE QList<qutim_sdk_0_3::ChatUnit*> qutim_sdk_0_3::ChatUnit::lowerUnits ( )
virtual

Returns TODO.

Returns
ChatUnitList

Reimplemented in qutim_sdk_0_3::MetaContact.

ChatUnit* qutim_sdk_0_3::ChatUnit::metaContact ( )

Returns TODO.

Returns
Pointer to upper metaContact or 0 if upper metaContact doesn't exist.
const ChatUnit* qutim_sdk_0_3::ChatUnit::metaContact ( ) const
Q_INVOKABLE bool qutim_sdk_0_3::ChatUnit::send ( const qutim_sdk_0_3::Message message)
virtual bool qutim_sdk_0_3::ChatUnit::sendMessage ( const qutim_sdk_0_3::Message message)
pure virtual

send message to chatunit

Parameters
messageMessage, which to be sent to the recipient

Implemented in qutim_sdk_0_3::Buddy.

quint64 qutim_sdk_0_3::ChatUnit::sendMessage ( const QString &  text)
slot
void qutim_sdk_0_3::ChatUnit::setChatState ( qutim_sdk_0_3::ChatState  state)

Sets a new chat state.

Parameters
stateNew ChatState
void qutim_sdk_0_3::ChatUnit::setLastActivity ( const QDateTime &  time = QDateTime::currentDateTime())
virtual QString qutim_sdk_0_3::ChatUnit::title ( ) const
virtual

Returns chatunit's representable name.

Returns
ChatUnit's name

Reimplemented in qutim_sdk_0_3::Buddy.

void qutim_sdk_0_3::ChatUnit::titleChanged ( const QString &  current,
const QString &  previous 
)
signal

Notify that ChatUnit's title is changed, may be because of changes in name.

virtual Q_INVOKABLE qutim_sdk_0_3::ChatUnit* qutim_sdk_0_3::ChatUnit::upperUnit ( )
virtual

Returns TODO.

Returns
Pointer to upper chatunit

Reimplemented in qutim_sdk_0_3::Contact.

Property Documentation

qutim_sdk_0_3::Account qutim_sdk_0_3::ChatUnit::account
read
ChatState qutim_sdk_0_3::ChatUnit::chatState
readwrite
bool qutim_sdk_0_3::ChatUnit::conference
read
QString qutim_sdk_0_3::ChatUnit::id
read
QDateTime qutim_sdk_0_3::ChatUnit::lastActivity
read
QString qutim_sdk_0_3::ChatUnit::title
read

The documentation for this class was generated from the following file:

Generated by Doxygen