GridBandedTableView Class

GridBandedTableView class is a variant of the view for the table data with complicated hierarchy of headers. More...

Header: #include <GridBandedTableView>
Inherits: GridTableView
Inherited By:

GridBandedTableViewVertical and GridBandedTreeView

Reimplemented Public Functions

virtual void addColumns() override
virtual GridColumn *getNextColumn(const GridColumn *anchor) const override
virtual GridColumn *getPrevColumn(const GridColumn *anchor) const override
virtual void navigateDown(Qt::KeyboardModifiers modifiers = Qt::NoModifier) override
virtual void navigateUp(Qt::KeyboardModifiers modifiers = Qt::NoModifier) override

Detailed Description

Banded view contains the usual columns, which are attached to the columns of the Qt model (as in the table view) and special columns known as bands. View can have an unlimited number of the bands. To an ordinary column appeared on the screen in this form of view, it should be added to the band column. One band column can contain multiple other bands. However, ordinary columns are located only in bands which do not holds other band columns. This scheme allows structured the headers of the tabulated data in a complex hierarchy.

Columns and bands can be dragged between the other bands and columns by changing their visual index and parent location. While dragging, view ensures that have not been violated the proportions of the columns and bands. An instance of the view is automatically created by grid once the type of view will be specifying - BandedTableView. So later to obtain the pointer to the view instance you must use the method of the grid Qtitan::GridBase::view() with the GridBandedTableView as a template parameter. For example:

Qtitan::Grid* grid = new Qtitan::Grid();
QSqlTableModel* model = new QSqlTableModel(...);
grid->setViewType(Qtitan::Grid::BandedTableView);
Qtitan::GridBandedTableView* view = grid->view<Qtitan::GridBandedTableView>();
view->setModel(model);

Member Function Documentation

[override virtual] void GridBandedTableView::addColumns()

[override virtual] GridColumn *GridBandedTableView::getNextColumn(const GridColumn *anchor) const

[override virtual] GridColumn *GridBandedTableView::getPrevColumn(const GridColumn *anchor) const