CCIMXDesktop
Loading...
Searching...
No Matches
ChatListPanel.h
1
#ifndef CHATLISTPANEL_H
2
#define CHATLISTPANEL_H
3
#include "core/ListContextInfo.h"
4
#include <QWidget>
5
class
QLineEdit;
6
class
QStandardItemModel;
7
class
QListView;
8
class
Session
;
9
10
class
ChatListPanel
:
public
QWidget {
11
Q_OBJECT
12
static
constexpr
const
unsigned
short
MAX_WIDTH = 300;
13
14
public
:
15
explicit
ChatListPanel
(QWidget* parent);
16
void
append_context(
Session
* s,
const
ListContextInfo
& info);
17
void
append_context(
Session
* s,
ListContextInfo
&& info);
18
bool
request_remove(
const
QString& name);
19
20
ListContextInfo
request_info(
Session
* s)
const
;
21
22
signals:
23
void
request_search(
const
QString& target_name);
24
void
currentContactChanged(
Session
* s);
25
26
private
:
27
QLineEdit* search_edit;
28
QStandardItemModel* standard_model;
29
QListView* listview;
30
QMap<Session*, ListContextInfo> contextInfos;
31
void
config_view_and_model();
32
void
init_searchbar();
33
void
sync_once();
34
void
process_new_add(
const
ListContextInfo
& info);
35
private
slots:
36
void
filterText(
const
QString& t);
37
void
onCurrentChanged(
const
QModelIndex& current,
const
QModelIndex&);
38
};
39
40
#endif
// CHATLISTPANEL_H
ChatListPanel
Definition
ChatListPanel.h:10
ListContextInfo
Definition
ListContextInfo.h:7
Session
Definition
Session.h:11
extern_app
CCommunicator
ui
communication_main
ChatListPanel.h
Generated by
1.9.8