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.
Constant | Value | Description |
---|---|---|
GridThemeManager::QuickButtonIcon | 1 | quick button icon |
GridThemeManager::FocusRowIndicatorIcon | 2 | icon of row that has a focus |
GridThemeManager::ColumnFilterToolIcon | 3 | icon of a filter tool button |
GridThemeManager::ColumnFilterToolBoldIcon | 4 | icon of a filter tool button if mouse is over button |
GridThemeManager::ColumnMenuToolIcon | 5 | icon of menu tool button |
GridThemeManager::SortAscendingIcon | 6 | ascending sort indicator |
GridThemeManager::SortDescendingIcon | 7 | descending sort indicator |
GridThemeManager::FrozenPinOnIcon | 8 | pin-on icon for row |
GridThemeManager::FrozenPinOffIcon | 9 | pin-off icon for row |
GridThemeManager::FrozenPlaceTopIcon | 10 | icon on button to select place for rows freezing on top |
GridThemeManager::FrozenPlaceBottomIcon | 11 | icon on button to select place for rows freezing on bottom |
GridThemeManager::DragDropBoxIcon | 12 | icon for drag-drop operation |
GridThemeManager::FocusRowEditIcon | 13 | icon designates a row in edit mode |
GridThemeManager::FocusRowEditModifyIcon | 14 | icon designates a modified row in edit mode |
GridThemeManager::FocusRowEditValidIcon | 15 | icon designates a modified and validated row in edit mode |
GridThemeManager::ZoomInIcon | 16 | zoom-in icon for context menu |
GridThemeManager::ZoomOutIcon | 17 | zoom-out icon for context menu |
GridThemeManager::NewRowIcon | 18 | icon designates a new row |
GridThemeManager::TextButtonIcon | 19 | icon for cell's button - Text |
GridThemeManager::ClearButtonIcon | 20 | icon for cell's button - Clear |
GridThemeManager::ChoiceButtonIcon | 21 | icon for cell's button - Choice |
GridThemeManager::SettingsButtonIcon | 22 | icon for cell's button - Settings |
GridThemeManager::SelectButtonIcon | 23 | icon for cell's button - Select |
GridThemeManager::FieldChooserIcon | 24 | field chooser icon for context menu |
GridThemeManager::GroupByBoxIcon | 25 | group by box icon for context menu |
GridThemeManager::GroupByColumnIcon | 26 | group by column icon for context menu |
GridThemeManager::AlignLeftIcon | 27 | align left icon for popup menu |
GridThemeManager::AlignCenterIcon | 28 | align center icon for context menu |
GridThemeManager::AlignRightIcon | 29 | align right icon for context menu |
GridThemeManager::FixedLeftIcon | 30 | fixed left icon for column's context menu |
GridThemeManager::FixedRightIcon | 31 | fixed right icon for column's context menu |
GridThemeManager::CheckBoxOnIcon | 32 | check on icon for check box in the grid's cell |
GridThemeManager::CheckBoxOffIcon | 33 | check off icon for check box in the grid's cell |
GridThemeManager::FilterCheckBoxOnIcon | 34 | check on icon for check box in the grid's column filter popup |
GridThemeManager::FilterCheckBoxOffIcon | 35 | check off icon for check box in the grid's column filter popup |
GridThemeManager::PreviewRowButtonExpand | 36 | expand row preview button |
GridThemeManager::PreviewRowButtonCollapse | 37 | collapse row preview button |
GridThemeManager::FilterAddConditionButton | 38 | add sign icon in the filtereEditor |
GridThemeManager::FilterEditorIcon | 39 | the filter editor icon |
GridThemeManager::FilterClearAllIcon | 40 | clear sign icon in the filter editor |
GridThemeManager::EditorPopupOk | 41 | regular icon for popup editor Ok button |
GridThemeManager::EditorPopupCancel | 42 | regular icon for popup editor Cancel button |
GridThemeManager::EditorPopupCross | 43 | regular 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.