programviewunit.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #ifndef PROGRAMVIEWUNIT_H
  2. #define PROGRAMVIEWUNIT_H
  3. #include <QLabel>
  4. #include <QPushButton>
  5. #include <QLineEdit>
  6. #include <QGroupBox>
  7. #include <switchbutton.h>
  8. #include <progmon.h>
  9. class ProgramViewUnit : public QObject
  10. {
  11. Q_OBJECT
  12. public:
  13. ProgramViewUnit(QGroupBox * pGroup,ProgUnit * pu, int x,int y);
  14. ~ProgramViewUnit();
  15. /* Moudle Name */
  16. QLabel * mpLabelName;
  17. /* Module Args */
  18. QLineEdit * mpLEArgs;
  19. /* Module Switch */
  20. SwitchButton * mpSwich;
  21. /* Module Start Count */
  22. QLineEdit * mpLECount;
  23. /* Module PID */
  24. QLineEdit * mpLEPID;
  25. /* Moudle CPU */
  26. QLineEdit * mpLECPU;
  27. /* Module Mem */
  28. QLineEdit * mpLEMem;
  29. /* Module Thread Number */
  30. QLineEdit * mpLEThread;
  31. /* Module Log std Switch */
  32. SwitchButton * mpLogStd;
  33. private slots:
  34. void onSwitchClick(bool bClick);
  35. void onLogSwitchClick(bool bClick);
  36. void onReadStandardOutput();
  37. signals:
  38. void progclick(ProgUnit *,ProgramViewUnit * , bool);
  39. void ProgLogClick(ProgUnit * ,ProgramViewUnit * ,bool);
  40. private:
  41. ProgUnit * mPU;
  42. public:
  43. /* Processs Started Update view if need */
  44. void ProcStarted(ProgUnit * pu);
  45. /* Process Stoped Update view if need */
  46. void ProcStopted(ProgUnit * pu);
  47. /* Update CPU Mem PID State */
  48. void UpdateState();
  49. };
  50. #endif // PROGRAMVIEWUNIT_H