GridEditorRepository Class

The GridEditorRepository class is a repository for the cell's editor. More...

Public Functions

virtual int heightForWidth(int width, const QVariant &value)
const QLocale &locale() const
void setLocale(const QLocale &locale)
QString valueToText(const QVariant &value)
virtual int widthForHeight(int height, const QVariant &value)

Protected Functions

virtual QString convertToText(const QVariant &value)

Detailed Description

Member Function Documentation

[virtual protected] QString GridEditorRepository::convertToText(const QVariant &value)

Converts the value to the string. You have to implement this function for custom repository to perform string operations (find, display, string highlighting) properly.

See also valueToText().

[virtual] int GridEditorRepository::heightForWidth(int width, const QVariant &value)

Returns height for the cell for the given width so that the value fits perfectly. You have to implement this function for custom repository to get 'row auto height' mode work correctly.

const QLocale &GridEditorRepository::locale() const

Returns the locale that used to control the display format of values in the cells.

See also setLocale.

void GridEditorRepository::setLocale(const QLocale &locale)

Allows you to set an arbitrary locale to control the display format of values in the cells.

See also locale.

QString GridEditorRepository::valueToText(const QVariant &value)

Returns the string that is representation of value. You can override the text conversion to match the value. For these purposes, use the signal GridViewBase::editorValueToText().

See also convertToText() and GridViewBase::editorConvertToText().

[virtual] int GridEditorRepository::widthForHeight(int height, const QVariant &value)

Returns width for the cell for the given height so that the value fits perfectly. You have to implement this function for custom repository to get 'best fit' mode work correctly.