#ifndef __GUI_MEDIA_DESTINATION_WIDGET__ #define __GUI_MEDIA_DESTINATION_WIDGET__ #include #include "../../components/base/basicMutex.h" #include "../../components/base/basicMediaDestination.h" #include "../../components/base/basicLIBAV.h" #include "../guiClass.h" class MediaDestWidget : public QWidget, public basicMediaDestination { private: U8 m_bStatus; int m_nMouseX; int m_nMouseY; bool m_bMouseActive; bool m_bSelected; int m_nMenuActivityCounter; bool m_bGrayScale; bool m_bEnhanced; bool m_bErrorMode; CSTR m_pErrorMsg; bool m_bDirectDrawing; FrameAspectRatio m_eWidgetAspectRatio; FrameAspectRatio m_eStreamAspectRatio; basicLogCollection* m_pLog; IplImage* m_pGraber; cv::Mat* m_mFrame; cv::Mat* m_mOutput; //basicVideoSource *m_pCapture; basicMutex* m_pPropertiesProtectorMutex; basicMutex* m_pWidgetProtectorMutex; //void m_fThreadProc(void); protected: QPixmap* m_pPixmap; QPixmap* m_pOverlayPixmap; public: explicit MediaDestWidget(QWidget* parent = NULL); ~MediaDestWidget(); virtual void render(QPainter* painter); bool init(void); virtual void pushFrame(cv::Mat* Frame, void* src = NULL); void setSourceType(int Type); void setError(bool AAA, CSTR Message = NULL); signals: void selected(void* P); public slots: void setGrayScale(); void setEnhanced(); void showCameraSettings(); void removeThisCamera(); void renderLater(); void renderNow(); void ShowContextMenu(const QPoint& pos); protected: bool event(QEvent* event); //void resizeEvent(QResizeEvent *event); void exposeEvent(QExposeEvent* event); void paintEvent(QPaintEvent* event); //void drawContents(QPainter * p, const QRectF & rect = QRectF()); private: bool m_bUpdateIsPending; QTimer * m_pTimer; }; #endif