Logo Search packages:      
Sourcecode: camstream version File versions  Download package

CDiffPanel Class Reference

Inheritance diagram for CDiffPanel:


List of all members.

Detailed Description

Show difference of two panels.

This panel takes 2 panels as an argument, substracts panel2 from panel1 and divides the result by 2, then adds 128.

Definition at line 7 of file DiffPanel.h.

Public Types

enum  PanelTypes { None, RGB, YUV420, Graph }

Public Slots

void DecrementUse ()
 Decrement usage counter.
void IncrementUse ()
 Increment usage counter.
virtual void RightClick (const QPoint &pos)
virtual void SetSize (const QSize &new_size)
 [overloaded] Set size & set palette.
virtual void UpdatePanel ()


void ChangedImageSize (const QSize &new_size)
 Emitted when the principle image-size has been changed.
void ChangedToHidden ()
 Only emitted when the panel is turned off.
void ChangedToUnused ()
 Emitted when the usage counter drops to 0 (not used any more).
void ChangedToUsed ()
 Emitted when the usage counter increases to 1 (first use).
void ChangedToVisible ()
 Only emitted when the panel is turned on.
void ChangedUsage (int new_usage)
 Emitted whenever the usage counter changes.
void ChangedVisibility (bool new_visibility)
 The visibility has changed.
void ChangedVisibleSize (const QSize &new_size)
 Emitted when the visible size has been changed.
void Updated ()
 Emitted after the panel's data has been updated.

Public Member Functions

 CDiffPanel (CCamPanel *p1, CCamPanel *p2, int scale, const char *name="difference", const char *desc="Difference")
const CCamPanelcopy (const CCamPanel &src)
 Make deep copies of images, by overwriting buffers.
QString GetDescription () const
 Returns a short description of the panel.
virtual const QImage & GetImage (int n=0)
 Return image representing step.
QSize GetImageSize () const
 Return size of principle image. May be (0, 0).
QString GetName () const
 Returns unique name of panel.
int GetPanelType () const
 Returns the panel type.
const QPixmap & GetPixmap () const
 Return pixmap object.
virtual QDialog * GetPropertiesDialog () const
QSize GetVisibleSize () const
 Return size of drawable portion; may be (0, 0) when there's nothing to draw.
bool IsDrawable ()
int IsUsed ()
 Returns usage counter.
const CCamPaneloperator+= (const CCamPanel &add)
 Operator overload that will add the values of the buffers of plus to this panel.
CCamPaneloperator-= (const CCamPanel &minus)
virtual void paintEvent (QPaintEvent *)
 Paint visible representation of step.
virtual QSize sizeHint () const
virtual QSizePolicy sizePolicy () const

Protected Member Functions

void ConnectResizes (CCamPanel *parent)
 Make SIGNAL/SLOT connections to propagate updates.
void ConnectUsage (CCamPanel *parent)
 Make SIGNAL/SLOT connections for usage counting.
void CreateImages ()
 Create image buffers in ImgRGB, ImgY/U/V or Graph resp.
void SetImageSize (const QSize &new_size)
 Sets principle image size.
void SetVisibleSize (const QSize &new_size)
 Sets visible image size.

Protected Attributes

int half_h
 Half image height; set by SetImageSize();.
int half_w
 Half image width; set by SetImageSize();.
int image_h
 Image height; set by SetImageSize();.
int image_w
 Image width; set by SetImageSize();.
QImage ImgRGB
 Ready-to-use QImage object for RGB image.
QImage ImgU
 Ready-to-use QImage object for U data.
QImage ImgV
 Ready-to-use QImage object for V data.
QImage ImgY
 Ready-to-use QImage object for Y data.
bool MenuVisible
QPixmap PixGraph
 Ready-to-use QPixmap for graphs.
QPopupMenu * pMenu

Private Member Functions

void Calculate (int n, void *dst, void *src1, void *src2)

Private Attributes

int Pixels
int Scale

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

Generated by  Doxygen 1.6.0   Back to index