| 108 | } |
| 109 | |
| 110 | struct IconCacheEntry |
| 111 | { |
| 112 | explicit IconCacheEntry(const QByteArray &className_ = QByteArray()) |
| 113 | : className(className_) |
| 114 | { |
| 115 | } |
| 116 | |
| 117 | /// note: this member's data is being referenced by the database's key |
| 118 | QByteArray className; |
| 119 | int defaultIcon = -1; |
| 120 | |
| 121 | // pair of property name and expected string value |
| 122 | typedef QPair<QString, QString> PropertyPair; |
| 123 | // a list of property pairs |
| 124 | using PropertyMap = QVector<PropertyPair>; |
| 125 | // pair of icon and property map, for which this icon is valid |
| 126 | typedef QPair<int, PropertyMap> PropertyIcon; |
| 127 | using PropertyIcons = QVector<PropertyIcon>; |
| 128 | PropertyIcons propertyIcons; |
| 129 | }; |
| 130 | |
| 131 | /// maps latin1 class name to list of icons valid for a given property map |
| 132 | /// for performance reasons, the key is just a view of the contents of IconCacheEntry::className |