Debian Codegraph @

src/CommandCompleter.h

raw symbols SCIP
1 // SPDX-FileCopyrightText: Nheko Contributors
2 //
3 // SPDX-License-Identifier: GPL-3.0-or-later
4
5 #pragma once
6
7 #include <QAbstractListModel>
8 #include <QString>
9
10 class CommandCompleter final : public QAbstractListModel
11 {
12 public:
13 enum Roles
14 {
15 Name = Qt::UserRole,
16 Description,
17 };
18
19 enum Commands
20 {
21 Me,
22 React,
23 Join,
24 Knock,
25 Part,
26 Leave,
27 Invite,
28 Kick,
29 Ban,
30 Unban,
31 Redact,
32 Roomnick,
33 Shrug,
34 Fliptable,
35 Unfliptable,
36 Sovietflip,
37 ClearTimeline,
38 ResetState,
39 RotateMegolmSession,
40 Md,
41 Cmark,
42 Plain,
43 Rainbow,
44 RainbowMe,
45 Notice,
46 RainbowNotice,
47 Confetti,
48 RainbowConfetti,
49 Rainfall,
50 Msgtype,
51 Glitch,
52 GradualGlitch,
53 Goto,
54 ConvertToDm,
55 ConvertToRoom,
56 Ignore,
57 Unignore,
58 BlockInvites,
59 AllowInvites,
60 COUNT,
61 };
62
63 CommandCompleter(QObject *parent = nullptr);
64 QHash<int, QByteArray> roleNames() const override;
65 int rowCount(const QModelIndex &parent = QModelIndex()) const override
66 {
67 (void)parent;
68 return (int)Commands::COUNT;
69 }
70 QVariant data(const QModelIndex &index, int role) const override;
71 };