div class="twikiTopBar">

Chair for Computer Aided Medical Procedures & Augmented Reality
Lehrstuhl für Informatikanwendungen in der Medizin & Augmented Reality

ShmemViewerWindow Class Reference
[Shared memory viewer]

The main Qt window class, derived from QMainWindow. More...


Public Member Functions

 ShmemViewerWindow ()
 Initializes all widgets by calling initView().
 ~ShmemViewerWindow ()
 Does nothing.
void initView ()
 Set up main view by adding p_mainWidget to this object.
virtual QSize sizeHint () const
 returns QSize(m_width,m_height)
virtual QSizePolicy sizePolicy () const
 strict: Fixed Size only
virtual void paintEvent (QPaintEvent *)
 Overridden from QWidget.
void changeImageInfo (const QSize &newSize, const ColorMode newColor)
 Called from ShmemNeed::newSession to set the current image props.
void setImg8Data (unsigned char *data)
 Called from ShmemNeed::receiveData.
void setImg32Data (unsigned char *data)
 Called from ShmemNeed::receiveData.
void customEvent (QCustomEvent *e)
 Used to change window size from another thread.

Private Attributes

QWidget * p_mainWidget
 main widget
QImage * p_img8
 image for 8-bit data
QImage * p_img32
 image for 32-bit data
int m_width
 image width
int m_height
 image height
size_t m_pixelNum
 number of pixels
ColorMode m_colorMode
 indicates which image should be drawn
QMutex m_img8Mutex
 mutex locking access to p_img8
QMutex m_img32Mutex
 mutex locking access to p_img32

Detailed Description

The main Qt window class, derived from QMainWindow.

Author:
Martin Wagner <martin.wagner@in.tum.de>

Definition at line 67 of file ShmemViewerWindow.h.


Member Function Documentation

void ShmemViewerWindow::paintEvent QPaintEvent *   )  [virtual]
 

Overridden from QWidget.

Uses a QPainter object to draw the current content of p_img8/32 on the p_mainWidget.

Definition at line 108 of file ShmemViewerWindow.cc.

void ShmemViewerWindow::setImg32Data unsigned char *  data  ) 
 

Called from ShmemNeed::receiveData.

Copies data to the internal byte field of p_img32

Definition at line 169 of file ShmemViewerWindow.cc.

void ShmemViewerWindow::setImg8Data unsigned char *  data  ) 
 

Called from ShmemNeed::receiveData.

Copies data to the internal byte field of p_img8

Definition at line 159 of file ShmemViewerWindow.cc.

ShmemViewerWindow Class Reference | generated on Sun Apr 29 02:01:11 2007 by Doxygen 1.4.1 for DWARF