Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

QWellArray Class Reference

Inheritance diagram for QWellArray:

Inheritance graph
[legend]
Collaboration diagram for QWellArray:

Collaboration graph
[legend]
List of all members.

Signals

void selected (int row, int col)

Public Member Functions

 QWellArray (QWidget *parent=0, const char *name=0, bool popup=FALSE)
 ~QWellArray ()
QString cellContent (int row, int col) const
int numCols ()
int numRows ()
int numCols () const
int numRows () const
int selectedColumn ()
int selectedRow ()
int selectedColumn () const
int selectedRow () const
virtual void setSelected (int row, int col)
void setCellSize (int w, int h)
QSize sizeHint () const
virtual void setDimension (int rows, int cols)
virtual void setCellBrush (int row, int col, const QBrush &)
QBrush cellBrush (int row, int col)

Protected Member Functions

virtual void setCurrent (int row, int col)
virtual void drawContents (QPainter *, int row, int col, const QRect &)
void drawContents (QPainter *)
void paintCell (QPainter *, int row, int col)
void mousePressEvent (QMouseEvent *)
void mouseReleaseEvent (QMouseEvent *)
void mouseMoveEvent (QMouseEvent *)
void keyPressEvent (QKeyEvent *)
void focusInEvent (QFocusEvent *)
void focusOutEvent (QFocusEvent *)

Properties

int numCols
int numRows
int selectedColumn
int selectedRow

Private Attributes

int curRow
int curCol
int selRow
int selCol
int nCols
int nRows
bool smallStyle
QWellArrayDatad

Constructor & Destructor Documentation

QWellArray::QWellArray QWidget *  parent = 0,
const char *  name = 0,
bool  popup = FALSE
 

Definition at line 169 of file qcolordialog.cpp.

References curCol, curRow, d, nCols, nRows, selCol, selRow, sizeHint(), smallStyle, and TRUE.

QWellArray::~QWellArray  )  [inline]
 

Definition at line 87 of file qcolordialog.cpp.


Member Function Documentation

QBrush QWellArray::cellBrush int  row,
int  col
 

Returns the brush set for the cell at row, col. If no brush is set, NoBrush is returned.

Definition at line 435 of file qcolordialog.cpp.

References QWellArrayData::brush, d, and nCols.

QString QWellArray::cellContent int  row,
int  col
const
 

void QWellArray::drawContents QPainter *  p  )  [protected]
 

Pass-through to QTableView::drawContents() to avoid hiding.

Reimplemented in QColorWell.

Definition at line 274 of file qcolordialog.cpp.

void QWellArray::drawContents QPainter *  p,
int  row,
int  col,
const QRect &  r
[protected, virtual]
 

Reimplement this function to change the contents of the well array.

Reimplemented in QColorWell.

Definition at line 282 of file qcolordialog.cpp.

References QWellArrayData::brush, d, and nCols.

Referenced by QColorWell::drawContents(), and paintCell().

void QWellArray::focusInEvent QFocusEvent *   )  [protected]
 

Definition at line 388 of file qcolordialog.cpp.

References curCol, and curRow.

void QWellArray::focusOutEvent QFocusEvent *   )  [protected]
 

Definition at line 447 of file qcolordialog.cpp.

References curCol, and curRow.

void QWellArray::keyPressEvent QKeyEvent *   )  [protected]
 

Definition at line 454 of file qcolordialog.cpp.

References curCol, curRow, FALSE, numCols(), numRows(), setCurrent(), setSelected(), smallStyle, and TRUE.

void QWellArray::mouseMoveEvent QMouseEvent *   )  [protected]
 

Reimplemented in QColorWell.

Definition at line 318 of file qcolordialog.cpp.

References pos, setCurrent(), and smallStyle.

Referenced by QColorWell::mouseMoveEvent().

void QWellArray::mousePressEvent QMouseEvent *   )  [protected]
 

Reimplemented in QColorWell.

Definition at line 298 of file qcolordialog.cpp.

References pos, and setCurrent().

Referenced by QColorWell::mousePressEvent().

void QWellArray::mouseReleaseEvent QMouseEvent *   )  [protected]
 

Reimplemented in QColorWell.

Definition at line 308 of file qcolordialog.cpp.

References curCol, curRow, and setSelected().

Referenced by QColorWell::mouseReleaseEvent().

int QWellArray::numCols  )  const [inline]
 

Definition at line 95 of file qcolordialog.cpp.

References nCols.

int QWellArray::numCols  )  [inline]
 

Definition at line 92 of file qcolordialog.cpp.

References nCols.

Referenced by keyPressEvent().

int QWellArray::numRows  )  const [inline]
 

Definition at line 96 of file qcolordialog.cpp.

References nRows.

int QWellArray::numRows  )  [inline]
 

Definition at line 93 of file qcolordialog.cpp.

References nRows.

Referenced by QColorWell::drawContents(), QColorWell::dropEvent(), keyPressEvent(), and QColorWell::mouseMoveEvent().

void QWellArray::paintCell QPainter *  ,
int  row,
int  col
[protected]
 

Definition at line 219 of file qcolordialog.cpp.

References curCol, curRow, drawContents(), g, selCol, selRow, smallStyle, t, and TRUE.

void QWellArray::selected int  row,
int  col
[signal]
 

Referenced by setSelected().

int QWellArray::selectedColumn  )  const [inline]
 

Definition at line 102 of file qcolordialog.cpp.

References selCol.

int QWellArray::selectedColumn  )  [inline]
 

Definition at line 99 of file qcolordialog.cpp.

References selCol.

Referenced by QColorWell::mousePressEvent().

int QWellArray::selectedRow  )  const [inline]
 

Definition at line 103 of file qcolordialog.cpp.

References selRow.

int QWellArray::selectedRow  )  [inline]
 

Definition at line 100 of file qcolordialog.cpp.

References selRow.

Referenced by QColorWell::mousePressEvent().

void QWellArray::setCellBrush int  row,
int  col,
const QBrush & 
[virtual]
 

Definition at line 414 of file qcolordialog.cpp.

References QWellArrayData::brush, d, nCols, nRows, and qWarning().

void QWellArray::setCellSize int  w,
int  h
[inline]
 

Definition at line 107 of file qcolordialog.cpp.

Referenced by QColorDialogPrivate::QColorDialogPrivate().

void QWellArray::setCurrent int  row,
int  col
[protected, virtual]
 

Definition at line 333 of file qcolordialog.cpp.

References curCol, and curRow.

Referenced by QColorWell::dragMoveEvent(), keyPressEvent(), QColorWell::mouseMoveEvent(), mouseMoveEvent(), and mousePressEvent().

void QWellArray::setDimension int  rows,
int  cols
[virtual]
 

Sets the size of the well array to be rows cells by cols. Resets any brush info set by setCellBrush().

Must be called by reimplementors.

Definition at line 400 of file qcolordialog.cpp.

References QWellArrayData::brush, d, nCols, and nRows.

Referenced by QColorWell::QColorWell().

void QWellArray::setSelected int  row,
int  col
[virtual]
 

Sets the currently selected cell to row, col. If row or col are less than zero, the current cell is unselected.

Does not set the position of the focus indicator.

Definition at line 360 of file qcolordialog.cpp.

References selCol, selected(), and selRow.

Referenced by keyPressEvent(), mouseReleaseEvent(), QColorDialogPrivate::newCustom(), and QColorDialogPrivate::newStandard().

QSize QWellArray::sizeHint  )  const
 

Definition at line 209 of file qcolordialog.cpp.

References f, nCols, and nRows.

Referenced by QWellArray().


Member Data Documentation

int QWellArray::curCol [private]
 

Definition at line 134 of file qcolordialog.cpp.

Referenced by focusInEvent(), focusOutEvent(), keyPressEvent(), mouseReleaseEvent(), paintCell(), QWellArray(), and setCurrent().

int QWellArray::curRow [private]
 

Definition at line 133 of file qcolordialog.cpp.

Referenced by focusInEvent(), focusOutEvent(), keyPressEvent(), mouseReleaseEvent(), paintCell(), QWellArray(), and setCurrent().

QWellArrayData* QWellArray::d [private]
 

Definition at line 140 of file qcolordialog.cpp.

Referenced by cellBrush(), drawContents(), QWellArray(), setCellBrush(), and setDimension().

int QWellArray::nCols [private]
 

Definition at line 137 of file qcolordialog.cpp.

Referenced by cellBrush(), drawContents(), numCols(), QWellArray(), setCellBrush(), setDimension(), and sizeHint().

int QWellArray::nRows [private]
 

Definition at line 138 of file qcolordialog.cpp.

Referenced by numRows(), QWellArray(), setCellBrush(), setDimension(), and sizeHint().

int QWellArray::selCol [private]
 

Definition at line 136 of file qcolordialog.cpp.

Referenced by paintCell(), QWellArray(), selectedColumn(), and setSelected().

int QWellArray::selRow [private]
 

Definition at line 135 of file qcolordialog.cpp.

Referenced by paintCell(), QWellArray(), selectedRow(), and setSelected().

bool QWellArray::smallStyle [private]
 

Definition at line 139 of file qcolordialog.cpp.

Referenced by keyPressEvent(), mouseMoveEvent(), paintCell(), and QWellArray().


Property Documentation

int QWellArray::numCols [read]
 

Definition at line 78 of file qcolordialog.cpp.

int QWellArray::numRows [read]
 

Definition at line 80 of file qcolordialog.cpp.

int QWellArray::selectedColumn [read]
 

Definition at line 81 of file qcolordialog.cpp.

int QWellArray::selectedRow [read]
 

Definition at line 82 of file qcolordialog.cpp.


The documentation for this class was generated from the following file:
Generated on Sat Nov 5 17:50:29 2005 for OPIE by  doxygen 1.4.2