clNoticeList.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #ifndef CLNOTICELIST_H
  2. #define CLNOTICELIST_H
  3. #include <QWidget>
  4. #include "CHttpBll.h"
  5. #include "clNoticeDetail.h"
  6. #include <QLabel>
  7. namespace Ui {
  8. class clNoticeList;
  9. }
  10. class QMyLabel : public QLabel
  11. {
  12. Q_OBJECT
  13. signals:
  14. void sgnClick(int nRow, int nCol);
  15. public:
  16. explicit QMyLabel(int nRow, QWidget *parent = nullptr) :QLabel(parent),m_nRow(nRow){ }
  17. private:
  18. void mouseReleaseEvent(QMouseEvent *ev) {emit sgnClick(m_nRow, 1); }
  19. int m_nRow;
  20. };
  21. class clNoticeList : public QWidget
  22. {
  23. Q_OBJECT
  24. public:
  25. explicit clNoticeList(QWidget *parent = nullptr);
  26. ~clNoticeList();
  27. void setUI(const int nWidth, const int nHeight);
  28. void setNotice(std::vector<CNoticeInfo> vNL);
  29. void viewNotice(__int64 nId);
  30. signals:
  31. void unReadNoticeCount(int nCount);
  32. void readNotice(__int64 nId);
  33. private slots:
  34. void on_tablewt_examList_cellClicked(int row, int column);
  35. void on_btn_setRead_clicked();
  36. void onUpdateNoticeReadStatus(CUpdateNoticeReadStatus unrs);
  37. private:
  38. Ui::clNoticeList *ui;
  39. std::vector<CNoticeInfo> vNoticeList;
  40. std::shared_ptr<clNoticeDetail> m_pNoticeDetail;
  41. void showNotice(CNoticeInfo ni);
  42. void setNoticeRead(QString sIds);
  43. void updateReadStatus(__int64 nId);
  44. };
  45. #endif // CLNOTICELIST_H