12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- #ifndef DIALOGCHAT_H
- #define DIALOGCHAT_H
-
- #include <QCloseEvent>
- #include <QDialog>
- #include "netsoul.h"
-
- namespace Ui {
- class DialogChat;
- }
-
- class DialogChat : public QWidget
- {
- Q_OBJECT
-
- public:
- explicit DialogChat(QWidget *parent = 0);
- ~DialogChat();
- NetSoul::User getUser();
- bool match(NetSoul::User usr);
-
- signals:
- void sendMessageRequested(NetSoul::User, QString);
-
- protected:
- void closeEvent(QCloseEvent *e);
-
- public slots:
- void setUser(NetSoul::User user);
- void newMessage(NetSoul::Message msg);
- void setMe(NetSoul::User usr);
-
- private slots:
- void on_lineChat_returnPressed();
- void append(NetSoul::User usr, QString msg);
-
- private:
- Ui::DialogChat *ui;
- NetSoul::User m_user;
- NetSoul::User m_me;
- };
-
- #endif // DIALOGCHAT_H
|