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: |
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.
Constant | Value | Description |
---|---|---|
GridColumn::FixedPolicy | 0 | Button is always displayed. |
GridColumn::FluentFixedPolicy | 1 | Button is always displayed but at first time fluent effect is used. |
GridColumn::MouseOverPolicy | 2 | Button instantly displayed when mouse is over the cell. |
GridColumn::FluentMouseOverPolicy | 3 | Button instantly displayed when mouse is over the cell and fluent effect is used. |
GridColumn::FocusPolicy | 4 | Button is displayed if cell has focus. |
GridColumn::FluentFocusPolicy | 5 | Button is displayed if cell has focus and fluent effect is used. |
enum GridColumn::CellButtonIcon
Enumerator describes the predefined icons for cell buttons.
Constant | Value | Description |
---|---|---|
GridColumn::ChoiceButtonIcon | 0 | Button with predefined choice icon. |
GridColumn::SelectButtonIcon | 1 | Button with predefined select icon. |
GridColumn::ClearButtonIcon | 2 | Button with predefined clear icon. |
GridColumn::TextButtonIcon | 3 | Button 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().