mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-30 10:33:54 -07:00
extra files
This commit is contained in:
parent
e597325ec3
commit
6642b332f0
2 changed files with 116 additions and 0 deletions
38
cockatrice/src/tab_message.h
Normal file
38
cockatrice/src/tab_message.h
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
#ifndef TAB_MESSAGE_H
|
||||
#define TAB_MESSAGE_H
|
||||
|
||||
#include "tab.h"
|
||||
|
||||
class AbstractClient;
|
||||
class QTextEdit;
|
||||
class QLineEdit;
|
||||
class Event_Message;
|
||||
|
||||
class TabMessage : public Tab {
|
||||
Q_OBJECT
|
||||
private:
|
||||
AbstractClient *client;
|
||||
QString userName;
|
||||
|
||||
QTextEdit *textEdit;
|
||||
QLineEdit *sayEdit;
|
||||
|
||||
QAction *aLeave;
|
||||
QString sanitizeHtml(QString dirty) const;
|
||||
signals:
|
||||
void talkClosing(TabMessage *tab);
|
||||
private slots:
|
||||
void sendMessage();
|
||||
void actLeave();
|
||||
public slots:
|
||||
void processMessageEvent(Event_Message *event);
|
||||
void processUserLeft(const QString &userName);
|
||||
public:
|
||||
TabMessage(AbstractClient *_client, const QString &_userName);
|
||||
~TabMessage();
|
||||
void retranslateUi();
|
||||
QString getUserName() const { return userName; }
|
||||
QString getTabText() const { return tr("Talking to %1").arg(userName); }
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue