blob: 6201b26fcb20169cc7a0ec567e7afcf8d1337403 (
plain)
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
|
/*
* Copyright (c) 2016-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
#include <memory>
#include <QGridLayout>
#include <QSettings>
#include <QSize>
#include <QString>
#include <QVector>
#include <SwifTools/EmojiMapper.h>
#include <Swift/QtUI/QtEmojisGrid.h>
namespace Swift {
class QtRecentEmojisGrid : public QtEmojisGrid {
Q_OBJECT
public:
explicit QtRecentEmojisGrid(QSettings* settings);
~QtRecentEmojisGrid();
public slots:
void handleEmojiClicked(QString emoji);
private:
void refresh();
void loadSettings();
void writeSettings();
private:
static const int MAX_RECENTS;
private:
QVector<QString> recents_;
QSettings* settings_;
};
}
|