• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

examples/example7/OverlayWidget.h

00001 #ifndef OVERLAY_WIDGET_H
00002 #define OVERLAY_WIDGET_H
00003 
00004 #include <QWidget>
00005 #include <QX11Info>
00006 
00007 #define __user
00008 #include "omapfb.h"
00009 #include <stdio.h>
00010 #include <sys/ioctl.h>
00011 #include <sys/mman.h>
00012 #include <sys/types.h>
00013 #include <sys/stat.h>
00014 #include <fcntl.h>
00015 #include <unistd.h>
00016 
00017 #include <FCam/Image.h>
00018 
00019 class OverlayWidget : public QWidget {
00020   public:
00021     OverlayWidget(QWidget *parent = NULL);
00022     ~OverlayWidget();
00023 
00024     // If you draw on a widget at the same place as this one, using
00025     // any color but the one below, it will show through the overlay.
00026     static QColor colorKey() {return QColor(10, 0, 10);}
00027 
00028     // A reference to the frame buffer
00029     FCam::Image framebuffer();
00030 
00031     void enable();    
00032 
00033  protected:
00034 
00035     void resizeEvent(QResizeEvent *);
00036     void moveEvent(QMoveEvent *);
00037     void showEvent(QShowEvent *);
00038     void hideEvent(QHideEvent *);
00039     bool eventFilter(QObject *receiver, QEvent *event);
00040 
00041     void disable();
00042 
00043     FCam::Image framebuffer_;
00044 
00045     //struct fb_var_screeninfo var_info;
00046     struct fb_var_screeninfo overlay_info;
00047     struct omapfb_mem_info mem_info;
00048     struct omapfb_plane_info plane_info;
00049     int overlay_fd;
00050 
00051     bool filterInstalled;
00052 };
00053 
00054 #endif

Generated on Fri Sep 24 2010 15:52:59 for FCam by  doxygen 1.7.1