Add full emoji support
This commit is contained in:
parent
ebbce440bf
commit
42bb9bb63a
40 changed files with 2715 additions and 17 deletions
|
|
@ -19,12 +19,24 @@
|
|||
#define TEXT_INPUT_WIDGET_H
|
||||
|
||||
#include <QHBoxLayout>
|
||||
#include <QLineEdit>
|
||||
#include <QPaintEvent>
|
||||
#include <QTextEdit>
|
||||
#include <QWidget>
|
||||
|
||||
#include "EmojiPickButton.h"
|
||||
#include "FlatButton.h"
|
||||
|
||||
class FilteredTextEdit : public QTextEdit
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit FilteredTextEdit(QWidget *parent = nullptr);
|
||||
void keyPressEvent(QKeyEvent *event);
|
||||
|
||||
signals:
|
||||
void enterPressed();
|
||||
};
|
||||
|
||||
class TextInputWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
@ -36,6 +48,9 @@ public:
|
|||
public slots:
|
||||
void onSendButtonClicked();
|
||||
|
||||
private slots:
|
||||
void addSelectedEmoji(const QString &emoji);
|
||||
|
||||
signals:
|
||||
void sendTextMessage(QString msg);
|
||||
|
||||
|
|
@ -44,10 +59,11 @@ protected:
|
|||
|
||||
private:
|
||||
QHBoxLayout *top_layout_;
|
||||
QLineEdit *input_;
|
||||
FilteredTextEdit *input_;
|
||||
|
||||
FlatButton *send_file_button_;
|
||||
FlatButton *send_message_button_;
|
||||
EmojiPickButton *emoji_button_;
|
||||
};
|
||||
|
||||
#endif // TEXT_INPUT_WIDGET_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue