You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

dialogchat.h 746B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #ifndef DIALOGCHAT_H
  2. #define DIALOGCHAT_H
  3. #include <QCloseEvent>
  4. #include <QDialog>
  5. #include "netsoul.h"
  6. namespace Ui {
  7. class DialogChat;
  8. }
  9. class DialogChat : public QWidget
  10. {
  11. Q_OBJECT
  12. public:
  13. explicit DialogChat(QWidget *parent = 0);
  14. ~DialogChat();
  15. NetSoul::User getUser();
  16. bool match(NetSoul::User usr);
  17. signals:
  18. void sendMessageRequested(NetSoul::User, QString);
  19. protected:
  20. void closeEvent(QCloseEvent *e);
  21. public slots:
  22. void setUser(NetSoul::User user);
  23. void newMessage(NetSoul::Message msg);
  24. void setMe(NetSoul::User usr);
  25. private slots:
  26. void on_lineChat_returnPressed();
  27. void append(NetSoul::User usr, QString msg);
  28. private:
  29. Ui::DialogChat *ui;
  30. NetSoul::User m_user;
  31. NetSoul::User m_me;
  32. };
  33. #endif // DIALOGCHAT_H