ACT-CV - Machine Vision for Cognitive Modeling
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
QtFrameSource Class Reference

FrameSource that uses QtWebKit. More...

#include <QtFrameSource.h>

Inheritance diagram for QtFrameSource:
Inheritance graph
Collaboration diagram for QtFrameSource:
Collaboration graph

Public Member Functions

 ~QtFrameSource ()
 
virtual IplImage * GetNextFrame ()
 
virtual int GetFrameNr () const
 
virtual size_t GetNumInfos () const
 
virtual const RegionInfoGetInfo (size_t idx) const
 
void SetMousePos (int x, int y)
 
void DoClick (int button)
 
void DoPressKey (int key)
 
- Public Member Functions inherited from FrameSource
virtual ~FrameSource ()
 
virtual double GetFPS () const
 frames per second More...
 
- Public Member Functions inherited from ReferenceCount
 ReferenceCount ()
 
virtual ~ReferenceCount ()
 
void IncRefCount ()
 
void DecRefCount ()
 

Static Public Member Functions

static FrameSourceQtSourceFactory (const char *url)
 

Private Member Functions

bool walkTree (const QWebElement &elem)
 fill regions_ More...
 
 QtFrameSource (const char *url, int width=960, int height=768)
 

Private Attributes

int width_
 
int height_
 
QWebPage page_
 
IplImage * image_
 
int n_
 
int mouseX_
 
int mouseY_
 
std::vector< RegionInforegions_
 

Detailed Description

FrameSource that uses QtWebKit.

Definition at line 37 of file QtFrameSource.h.

Constructor & Destructor Documentation

QtFrameSource::QtFrameSource ( const char *  url,
int  width = 960,
int  height = 768 
)
private

Definition at line 60 of file QtFrameSource.cpp.

References height_, image_, page_, pApp, and width_.

Referenced by QtSourceFactory().

QtFrameSource::~QtFrameSource ( )

Definition at line 84 of file QtFrameSource.cpp.

References image_, and QAppTearDown().

Member Function Documentation

void QtFrameSource::DoClick ( int  button)

Definition at line 202 of file QtFrameSource.cpp.

References mouseX_, mouseY_, page_, and pApp.

Referenced by MouseClick().

void QtFrameSource::DoPressKey ( int  key)

Definition at line 220 of file QtFrameSource.cpp.

References page_, and pApp.

Referenced by PressKey().

int QtFrameSource::GetFrameNr ( ) const
virtual

Implements FrameSource.

Definition at line 184 of file QtFrameSource.cpp.

References n_.

const RegionInfo & QtFrameSource::GetInfo ( size_t  idx) const
virtual

Reimplemented from FrameSource.

Definition at line 179 of file QtFrameSource.cpp.

References regions_.

IplImage * QtFrameSource::GetNextFrame ( )
virtual
Returns
NULL when nothing to get
Todo:
walk subframes

Implements FrameSource.

Definition at line 134 of file QtFrameSource.cpp.

References height_, image_, n_, page_, pApp, regions_, Rgb2Scalar(), walkTree(), and width_.

size_t QtFrameSource::GetNumInfos ( ) const
virtual

Reimplemented from FrameSource.

Definition at line 175 of file QtFrameSource.cpp.

References regions_.

FrameSource * QtFrameSource::QtSourceFactory ( const char *  url)
static

Definition at line 279 of file QtFrameSource.cpp.

References pApp, QAppCreate(), and QtFrameSource().

Referenced by main(), and SelectSourceInternal().

void QtFrameSource::SetMousePos ( int  x,
int  y 
)
Todo:
move somewhere where it makes more sense

Definition at line 189 of file QtFrameSource.cpp.

References mouseX_, mouseY_, page_, and pApp.

Referenced by MoveMouseTo().

bool QtFrameSource::walkTree ( const QWebElement &  elem)
private

fill regions_

Definition at line 92 of file QtFrameSource.cpp.

References regions_.

Referenced by GetNextFrame().

Member Data Documentation

int QtFrameSource::height_
private

Definition at line 39 of file QtFrameSource.h.

Referenced by GetNextFrame(), and QtFrameSource().

IplImage* QtFrameSource::image_
private

Definition at line 42 of file QtFrameSource.h.

Referenced by GetNextFrame(), QtFrameSource(), and ~QtFrameSource().

int QtFrameSource::mouseX_
private

Definition at line 45 of file QtFrameSource.h.

Referenced by DoClick(), and SetMousePos().

int QtFrameSource::mouseY_
private

Definition at line 46 of file QtFrameSource.h.

Referenced by DoClick(), and SetMousePos().

int QtFrameSource::n_
private

Definition at line 43 of file QtFrameSource.h.

Referenced by GetFrameNr(), and GetNextFrame().

QWebPage QtFrameSource::page_
private

Definition at line 41 of file QtFrameSource.h.

Referenced by DoClick(), DoPressKey(), GetNextFrame(), QtFrameSource(), and SetMousePos().

std::vector<RegionInfo> QtFrameSource::regions_
private

Definition at line 48 of file QtFrameSource.h.

Referenced by GetInfo(), GetNextFrame(), GetNumInfos(), and walkTree().

int QtFrameSource::width_
private

Definition at line 38 of file QtFrameSource.h.

Referenced by GetNextFrame(), and QtFrameSource().


The documentation for this class was generated from the following files:


ACT-CV - Machine Vision for Cognitive Modeling
© 2015 Marc Halbruegge (actcvlibrary@googlemail.com)