2017-01-01 02:30:42 +01:00
|
|
|
#ifndef CHATWIDGETINPUT_H
|
|
|
|
#define CHATWIDGETINPUT_H
|
|
|
|
|
2017-01-21 05:14:27 +01:00
|
|
|
#include "resizingtextedit.h"
|
2017-01-22 05:58:23 +01:00
|
|
|
#include "widgets/chatwidgetheaderbutton.h"
|
2017-01-21 05:14:27 +01:00
|
|
|
|
|
|
|
#include <QHBoxLayout>
|
2017-01-22 05:58:23 +01:00
|
|
|
#include <QLabel>
|
2017-01-21 05:14:27 +01:00
|
|
|
#include <QLineEdit>
|
2017-01-18 04:52:47 +01:00
|
|
|
#include <QPaintEvent>
|
2017-01-20 06:10:28 +01:00
|
|
|
#include <QTextEdit>
|
2017-01-21 05:14:27 +01:00
|
|
|
#include <QVBoxLayout>
|
2017-01-18 04:52:47 +01:00
|
|
|
#include <QWidget>
|
2017-01-01 02:30:42 +01:00
|
|
|
|
2017-01-18 21:30:23 +01:00
|
|
|
namespace chatterino {
|
|
|
|
namespace widgets {
|
|
|
|
|
2017-01-29 13:23:22 +01:00
|
|
|
class ChatWidget;
|
|
|
|
|
2017-01-01 02:30:42 +01:00
|
|
|
class ChatWidgetInput : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2017-01-29 13:23:22 +01:00
|
|
|
ChatWidgetInput(ChatWidget *parent);
|
2017-01-22 12:46:35 +01:00
|
|
|
~ChatWidgetInput();
|
2017-01-01 02:30:42 +01:00
|
|
|
|
|
|
|
protected:
|
|
|
|
void paintEvent(QPaintEvent *);
|
2017-01-20 06:10:28 +01:00
|
|
|
|
2017-01-22 05:58:23 +01:00
|
|
|
void resizeEvent(QResizeEvent *);
|
|
|
|
|
2017-01-20 06:10:28 +01:00
|
|
|
private:
|
2017-04-12 17:46:44 +02:00
|
|
|
ChatWidget *_chatWidget;
|
2017-01-29 13:23:22 +01:00
|
|
|
|
2017-04-12 17:46:44 +02:00
|
|
|
QHBoxLayout _hbox;
|
|
|
|
QVBoxLayout _vbox;
|
|
|
|
QHBoxLayout _editContainer;
|
|
|
|
ResizingTextEdit _edit;
|
|
|
|
QLabel _textLengthLabel;
|
|
|
|
ChatWidgetHeaderButton _emotesLabel;
|
2017-01-22 05:58:23 +01:00
|
|
|
|
|
|
|
private slots:
|
|
|
|
void refreshTheme();
|
2017-04-12 17:46:44 +02:00
|
|
|
void setMessageLengthVisisble(bool value)
|
2017-01-22 12:46:35 +01:00
|
|
|
{
|
2017-04-12 17:46:44 +02:00
|
|
|
_textLengthLabel.setHidden(!value);
|
2017-01-22 12:46:35 +01:00
|
|
|
}
|
2017-01-29 13:23:22 +01:00
|
|
|
void editTextChanged();
|
|
|
|
// void editKeyPressed(QKeyEvent *event);
|
2017-01-01 02:30:42 +01:00
|
|
|
};
|
2017-04-14 17:52:22 +02:00
|
|
|
} // namespace widgets
|
|
|
|
} // namespace chatterino
|
2017-01-01 02:30:42 +01:00
|
|
|
|
2017-01-11 18:52:09 +01:00
|
|
|
#endif // CHATWIDGETINPUT_H
|