casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Slots | Signals | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes
casa::QtDrawCanvas Class Reference

#include <QtDrawCanvas.qo.h>

List of all members.

Public Types

enum  {
  LINE,
  POINT,
  FPOINT,
  CIRCLE,
  FCIRCLE,
  RECT,
  FRECT,
  DIM,
  FDIM,
  PLUS,
  FPLUS,
  CROSS,
  FCROSS,
  TRIGU,
  FTRIGU,
  TRIGD,
  FTRIGD,
  TRIGL,
  FTRIGL,
  TRIGR,
  FTRIGR,
  SAND,
  FSAND,
  WING,
  FWING,
  BEAM,
  FBEAM,
  BED,
  FBED,
  HIST,
  FHIST
}

Public Slots

void zoomIn ()
void zoomOut ()
void markPrev ()
void markNext ()

Signals

void zoomChanged ()
void gotFocus ()

Public Member Functions

 QtDrawCanvas (QWidget *parent=0)
void setPlotSettings (const QtDrawSettings &settings)
void setCurveData (int id, const CurveData data, int tp=0, int cl=0)
void clearCurve (int id)
void setDataRange ()
void setImageMode (bool)
void setPixmap (const QImage &)
QPixmap * graph ()
void drawBackBuffer (QPainter *)
void plotPolyLines (QString)
void plotPolyLine (const Vector< Int > &, const Vector< Int > &, int ln=0, int tp=0, int cl=0)
 ln = 0, new chart ln < 0, remove trace ln > 0, append trace if ln exists, otherwise add trace tp = 0, continous line tp > 0, discrete symbols tp < 0, line and symbols cl, color value range from 0 up
void plotPolyLine (const Vector< Float > &x, const Vector< Float > &y, int ln=0, int tp=0, int cl=0)
void plotPolyLine (const Vector< Double > &, const Vector< Double > &, int ln=0, int tp=0, int cl=0)
void plotPolyLine (const Matrix< Int > &verts, int ln=0, int tp=0, int cl=0)
 Each row is a trace ln = 0, new chart ln < 0, remove traces ln > 0, append traces from (ln)th, add if not exists tp < 0, same shape for all traces tp = 0, continuous lines tp > 0, different discrete shape for each trace cl > 0, different color for each trace cl <= 0, same color for all traces.
void plotPolyLine (const Matrix< Float > &verts, int ln=0, int tp=0, int cl=0)
void plotPolyLine (const Matrix< Double > &verts, int ln=0, int tp=0, int cl=0)
void drawImage (const Matrix< uInt > &data, Matrix< uInt > *mask)
 template<class T>
void drawImage (const Matrix< uInt > &data)
QColor getLinearColor (double)
 void setMarkMode(bool);
QSize minimumSizeHint () const
QSize sizeHint () const
 ~QtDrawCanvas ()
void increaseCurZoom ()
int getCurZoom ()
int getZoomStackSize ()
int getCurLine ()
int getTotalLines ()
void setTitle (const QString &text, int fontSize=12, int color=0, const QString &font="Helvetica [Cronyx]")
void setXLabel (const QString &text, int fontSize=10, int color=1, const QString &font="Helvetica [Cronyx]")
void setYLabel (const QString &text, int fontSize=10, int color=2, const QString &font="Helvetica [Cronyx]")
void setWelcome (const QString &text, int fontSize=14, int color=1, const QString &font="Helvetica [Cronyx]")

Protected Member Functions

void paintEvent (QPaintEvent *event)
void resizeEvent (QResizeEvent *event)
void mousePressEvent (QMouseEvent *event)
void mouseMoveEvent (QMouseEvent *event)
void mouseReleaseEvent (QMouseEvent *event)
void keyPressEvent (QKeyEvent *event)
void wheelEvent (QWheelEvent *event)
void focusInEvent (QFocusEvent *event)

Private Types

enum  { Margin }

Private Member Functions

void updateRubberBandRegion ()
void refreshPixmap ()
void drawGrid (QPainter *painter)
void drawTicks (QPainter *painter)
void drawLabels (QPainter *painter)
void drawWelcome (QPainter *painter)
void drawCurves (QPainter *painter)
void drawRects (QPainter *painter)

Private Attributes

GraphLabel title
GraphLabel xLabel
GraphLabel yLabel
GraphLabel welcome
std::map< int, CurveDatacurveMap
std::map< int, int > typeMap
std::map< int, int > colorMap
int curLine
std::vector< QtDrawSettingszoomStack
int curZoom
std::map< int, CurveDatamarkerStack
int curMarker
QRect rubberBandRect
bool rubberBandIsShown
bool imageMode
bool markMode
QPixmap pixmap
QPixmap backBuffer
Matrix< uInt > * pMask

Detailed Description

Definition at line 72 of file QtDrawCanvas.qo.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
LINE 
POINT 
FPOINT 
CIRCLE 
FCIRCLE 
RECT 
FRECT 
DIM 
FDIM 
PLUS 
FPLUS 
CROSS 
FCROSS 
TRIGU 
FTRIGU 
TRIGD 
FTRIGD 
TRIGL 
FTRIGL 
TRIGR 
FTRIGR 
SAND 
FSAND 
WING 
FWING 
BEAM 
FBEAM 
BED 
FBED 
HIST 
FHIST 

Definition at line 76 of file QtDrawCanvas.qo.h.

anonymous enum [private]
Enumerator:
Margin 

Definition at line 188 of file QtDrawCanvas.qo.h.


Constructor & Destructor Documentation

casa::QtDrawCanvas::QtDrawCanvas ( QWidget *  parent = 0)

Member Function Documentation

void casa::QtDrawCanvas::drawBackBuffer ( QPainter *  )
void casa::QtDrawCanvas::drawCurves ( QPainter *  painter) [private]
void casa::QtDrawCanvas::drawGrid ( QPainter *  painter) [private]
void casa::QtDrawCanvas::drawImage ( const Matrix< uInt > &  data,
Matrix< uInt > *  mask 
)

template<class T>

void casa::QtDrawCanvas::drawImage ( const Matrix< uInt > &  data)
void casa::QtDrawCanvas::drawLabels ( QPainter *  painter) [private]
void casa::QtDrawCanvas::drawRects ( QPainter *  painter) [private]
void casa::QtDrawCanvas::drawTicks ( QPainter *  painter) [private]
void casa::QtDrawCanvas::drawWelcome ( QPainter *  painter) [private]
void casa::QtDrawCanvas::focusInEvent ( QFocusEvent *  event) [protected]

void setMarkMode(bool);

void casa::QtDrawCanvas::gotFocus ( ) [signal]
void casa::QtDrawCanvas::keyPressEvent ( QKeyEvent *  event) [protected]
void casa::QtDrawCanvas::mouseMoveEvent ( QMouseEvent *  event) [protected]
void casa::QtDrawCanvas::mousePressEvent ( QMouseEvent *  event) [protected]
void casa::QtDrawCanvas::mouseReleaseEvent ( QMouseEvent *  event) [protected]
void casa::QtDrawCanvas::paintEvent ( QPaintEvent *  event) [protected]
void casa::QtDrawCanvas::plotPolyLine ( const Vector< Int > &  ,
const Vector< Int > &  ,
int  ln = 0,
int  tp = 0,
int  cl = 0 
)

ln = 0, new chart ln < 0, remove trace ln > 0, append trace if ln exists, otherwise add trace tp = 0, continous line tp > 0, discrete symbols tp < 0, line and symbols cl, color value range from 0 up

void casa::QtDrawCanvas::plotPolyLine ( const Vector< Float > &  x,
const Vector< Float > &  y,
int  ln = 0,
int  tp = 0,
int  cl = 0 
)
void casa::QtDrawCanvas::plotPolyLine ( const Vector< Double > &  ,
const Vector< Double > &  ,
int  ln = 0,
int  tp = 0,
int  cl = 0 
)
void casa::QtDrawCanvas::plotPolyLine ( const Matrix< Int > &  verts,
int  ln = 0,
int  tp = 0,
int  cl = 0 
)

Each row is a trace ln = 0, new chart ln < 0, remove traces ln > 0, append traces from (ln)th, add if not exists tp < 0, same shape for all traces tp = 0, continuous lines tp > 0, different discrete shape for each trace cl > 0, different color for each trace cl <= 0, same color for all traces.

void casa::QtDrawCanvas::plotPolyLine ( const Matrix< Float > &  verts,
int  ln = 0,
int  tp = 0,
int  cl = 0 
)
void casa::QtDrawCanvas::plotPolyLine ( const Matrix< Double > &  verts,
int  ln = 0,
int  tp = 0,
int  cl = 0 
)
void casa::QtDrawCanvas::resizeEvent ( QResizeEvent *  event) [protected]
void casa::QtDrawCanvas::setCurveData ( int  id,
const CurveData  data,
int  tp = 0,
int  cl = 0 
)
void casa::QtDrawCanvas::setPixmap ( const QImage &  )
void casa::QtDrawCanvas::setTitle ( const QString &  text,
int  fontSize = 12,
int  color = 0,
const QString &  font = "Helvetica [Cronyx]" 
)
void casa::QtDrawCanvas::setWelcome ( const QString &  text,
int  fontSize = 14,
int  color = 1,
const QString &  font = "Helvetica [Cronyx]" 
)
void casa::QtDrawCanvas::setXLabel ( const QString &  text,
int  fontSize = 10,
int  color = 1,
const QString &  font = "Helvetica [Cronyx]" 
)
void casa::QtDrawCanvas::setYLabel ( const QString &  text,
int  fontSize = 10,
int  color = 2,
const QString &  font = "Helvetica [Cronyx]" 
)
void casa::QtDrawCanvas::wheelEvent ( QWheelEvent *  event) [protected]
void casa::QtDrawCanvas::zoomIn ( ) [slot]
void casa::QtDrawCanvas::zoomOut ( ) [slot]

Member Data Documentation

QPixmap casa::QtDrawCanvas::backBuffer [private]

Definition at line 213 of file QtDrawCanvas.qo.h.

std::map<int, int> casa::QtDrawCanvas::colorMap [private]

Definition at line 197 of file QtDrawCanvas.qo.h.

Definition at line 198 of file QtDrawCanvas.qo.h.

Definition at line 204 of file QtDrawCanvas.qo.h.

std::map<int, CurveData> casa::QtDrawCanvas::curveMap [private]

Definition at line 195 of file QtDrawCanvas.qo.h.

Definition at line 201 of file QtDrawCanvas.qo.h.

Definition at line 209 of file QtDrawCanvas.qo.h.

std::map<int, CurveData> casa::QtDrawCanvas::markerStack [private]

Definition at line 203 of file QtDrawCanvas.qo.h.

Definition at line 210 of file QtDrawCanvas.qo.h.

QPixmap casa::QtDrawCanvas::pixmap [private]

Definition at line 212 of file QtDrawCanvas.qo.h.

Definition at line 214 of file QtDrawCanvas.qo.h.

Definition at line 207 of file QtDrawCanvas.qo.h.

Definition at line 206 of file QtDrawCanvas.qo.h.

Definition at line 190 of file QtDrawCanvas.qo.h.

std::map<int, int> casa::QtDrawCanvas::typeMap [private]

Definition at line 196 of file QtDrawCanvas.qo.h.

Definition at line 193 of file QtDrawCanvas.qo.h.

Definition at line 191 of file QtDrawCanvas.qo.h.

Definition at line 192 of file QtDrawCanvas.qo.h.

Definition at line 200 of file QtDrawCanvas.qo.h.


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