GridColumn Class

GridColumn represents the base class of the grid column that has a link to the data via dataBinding property. More...

Header: #include <GridColumn>
Inherits: GridColumnBase
Inherited By:

GridCardColumn and GridTableColumn

Public Types

enum CellButtonActivatePolicy { FixedPolicy, FluentFixedPolicy, MouseOverPolicy, FluentMouseOverPolicy, FocusPolicy, FluentFocusPolicy }
enum CellButtonIcon { ChoiceButtonIcon, SelectButtonIcon, ClearButtonIcon, TextButtonIcon }

Public Functions

int addButton(const QIcon &icon, Qtitan::ItemPosition position = Qtitan::AtEnd, GridColumn::CellButtonActivatePolicy policy = FixedPolicy, const QString &title = QString(), const QString &toolTip = QString(), int width = -1)
int addButton(GridColumn::CellButtonIcon buttonIcon = SelectButtonIcon, Qtitan::ItemPosition position = Qtitan::AtEnd, GridColumn::CellButtonActivatePolicy policy = FixedPolicy, const QString &title = QString(), const QString &toolTip = QString(), int width = -1)
int buttonCount() const
GridModelDataBinding *dataBinding() const
GridEditorRepository *editorRepository()
bool isCheckable() const
bool isChecked() const
bool removeButton(int index)
void setCheckable(bool checkable)
void setEditorRepository(GridEditorRepository *repository)

Public Slots

void setChecked(bool checked)

Signals

void toggled(bool checked)

Detailed Description

Member Type Documentation

enum GridColumn::CellButtonActivatePolicy

GridBase cell can contain, in addition to the cell editor, a set of custom buttons. The buttons are not associated with the editor at all and should be used for programming an additional behavior for cell. For example reset the cell value, or cause arbitrary dialogue and etc. Enumirator CellButtonActivatePolicy contains a policy is how to show this buttons.

ConstantValueDescription
GridColumn::FixedPolicy0Button is always displayed.
GridColumn::FluentFixedPolicy1Button is always displayed but at first time fluent effect is used.
GridColumn::MouseOverPolicy2Button instantly displayed when mouse is over the cell.
GridColumn::FluentMouseOverPolicy3Button instantly displayed when mouse is over the cell and fluent effect is used.
GridColumn::FocusPolicy4Button is displayed if cell has focus.
GridColumn::FluentFocusPolicy5Button is displayed if cell has focus and fluent effect is used.

enum GridColumn::CellButtonIcon

Enumerator describes the predefined icons for cell buttons.

ConstantValueDescription
GridColumn::ChoiceButtonIcon0Button with predefined choice icon.
GridColumn::SelectButtonIcon1Button with predefined select icon.
GridColumn::ClearButtonIcon2Button with predefined clear icon.
GridColumn::TextButtonIcon3Button with predefined text icon.

Member Function Documentation

int GridColumn::addButton(const QIcon &icon, Qtitan::ItemPosition position = Qtitan::AtEnd, GridColumn::CellButtonActivatePolicy policy = FixedPolicy, const QString &title = QString(), const QString &toolTip = QString(), int width = -1)

Adds button to the cell with the given icon, position, policy, title, toolTip and width in pixels.

int GridColumn::addButton(GridColumn::CellButtonIcon buttonIcon = SelectButtonIcon, Qtitan::ItemPosition position = Qtitan::AtEnd, GridColumn::CellButtonActivatePolicy policy = FixedPolicy, const QString &title = QString(), const QString &toolTip = QString(), int width = -1)

Adds button to the cell with the given buttonIcon, position, policy, title, toolTip and width in pixels.

int GridColumn::buttonCount() const

Returns the count of the cell buttons.

GridModelDataBinding *GridColumn::dataBinding() const

Returns the data binding that points to the model data.

GridEditorRepository *GridColumn::editorRepository()

Returns the editor repository that used to create editors for the column.

See also setEditorRepository().

bool GridColumn::removeButton(int index)

Removes the cell button by its index.

void GridColumn::setEditorRepository(GridEditorRepository *repository)

Sets the editor repository that will be used to create grid editors (GridEditor) for the column.

See also editorRepository().