QtitanDataGrid is a unique product for the Qt development framework that absorbed the very best of its Delphi, C++ and plenty of other counterparts and now allows Qt developers to finally get a hold of the functionality they so badly needed in their applications. The product takes the basic functionality of the default Qt grid called QTableView to an entirely new level by offering dozens of handy functions and features any professional developer would be delighted to use in his or her daily work to facilitate routine operations and save time.
Interfaces created with the help of Qtitan DataGrid always look good and in line with the overall design of your application. Since Grid uses QStyle for rendering its own elements, you can rest assured that the resulting grid will look like an integral part of the application you are working on – and you won’t need to do anything achieve this!
Rows and cells
If you are looking for a non-standard color palette for your tables, this is also absolutely possible. Rows and columns can be rendered in different user-defined colors that may differ from the currently selected OS color scheme. Finally, you can specify the color of data rows and group rows on different grouping levels.
Qtitan DataGrid allows you to group your data by any column of the grid. Grouping can be enabled directly from the code or manually by dragging the column to the grouping pane. Grouping can have multiple nesting levels, but no less than the total number of columns minus 1. You can also lock or unlock specific columns for grouping.
The sorting mechanism is supported by Qtitan DataGrid by default and does not require any additional modifications of user-defined models. You can easily sort by any column, a set of columns and even by columns that are currently being used for grouping. To sort data by several columns, press and hold down the Control key during sorting. To cancel sorting by a specific column while preserving all other sorting criteria, press and hold down Shift during sorting.
Qtitan DataGrid supports two types of vertical scrolling. The web scroll mode uses per-pixel scrolling that is similar to what you see in a typical web browser - hence the name. The normal scroll mode scrolls data by rows and is mostly used for displaying tabular data.
Qtitan Grid comes with two built-in views for your convenience:
- Table View: columns are arranged one after another and can be moved around programmatically or manually using drag’n’drop.
- Banded Table View: columns can be joined into bands, can occupy more than one row and can be located one under another. You can change the column order and height either programmatically (from the code) or manually using drag’n’drop.
Automatic column width adjustment
Both Table View and Banded Table View support automatic adjustment of column width. This algorithm was written with usability and UI ergonomics in mind to minimize your involvement in the process and provide you with a clean, neat and good-looking output data grid that requires little to no changes. In the Banded Table View, if a column and a band have a single vertical border, it does matter what element is being changed. If the band width is changed, the width of each column or band within the parent band will be recalculated in the same proportion. If the column width is changed, it will only change the width of this column and the parent band. These techniques give developers more flexibility in terms of configuring data presentation in their applications.
Automatic row height adjustment
Apart from automatic column width adjustment, Qtitan Grid will also help you automatically change the height of grid rows. If this option is enabled, the component determines the maximum cell height in the grid and changes the height of all other cells to this value for an even, uniform look of the grid. For the Banded Table View, this function will be disabled if the number of occupied rows (RowSpan attribute) in either of the columns is more than 1.
Note that if you are using the per-pixel vertical scrolling mode (WebScrollStyle), the grid will have to calculate the height of each potentially visible row. If the number of rows is very high (over 1000, for instance), this may result in degraded performance and delays whenever the content or width of the grid cells is changed. We strongly recommend switching to the normal scrolling mode (NormalScrollStyle) in such cases.
The component now enables you to add fixed columns or bands to either side of the grid. These fixed elements cannot be scrolled horizontally and are always in the user’s visible area. These columns can only be dragged within the limits of their fixation area to prevent breaking the UI layout or column order recommended by the author of the program. When a summary is shown for a fixed column, summary cells are also fixed.
Qtitan DataGrid boasts a convenient summaries function that allows you to calculate and display column summaries. Summaries are calculated for grouped columns (Group Summary) and individual non-grouped columns – in this case, summaries are displayed on the footer panel and are called footer summaries.
The following summary types are supported by the Grid component:
- Min (minimal value in the column)
- Max (maximum value in the column)
- Sum (the sum of all column values)
- Count (the number of all column values)
- Avg (the average value of all column values)
Once the summary is calculated, you can change the output value or format the text to be shown in the summary cell. This possibility may come in handy if you want to make the result clearer for the end user – for instance, to add a currency identifier for all money amounts a column.
Field Chooser is a special window containing columns and bands (in the Banded Table View) that are not currently visible in the grid. You can easily drag columns (bands) from the Field Chooser to the grid and vice versa. The Field Chooser can be accessed from the code or using a popup menu.
Quick Choose is a button located to the left of columns or bands that opens a window with checkboxes that control the visibility of columns or bands. The button itself can be hidden and unhidden.
Being an advanced Qt component, Qtitan DataGrid features its own paint engine that facilitates the rendering of basic geometric primitives. The purpose of this engine is to increase the rendering speed of basic UI elements while preserving the same level of intuitiveness, clarity, expandability and readability of the framework. This intelligent engine only renders the elements that need to be updated at the moment and are in the visible area of the form, thus saving resources and providing end users with a much more enjoyable grid browsing experience. The parts that require substantial time for rendering can be buffered.
Just as in the case of a proprietary paint engine, Qtitan Grid relies on its own caching mechanism to avoid frequent connections to the data source. Quite a few standard models have their own cache by default, so Qtitan Grid’s cache is not required in such cases.
The cache engine in Qtitan Grid supports a number of operating modes:
- Cache by request. The cache is filled whenever the model data is requested by the grid – for instance, while scrolling, sorting and grouping.
- Cache immediately. The cache is loaded immediately after the model is connected to the grid controller. Once done, the cache is not used anymore and the grid works autonomously.
- No caching. The cache is not used in this mode. Data are pulled directly from the model.
Caching is disabled by default.
Qtitan was initially designed as a cross-platform library intended for desktop applications. The primary focus of developers was on code quality and functionality. QtitanDataGrid has been released for Windows, Linux and Mac OS X.