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.

55 lines
1.4 KiB

6 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #ifndef __GUI_CORTEX_LAYER_WIDGET__
  2. #define __GUI_CORTEX_LAYER_WIDGET__
  3. #include <opencv2/opencv.hpp>
  4. #include "../../components/base/basicMutex.h"
  5. #include "../../components/base/basicThread.h"
  6. #include "../../data/cortex/base/basicLayer.h"
  7. #include "../guiClass.h"
  8. class CortexLayerWidget : public QWidget{
  9. private:
  10. bool m_bDirectDrawing;
  11. basicLogCollection * m_pLog;
  12. IplImage * m_pGraber;
  13. cv::Mat * m_mFrame;
  14. cv::Mat * m_mOutput;
  15. cortexLayer * m_pLayer;
  16. //basicVideoSource *m_pCapture;
  17. basicMutex * m_pPropertiesProtectorMutex;
  18. basicMutex * m_pWidgetProtectorMutex;
  19. protected:
  20. QPixmap * m_pPixmap;
  21. QPixmap * m_pOverlayPixmap;
  22. public:
  23. explicit CortexLayerWidget(QWidget* parent = NULL);
  24. ~CortexLayerWidget();
  25. void attachCortexLayer( cortexLayer *L );
  26. virtual void render(QPainter* painter);
  27. bool init(void);
  28. signals:
  29. //void selected(void* P);
  30. public slots:
  31. //void setGrayScale();
  32. //void setEnhanced();
  33. //void showCameraSettings();
  34. //void removeThisCamera();
  35. void renderLater();
  36. void renderNow();
  37. //void ShowContextMenu(const QPoint& pos);
  38. protected:
  39. bool event(QEvent* event);
  40. //void resizeEvent(QResizeEvent *event);
  41. void exposeEvent(QExposeEvent* event);
  42. void paintEvent(QPaintEvent* event);
  43. //void drawContents(QPainter * p, const QRectF & rect = QRectF());
  44. private:
  45. bool m_bUpdateIsPending;
  46. QTimer * m_pTimer;
  47. };
  48. #endif