Show
Ignore:
Timestamp:
04/17/08 02:25:30 (8 months ago)
Author:
flynd
Message:

Added a group menu to enable some group actions without opening group edit dialog. Currently the menu is only accessible from the threaded view.

Location:
trunk/qt4-gui/src/contactlist
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/qt4-gui/src/contactlist/contactlist.cpp

    r6148 r6153  
    462462} 
    463463 
     464QModelIndex ContactListModel::groupIndex(unsigned long id) const 
     465{ 
     466  if (id >= SystemGroupOffset) 
     467    return groupIndex(GROUPS_SYSTEM, id - SystemGroupOffset); 
     468  else 
     469    return groupIndex(GROUPS_USER, id); 
     470} 
     471 
    464472bool ContactListModel::setData(const QModelIndex& index, const QVariant& value, int role) 
    465473{ 
  • trunk/qt4-gui/src/contactlist/contactlist.h

    r6152 r6153  
    315315  QModelIndex groupIndex(GroupType type, unsigned long id) const; 
    316316 
     317  /** 
     318   * Get index for a group. This function uses model id for groups 
     319   * Requesting group id 0 will return other users group. 
     320   * 
     321   * @param id Id of the group or 0 to get other users group 
     322   * @return An index for the group or an invalid index if the group does not exist 
     323   */ 
     324  QModelIndex groupIndex(unsigned long id) const; 
     325 
    317326public slots: 
    318327  /**