mirror of
https://gitlab.com/comunic/comunicmessages
synced 2024-10-23 15:13:23 +00:00
53 lines
1.3 KiB
C++
53 lines
1.3 KiB
C++
#ifndef CONVERSATIONSLISTWIDGET_H
|
|
#define CONVERSATIONSLISTWIDGET_H
|
|
|
|
#include <QWidget>
|
|
|
|
#include "../data/conversationslist.h"
|
|
#include "../data/userslist.h"
|
|
#include "../data/user.h"
|
|
|
|
class ConversationsListHelper;
|
|
class UsersHelper;
|
|
|
|
class ConversationsListWidget : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit ConversationsListWidget(QWidget *parent = nullptr);
|
|
~ConversationsListWidget();
|
|
|
|
/**
|
|
* Refresh the list of conversations of the user
|
|
*/
|
|
void refresh();
|
|
|
|
private slots:
|
|
|
|
/**
|
|
* This slot is triggered once we have got a new list of conversations
|
|
*
|
|
* @param success TRUE for a success / FALSE else
|
|
* @param list The list of conversation (empty list in case of failure)
|
|
*/
|
|
void onGotConversationsList(bool success, const ConversationsList &list);
|
|
|
|
/**
|
|
* This slot is triggered once we have information about the users
|
|
*
|
|
* @param success TRUE in case of success / FALSE else
|
|
* @param users The list of suers (empty list in case of failure)
|
|
*/
|
|
void onGotUsersInfo(bool success, const UsersList &users);
|
|
|
|
private:
|
|
ConversationsListHelper *mConversationsList;
|
|
UsersHelper *mUsersHelper;
|
|
|
|
//Current conversation in cache
|
|
ConversationsList mCurrList;
|
|
};
|
|
|
|
#endif // CONVERSATIONSLISTWIDGET_H
|