kspread

KSpread::CellView Class Reference

Responsible for the painting of Cell. More...

#include <CellView.h>

List of all members.

Public Types

enum  Border {
  NoBorder = 0x0, LeftBorder = 0x1, RightBorder = 0x2, TopBorder = 0x4,
  BottomBorder = 0x8
}

Public Member Functions

 CellView (const CellView &other)
 CellView (SheetView *sheetView, int col, int row)
 ~CellView ()
qreal cellHeight () const
qreal cellWidth () const
bool dimensionFits () const
bool hitTestFilterButton (const Cell &cell, const QRect &cellRect, const QPoint &position) const
bool isObscured () const
QSize obscuredRange () const
bool obscuresCells () const
QPoint obscuringCell () const
CellViewoperator= (const CellView &)
void paintCellBackground (QPainter &painter, const QPointF &coordinate)
void paintCellBorders (const QRectF &paintRegion, QPainter &painter, const QPointF &coordinate, const QRect &cellRange, const Cell &cell, SheetView *sheetView)
void paintCellContents (const QRectF &paintRegion, QPainter &painter, QPaintDevice *paintDevice, const QPointF &coordinate, const Cell &cell, SheetView *sheetView)
void paintDefaultBorders (QPainter &painter, const QRectF &paintRegion, const QPointF &coordinate, Borders paintBorder, const QRect &cellRange, const Cell &cell, SheetView *sheetView)
Style style () const
QString testAnchor (const Cell &cell, qreal x, qreal y) const
qreal textHeight () const
QRectF textRect () const
qreal textWidth () const

Detailed Description

Responsible for the painting of Cell.

For each visible Cell exists a CellView, which is cached in the corresponding SheetView. If the content of a Cell has changed, the CellView will be destroyed and a new one will be created.

Definition at line 61 of file CellView.h.


Member Enumeration Documentation

Enumerator:
NoBorder 
LeftBorder 
RightBorder 
TopBorder 
BottomBorder 

Definition at line 70 of file CellView.h.


Constructor & Destructor Documentation

CellView::CellView ( SheetView sheetView,
int  col,
int  row 
)

Definition at line 153 of file CellView.cpp.

CellView::CellView ( const CellView other  ) 

Definition at line 250 of file CellView.cpp.

CellView::~CellView (  ) 

Definition at line 255 of file CellView.cpp.


Member Function Documentation

qreal CellView::cellHeight (  )  const

Definition at line 2313 of file CellView.cpp.

qreal CellView::cellWidth (  )  const

Definition at line 2318 of file CellView.cpp.

bool CellView::dimensionFits (  )  const

Definition at line 2323 of file CellView.cpp.

bool CellView::hitTestFilterButton ( const Cell cell,
const QRect cellRect,
const QPoint position 
) const

Definition at line 291 of file CellView.cpp.

bool CellView::isObscured (  )  const

Definition at line 2303 of file CellView.cpp.

QSize CellView::obscuredRange (  )  const
Returns:
the size of the obscured cell range
Note:
Used by SheetView to destroy the obscured CellViews.

Definition at line 2293 of file CellView.cpp.

bool CellView::obscuresCells (  )  const

Definition at line 2308 of file CellView.cpp.

QPoint CellView::obscuringCell (  )  const

Definition at line 2298 of file CellView.cpp.

CellView & CellView::operator= ( const CellView other  ) 

Assignment.

Definition at line 2328 of file CellView.cpp.

Style CellView::style (  )  const
Returns:
the style for the cell associated with this view

Definition at line 259 of file CellView.cpp.

QString CellView::testAnchor ( const Cell cell,
qreal  x,
qreal  y 
) const

Definition at line 279 of file CellView.cpp.

qreal CellView::textHeight (  )  const
Returns:
height of the text

Definition at line 269 of file CellView.cpp.

QRectF CellView::textRect (  )  const
Returns:
the rectangle the text covers

Definition at line 274 of file CellView.cpp.

qreal CellView::textWidth (  )  const
Returns:
width of the text

Definition at line 264 of file CellView.cpp.


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