GridThemeManager Class

GridThemeManager is used to customize rendering of the text, icons, background of the main parts of the grid. To get GridThemeManager from your code use the following snippet:. More...

Header: #include <GridThemeManager>

Public Types

enum IconKind { QuickButtonIcon, FocusRowIndicatorIcon, ColumnFilterToolIcon, ColumnFilterToolBoldIcon, ColumnMenuToolIcon, …, EditorPopupCross }

Public Functions

const QPixmap &getIcon(GridThemeManager::IconKind kind, const QSize &size) const
void setIcon(GridThemeManager::IconKind kind, const QPixmap &pixmap)
void setShadeBackground(const QPixmap &background)
void setShadeBackgroundBrush(const QBrush &background)
void setShadeColor(const QColor &color)
void setShadePalette(const QPalette &palette)
const QBrush &shadeBackgroundBrush() const
const QColor &shadeColor() const
QGradient shadeGradient(const QRect &rect)
const QPalette &shadePalette() const
const QPen &shadePen() const

Protected Functions

Detailed Description

Grid* grid = new Grid(parent);
GridThemeManager* themeManager = grid->themeManager();
themeManager->setShadeColor(color);

Member Type Documentation

enum GridThemeManager::IconKind

The enumerator describes a kind for an icons.

ConstantValueDescription
GridThemeManager::QuickButtonIcon1quick button icon
GridThemeManager::FocusRowIndicatorIcon2icon of row that has a focus
GridThemeManager::ColumnFilterToolIcon3icon of a filter tool button
GridThemeManager::ColumnFilterToolBoldIcon4icon of a filter tool button if mouse is over button
GridThemeManager::ColumnMenuToolIcon5icon of menu tool button
GridThemeManager::SortAscendingIcon6ascending sort indicator
GridThemeManager::SortDescendingIcon7descending sort indicator
GridThemeManager::FrozenPinOnIcon8pin-on icon for row
GridThemeManager::FrozenPinOffIcon9pin-off icon for row
GridThemeManager::FrozenPlaceTopIcon10icon on button to select place for rows freezing on top
GridThemeManager::FrozenPlaceBottomIcon11icon on button to select place for rows freezing on bottom
GridThemeManager::DragDropBoxIcon12icon for drag-drop operation
GridThemeManager::FocusRowEditIcon13icon designates a row in edit mode
GridThemeManager::FocusRowEditModifyIcon14icon designates a modified row in edit mode
GridThemeManager::FocusRowEditValidIcon15icon designates a modified and validated row in edit mode
GridThemeManager::ZoomInIcon16zoom-in icon for context menu
GridThemeManager::ZoomOutIcon17zoom-out icon for context menu
GridThemeManager::NewRowIcon18icon designates a new row
GridThemeManager::TextButtonIcon19icon for cell's button - Text
GridThemeManager::ClearButtonIcon20icon for cell's button - Clear
GridThemeManager::ChoiceButtonIcon21icon for cell's button - Choice
GridThemeManager::SettingsButtonIcon22icon for cell's button - Settings
GridThemeManager::SelectButtonIcon23icon for cell's button - Select
GridThemeManager::FieldChooserIcon24field chooser icon for context menu
GridThemeManager::GroupByBoxIcon25group by box icon for context menu
GridThemeManager::GroupByColumnIcon26group by column icon for context menu
GridThemeManager::AlignLeftIcon27align left icon for popup menu
GridThemeManager::AlignCenterIcon28align center icon for context menu
GridThemeManager::AlignRightIcon29align right icon for context menu
GridThemeManager::FixedLeftIcon30fixed left icon for column's context menu
GridThemeManager::FixedRightIcon31fixed right icon for column's context menu
GridThemeManager::CheckBoxOnIcon32check on icon for check box in the grid's cell
GridThemeManager::CheckBoxOffIcon33check off icon for check box in the grid's cell
GridThemeManager::FilterCheckBoxOnIcon34check on icon for check box in the grid's column filter popup
GridThemeManager::FilterCheckBoxOffIcon35check off icon for check box in the grid's column filter popup
GridThemeManager::PreviewRowButtonExpand36expand row preview button
GridThemeManager::PreviewRowButtonCollapse37collapse row preview button
GridThemeManager::FilterAddConditionButton38add sign icon in the filtereEditor
GridThemeManager::FilterEditorIcon39the filter editor icon
GridThemeManager::FilterClearAllIcon40clear sign icon in the filter editor
GridThemeManager::EditorPopupOk41regular icon for popup editor Ok button
GridThemeManager::EditorPopupCancel42regular icon for popup editor Cancel button
GridThemeManager::EditorPopupCross43regular icon for popup editor Cross button

Member Function Documentation

[protected] GridThemeManager::GridThemeManager()

Contructor of GridThemeManager. You can't create a class from your code directly.

const QPixmap &GridThemeManager::getIcon(GridThemeManager::IconKind kind, const QSize &size) const

Returns an icon by kind. Icon is processed before return, all of the pixels that have the value RED=0, GREEN=0, BLUE=0 are replaced by the shade color and then icon is scaled to size.

See also IconKind.

void GridThemeManager::setIcon(GridThemeManager::IconKind kind, const QPixmap &pixmap)

Sets a custom pixmap icon by kind. It is used to specify icon in run-time for various parts of the grid.

See also IconKind.

void GridThemeManager::setShadeBackground(const QPixmap &background)

Sets shade background pixmap for grid's panels.

void GridThemeManager::setShadeBackgroundBrush(const QBrush &background)

Sets shade background brush for grid's panels.

See also shadeBackgroundBrush().

void GridThemeManager::setShadeColor(const QColor &color)

Allows to specify a shade color for all items of the grid. This is effective when you want to adjust quickly the colors of grid's elements to the brand-color of your company. Shade color is used to generate a colored shade in icons.

See also shadeColor(), getIcon(), setIcon(), and shadePalette().

void GridThemeManager::setShadePalette(const QPalette &palette)

Allows you to fine-tune palette of different parts of the grid in order to better match your corporate style.

See also shadePalette().

const QBrush &GridThemeManager::shadeBackgroundBrush() const

Returns QPixmap that is based on shade color and used for rendering backgroud of group panel, field chooser, filter panel and etc.

See also setShadeBackgroundBrush().

const QColor &GridThemeManager::shadeColor() const

Returns a current shade color that used for rendering grid's elements.

See also setShadeColor().

QGradient GridThemeManager::shadeGradient(const QRect &rect)

Creates shade gradient based on shade color for the specific rectangle rect.

const QPalette &GridThemeManager::shadePalette() const

Returns a current shade palette that used for rendering grid's elements.

See also setShadePalette().

const QPen &GridThemeManager::shadePen() const

Returns QPen that is based on shade color.