Exemple #1
0
TQWidget *KWMapEditor::beginEdit(int row, int col, bool replace) {
	//kdDebug(2300) << "EDIT COLUMN " << col << endl;
	if (col != 2) {
		return TQTable::beginEdit(row, col, replace);
	}

	TQRect geo = cellGeometry(row, col);
	TQTextEdit *e = new InlineEditor(this, row, col);
	e->setText(text(row, col));
	e->move(mapToGlobal(geo.topLeft()));
	e->resize(geo.width() * 2, geo.height() * 3);
	e->show();
	return e;
}
Exemple #2
0
 inline void updateCell(int row, int column) { update(cellGeometry(row, column)); }
/*!
    Updates cell (\a row, \a column).

    \sa QWidget::update()
*/
void QGridView::updateCell( int row, int column )
{
    updateContents( cellGeometry( row, column ) );
}
/*!
    Ensures cell (\a row, \a column) is visible, scrolling the grid
    view if necessary.
*/
void QGridView::ensureCellVisible( int row, int column )
{
    QRect r = cellGeometry( row, column );
    ensureVisible( r.x(), r.y(), r.width(), r.height() );
}
/*!
    Repaints cell (\a row, \a column).

    If \a erase is TRUE, Qt erases the area of the cell before the
    paintCell() call; otherwise no erasing takes place.

    \sa QWidget::repaint()
*/
void QGridView::repaintCell( int row, int column, bool erase )
{
    repaintContents( cellGeometry( row, column ), erase );
}