You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.1 KiB
37 lines
1.1 KiB
#pragma once |
|
|
|
#include <QWidget> |
|
#include <QListView> |
|
#include <QStandardItemModel> |
|
#include <QString> |
|
|
|
class DbManager; |
|
|
|
class ChannelList : public QWidget { |
|
Q_OBJECT |
|
public: |
|
explicit ChannelList(DbManager* db = nullptr, QWidget *parent = nullptr); |
|
|
|
void loadChannels(); |
|
void selectChannel(const QString& channelId); |
|
void setChannelPeersOnline(const QString& channelId, int count); |
|
void setAutoConnectActive(bool active); |
|
void setChannelUnreadCount(const QString& channelId, int count); |
|
int getChannelUnreadCount(const QString& channelId) const; |
|
|
|
signals: |
|
void channelSelected(const QString& channelId); |
|
void inviteRequested(const QString& channelId); |
|
void inviteByLinkRequested(const QString& channelId); |
|
void channelSettingsRequested(const QString& channelId); |
|
void joinRequested(); |
|
void createGroupRequested(); |
|
void settingsRequested(); |
|
void connMonitorRequested(); |
|
|
|
private: |
|
QListView *m_listView; |
|
QStandardItemModel *m_model; |
|
DbManager *m_db; |
|
bool m_autoConnectActive = false; |
|
};
|
|
|