Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

RegExpRole

A ProxyRole extracting data from a source role via a regular expression. More...

Import Statement: import Felgo 3.0
Since: Felgo 3.9.0
Inherits:

ProxyRole

Properties

Detailed Description

A RegExpRole is a ProxyRole that provides a role for each named capture group of its regular expression pattern.

In the following example, the date role of the source model will be extracted in 3 roles in the proxy moodel: year, month and day.

 SortFilterProxyModel {
     sourceModel: eventModel
     proxyRoles: RegExpRole {
         roleName: "date"
         pattern: "(?<year>\\d{4})-(?<month>\\d{2})-(?<day>\\d{2})"
     }
 }

Property Documentation

caseSensitivity : Qt::CaseSensitivity

This property holds the caseSensitivity of the regular expression.


pattern : QString

This property holds the pattern of the regular expression of this RegExpRole. The RegExpRole will expose a role for each of the named capture group of the pattern.


roleName : QString

This property holds the role name that the RegExpRole is using to query the source model's data to extract new roles from.


Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded