GridViewOptions Class Reference

(Qtitan::GridViewOptions)

The GridViewOptions class intended for configuring the behavior and appearance of different parts of QtitanDataGrid. More...

    #include <Qtitan>

Inherits QObject.

Inherited by Qtitan::GridTableViewOptions.

Public Functions

GridViewOptions ( GridViewBase * view )
bool autoScroll () const
const QColor & backgroundColor () const
const QColor & borderColor () const
int borderWidth () const
const QFont & columnFont () const
const QPen & columnPen () const
bool groupsHeader () const
const QBrush & groupsHeaderBrush () const
const QString & groupsHeaderText () const
const QColor & groupsHeaderTextColor () const
bool isGroupSortEnabled () const
bool isSortEnabled () const
bool modelDecoration () const
bool rubberBandSelection () const
ScrollBarsMode scrollBars () const
GridScrollStyle scrollRowStyle () const
void setAutoScroll ( bool autoScroll )
void setBackgroundColor ( const QColor & color )
void setBorderColor ( const QColor & color )
void setBorderWidth ( int width )
void setColumnFont ( const QFont & font )
void setColumnPen ( const QPen & pen )
void setGroupSortEnabled ( bool enabled )
void setGroupsHeader ( bool groupsHeader )
void setGroupsHeaderBrush ( const QBrush & brush )
void setGroupsHeaderText ( const QString & text )
void setGroupsHeaderTextColor ( const QColor & color )
void setModelDecoration ( bool enabled )
void setRubberBandSelection ( bool enabled )
void setScrollBars ( ScrollBarsMode mode )
void setScrollRowStyle ( GridScrollStyle style )
void setSortEnabled ( bool enabled )
void setTransparent ( bool t )
bool transparent () const
  • 29 public functions inherited from QObject

Protected Functions

GridViewBase * view () const
  • 7 protected functions inherited from QObject

Additional Inherited Members

  • 1 property inherited from QObject
  • 1 public slot inherited from QObject
  • 1 signal inherited from QObject
  • 1 public variable inherited from QObject
  • 4 static public members inherited from QObject
  • 2 protected variables inherited from QObject

Detailed Description

The GridViewOptions class intended for configuring the behavior and appearance of different parts of QtitanDataGrid.

The settings stored in this class relate to all types of views supported by the grid. To change the settings related to a specific view of Qtitan::GridTableView or Qtitan::GridBandedTableView, use the Qtitan::GridTableViewOptions or Qtitan::GridBandedTableViewOptions classes respectively. The Qtitan::GridViewOptions class is used for spawning settings classes of specific views.

Member Function Documentation

GridViewOptions::GridViewOptions ( GridViewBase * view )

Constructor of the Qtitan::GridViewOptions class. The constructor is called automatically when a grid view is created.

bool GridViewOptions::autoScroll () const

Returns the status of the grid view horizontal autoscrolling when an attempt is made to move the grid column by dragging it by the boundary of the visible part.

See also setAutoScroll().

const QColor & GridViewOptions::backgroundColor () const

See also setBackgroundColor().

const QColor & GridViewOptions::borderColor () const

Returns the grid view border color. The default value is Qt::black.

See also setBorderColor().

int GridViewOptions::borderWidth () const

Returns the grid view border width (in pixels). The default value is 1px. The border color is set by the borderColor() function.

See also setBorderWidth().

const QFont & GridViewOptions::columnFont () const

Returns Font that is used for displaying text in grid columns.

See also setColumnFont().

const QPen & GridViewOptions::columnPen () const

Returns Pen, that is used for displaying text in grid columns.

See also setColumnPen().

bool GridViewOptions::groupsHeader () const

Returns the visibility value of the grid grouping panel.

See also setGroupsHeader().

const QBrush & GridViewOptions::groupsHeaderBrush () const

See also setGroupsHeaderBrush().

const QString & GridViewOptions::groupsHeaderText () const

See also setGroupsHeaderText().

const QColor & GridViewOptions::groupsHeaderTextColor () const

See also setGroupsHeaderTextColor().

bool GridViewOptions::isGroupSortEnabled () const

Returns the status of the flag enabling the user to sort by a column taking part in sorting.

bool GridViewOptions::isSortEnabled () const

Returns the status of the flag allowing the user to sort by a column.

bool GridViewOptions::modelDecoration () const

Returns the status of the flag allowing the use of decoration settings of the grid cells obtained from corresponding model roles, such as Qt::FontRole, Qt::DecorationRole, Qt::BackgroundRole and others. The default value is "false".

See also setModelDecoration().

bool GridViewOptions::rubberBandSelection () const

Returns the status of the flag allowing the use of RubberBand for cell or row multi-selection. The default value is "true".

See also setRubberBandSelection().

ScrollBarsMode GridViewOptions::scrollBars () const

Returns the scrollbar display mode value. The default value is Qtitan::ScrollAuto.

See also setScrollBars().

GridScrollStyle GridViewOptions::scrollRowStyle () const

Returns the grid row scrolling mode value. Two types of scrolling are supported: by row and by pixel.

See also setScrollRowStyle() and Qtitan::GridScrollStyle.

void GridViewOptions::setAutoScroll ( bool autoScroll )

Enables of disables the grid view horizontal autoscrolling when the grid is moved by the boundary of the visible part.

See also autoScroll().

void GridViewOptions::setBackgroundColor ( const QColor & color )

See also backgroundColor().

void GridViewOptions::setBorderColor ( const QColor & color )

Sets the grid view border color.

See also borderColor().

void GridViewOptions::setBorderWidth ( int width )

Sets the grid view border width in pixels. The border color is set by the setBorderColor() function.

See also borderWidth().

void GridViewOptions::setColumnFont ( const QFont & font )

Defines the Font that is used for displaying text in grid columns.

See also columnFont().

void GridViewOptions::setColumnPen ( const QPen & pen )

Defines the Pen that is used for displaying text in grid columns.

See also columnPen().

void GridViewOptions::setGroupSortEnabled ( bool enabled )

Sets the status of the flag allowing the user to sort by a column taking part in sorting.

See also isGroupSortEnabled().

void GridViewOptions::setGroupsHeader ( bool groupsHeader )

Sets the visibility status of the grid grouping panel.

See also groupsHeader().

void GridViewOptions::setGroupsHeaderBrush ( const QBrush & brush )

See also groupsHeaderBrush().

void GridViewOptions::setGroupsHeaderText ( const QString & text )

See also groupsHeaderText().

void GridViewOptions::setGroupsHeaderTextColor ( const QColor & color )

See also groupsHeaderTextColor().

void GridViewOptions::setModelDecoration ( bool enabled )

Sets the status of the flag allowing the use of decoration settings of the grid cells obtained from corresponding model roles, such as Qt::FontRole, Qt::DecorationRole, Qt::BackgroundRole and others.

See also modelDecoration().

void GridViewOptions::setRubberBandSelection ( bool enabled )

Sets the status of the flag allowing the use of RubberBand for cell or row multi-selection.

See also rubberBandSelection().

void GridViewOptions::setScrollBars ( ScrollBarsMode mode )

Sets the scrollbar display mode.

See also scrollBars().

void GridViewOptions::setScrollRowStyle ( GridScrollStyle style )

Sets the grid row scrolling mode. Two scrolling modes are supported: by row and by pixel.

See also scrollRowStyle() and Qtitan::GridScrollStyle.

void GridViewOptions::setSortEnabled ( bool enabled )

Sets the status of the flag allowing the user to sort by a column.

See also isSortEnabled().

void GridViewOptions::setTransparent ( bool t )

See also transparent().

bool GridViewOptions::transparent () const

See also setTransparent().

GridViewBase * GridViewOptions::view () const [protected]