qTox  Version: nightly | Commit: bc751c8e1cac455f9690654fcfe0f560d2d7dfdd
Classes | Public Types | Signals | Public Member Functions | Private Member Functions | Private Attributes | List of all members
FriendListManager Class Reference

#include <friendlistmanager.h>

Inheritance diagram for FriendListManager:
Inheritance graph
Collaboration diagram for FriendListManager:
Collaboration graph

Classes

struct  FilterParams
 

Public Types

using IFriendListItemPtr = std::shared_ptr< IFriendListItem >
 

Signals

void itemsChanged ()
 

Public Member Functions

 FriendListManager (int countContacts, QObject *parent=nullptr)
 
QVector< IFriendListItemPtrgetItems () const
 
bool needHideCircles () const
 
bool getPositionsChanged () const
 
void addFriendListItem (IFriendListItem *item)
 
void removeFriendListItem (IFriendListItem *item)
 
void sortByName ()
 
void sortByActivity ()
 
void resetParents ()
 
void setFilter (const QString &searchString, bool hideOnline, bool hideOffline, bool hideGroups)
 
void applyFilter ()
 
void updatePositions ()
 
void setSortRequired ()
 
void setGroupsOnTop (bool v)
 

Private Member Functions

void removeAll (IFriendListItem *)
 
bool cmpByName (const IFriendListItemPtr &, const IFriendListItemPtr &, bool groupsOnTop)
 
bool cmpByActivity (const IFriendListItemPtr &, const IFriendListItemPtr &)
 

Private Attributes

struct FriendListManager::FilterParams filterParams
 
bool byName = true
 
bool hideCircles = false
 
bool groupsOnTop
 
bool positionsChanged
 
bool needSort
 
QVector< IFriendListItemPtritems
 
int countContacts
 

Detailed Description

Definition at line 29 of file friendlistmanager.h.

Member Typedef Documentation

◆ IFriendListItemPtr

Definition at line 33 of file friendlistmanager.h.

Constructor & Destructor Documentation

◆ FriendListManager()

FriendListManager::FriendListManager ( int  countContacts,
QObject *  parent = nullptr 
)
explicit

Definition at line 23 of file friendlistmanager.cpp.

Member Function Documentation

◆ addFriendListItem()

void FriendListManager::addFriendListItem ( IFriendListItem item)

Definition at line 43 of file friendlistmanager.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ applyFilter()

void FriendListManager::applyFilter ( )

Definition at line 99 of file friendlistmanager.cpp.

Here is the caller graph for this function:

◆ cmpByActivity()

bool FriendListManager::cmpByActivity ( const IFriendListItemPtr a,
const IFriendListItemPtr b 
)
private

Definition at line 214 of file friendlistmanager.cpp.

Here is the caller graph for this function:

◆ cmpByName()

bool FriendListManager::cmpByName ( const IFriendListItemPtr a,
const IFriendListItemPtr b,
bool  groupsOnTop 
)
private

Definition at line 186 of file friendlistmanager.cpp.

Here is the caller graph for this function:

◆ getItems()

QVector< FriendListManager::IFriendListItemPtr > FriendListManager::getItems ( ) const

Definition at line 28 of file friendlistmanager.cpp.

Here is the caller graph for this function:

◆ getPositionsChanged()

bool FriendListManager::getPositionsChanged ( ) const

Definition at line 38 of file friendlistmanager.cpp.

Here is the caller graph for this function:

◆ itemsChanged

void FriendListManager::itemsChanged ( )
signal
Here is the caller graph for this function:

◆ needHideCircles()

bool FriendListManager::needHideCircles ( ) const

Definition at line 33 of file friendlistmanager.cpp.

Here is the caller graph for this function:

◆ removeAll()

void FriendListManager::removeAll ( IFriendListItem item)
private

Definition at line 176 of file friendlistmanager.cpp.

Here is the caller graph for this function:

◆ removeFriendListItem()

void FriendListManager::removeFriendListItem ( IFriendListItem item)

Definition at line 58 of file friendlistmanager.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ resetParents()

void FriendListManager::resetParents ( )

Definition at line 76 of file friendlistmanager.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setFilter()

void FriendListManager::setFilter ( const QString &  searchString,
bool  hideOnline,
bool  hideOffline,
bool  hideGroups 
)

Definition at line 84 of file friendlistmanager.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setGroupsOnTop()

void FriendListManager::setGroupsOnTop ( bool  v)

Definition at line 171 of file friendlistmanager.cpp.

Here is the caller graph for this function:

◆ setSortRequired()

void FriendListManager::setSortRequired ( )

Definition at line 165 of file friendlistmanager.cpp.

Here is the caller graph for this function:

◆ sortByActivity()

void FriendListManager::sortByActivity ( )

Definition at line 70 of file friendlistmanager.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sortByName()

void FriendListManager::sortByName ( )

Definition at line 64 of file friendlistmanager.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updatePositions()

void FriendListManager::updatePositions ( )

Definition at line 133 of file friendlistmanager.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ byName

bool FriendListManager::byName = true
private

Definition at line 70 of file friendlistmanager.h.

◆ countContacts

int FriendListManager::countContacts
private

Definition at line 77 of file friendlistmanager.h.

◆ filterParams

struct FriendListManager::FilterParams FriendListManager::filterParams
private

◆ groupsOnTop

bool FriendListManager::groupsOnTop
private

Definition at line 72 of file friendlistmanager.h.

◆ hideCircles

bool FriendListManager::hideCircles = false
private

Definition at line 71 of file friendlistmanager.h.

◆ items

QVector<IFriendListItemPtr> FriendListManager::items
private

Definition at line 75 of file friendlistmanager.h.

◆ needSort

bool FriendListManager::needSort
private

Definition at line 74 of file friendlistmanager.h.

◆ positionsChanged

bool FriendListManager::positionsChanged
private

Definition at line 73 of file friendlistmanager.h.


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