Logo Search packages:      
Sourcecode: kmess version File versions  Download package


                          contactlistviewitem.h  -  description
    begin                : Fri Mar 28 2003
    copyright            : (C) 2003 by Mike K. Bennett
                           (C) 2005 by Diederik van der Boor
    email                : mkb137b@hotmail.com
                           vdboor --at-- codingdomain.com

 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *


#include "kmesslistviewitem.h"
#include <qobject.h>

// Forward declarations
class Contact;
class EmoticonManager;
class QString;
class QListView;
class QListViewItem;

 * @brief Contact node of the contact list window.
 * The contact list uses a Model-Viewer-Controller model.
 * The Contact class signals what something has changed, this view updates itself in the slots.
 * A contact may appear multiple times in the tree view,
 * so multiple ContactListViewItem objects may be created for the same contact.
 * @author Mike K. Bennett, Diederik van der Boor
 * @ingroup Root
00044 class ContactListViewItem : public QObject, public KMessListViewItem

    // The constructor
                         ContactListViewItem(QListView *parent, Contact *contact);
    // The constructor
                         ContactListViewItem(QListViewItem *parent, Contact *contact);
    // Compare
//    virtual int          compare( QListViewItem *item, int column, bool ascending ) const;
    // Return the contact
    Contact *            getContact() const;
    // Get whether the contact is online or not
    unsigned int         getOnlineStatus() const;
    // Return the tooltip text.
    QString              getToolTipText() const;
    // Return the type of the item
    int                  getType() const;

  private: // Private methods
    // Do general construction
    void                 construct();
    // Update the item's text
    void                 updateItemText();

  private slots:
    // Update the friendly name of the contact
    void                 slotUpdateFriendlyName();
    // Update the friendly name of the contact
    void                 slotUpdatePersonalStatus();
    // Update the status icon of the contact
    void                 slotUpdateStatus();
    // Update the visibility of the contact
    void                 slotUpdateVisiblity();

  private: // Private attributes

    // The contact to embed.
    Contact             *contact_;
    // The emoticon parser
    EmoticonManager     *emoticons_;
    // The url tag t othe contact or group's icon
    QString              iconTag_;
    // Whether the contact is online or offline
    unsigned int         onlineStatus_;
    // The personal status message
    QString              personalStatus_;
    // The personal status message without emoticons
    QString              personalStatusTip_;
    // The contact or group's status identifier
    QString              statusIdentifier_;


Generated by  Doxygen 1.6.0   Back to index