-
Notifications
You must be signed in to change notification settings - Fork 3
/
emojidatamodel.h
38 lines (30 loc) · 974 Bytes
/
emojidatamodel.h
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
// Copyright 2016 Cutehacks AS. All rights reserved.
// License can be found in the LICENSE file.
#ifndef EMOJIDATAMODEL_H
#define EMOJIDATAMODEL_H
#include <QtCore/QAbstractItemModel>
namespace com { namespace cutehacks { namespace emooj {
class EmojiDataModel : public QAbstractItemModel
{
Q_OBJECT
public:
enum EmojiRoles {
UnicodeRole = Qt::UserRole + 1000,
NameRole,
ShortNameRole,
CategoryRole,
SheetXRole,
SheetYRole
};
EmojiDataModel(QObject *parent = 0);
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
QModelIndex parent(const QModelIndex &child) const;
int rowCount(const QModelIndex &parent) const;
int columnCount(const QModelIndex &parent) const;
QVariant data(const QModelIndex &index, int role) const;
QHash<int, QByteArray> roleNames() const;
public slots:
void emitIMEvent(int);
};
} } }
#endif // EMOJIDATAMODEL_H