aboutsummaryrefslogtreecommitdiff
path: root/examples/GuiClient/customListView.h
blob: 21898980465c7a1b742ea51b4ddea66b97806136 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef CUSTOMLISTVIEW_H
#define CUSTOMLISTVIEW_H

#include <QListView>
#include <QAction>

class customListView : public QListView
{
    Q_OBJECT

public:
    customListView(QWidget* parent = 0);
    bool event(QEvent* e);

public slots:
    void mousePressed(const QModelIndex& index);
    void doubleClicked(const QModelIndex& index);
    void clicked(const QModelIndex& index);

private slots:
    void showChatDialog_helper();

protected:
    void keyPressEvent(QKeyEvent*);

signals:
    void showChatDialog(const QString& bareJid);

private:
    QAction m_chat;
    QAction m_profile;
};

#endif // CUSTOMLISTVIEW_H