File: userlistdock.h

package info (click to toggle)
quaternion 0.0.97.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,800 kB
  • sloc: cpp: 8,380; xml: 172; sh: 5; makefile: 2
file content (49 lines) | stat: -rw-r--r-- 1,421 bytes parent folder | download
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/**************************************************************************
 *                                                                        *
 * SPDX-FileCopyrightText: 2015 Felix Rohrbach <kde@fxrh.de>              *
 *                                                                        *
 * SPDX-License-Identifier: GPL-3.0-or-later
 *                                                                        *
 **************************************************************************/

#pragma once

#include <QtWidgets/QVBoxLayout>
#include <QtWidgets/QDockWidget>

class UserListModel;
class QuaternionRoom;
class QTableView;
class QLineEdit;

class UserListDock: public QDockWidget
{
        Q_OBJECT
    public:
        explicit UserListDock(QWidget* parent = nullptr);

        void setRoom( QuaternionRoom* room );

    signals:
        void userMentionRequested(QString userId);

    private slots:
        void refreshTitle();
        void showContextMenu(QPoint pos);
        void startChatSelected();
        void requestUserMention();
        void kickUser();
        void banUser();
        void ignoreUser();
        bool isIgnored();

    private:
        QWidget* m_widget;
        QVBoxLayout* m_box;
        QTableView* m_view;
        QLineEdit* m_filterline;
        UserListModel* m_model;
        QuaternionRoom* m_currentRoom = nullptr;

        QString getSelectedUser() const;
};