67 && offsetColorCSS == -1 |
67 && offsetColorCSS == -1 |
68 && offsetLayoutIndexTable == -1; |
68 && offsetLayoutIndexTable == -1; |
69 } |
69 } |
70 }; |
70 }; |
71 |
71 |
|
72 struct HbParameterValueItem |
|
73 { |
|
74 HbParameterValueItem(qptrdiff offset, bool special = false) |
|
75 : offset(offset), special(special) {} |
|
76 qptrdiff offset; |
|
77 bool special; |
|
78 }; |
|
79 |
72 class HbOffsetMapBuilder |
80 class HbOffsetMapBuilder |
73 { |
81 { |
74 public: |
82 public: |
75 HbOffsetMapBuilder() {} |
83 HbOffsetMapBuilder() : mGlobalParameterOffset(-1) {} |
76 |
84 |
77 bool addWidgetOffsets(const QString &className, |
85 bool addWidgetOffsets(const QString &className, |
78 const QFileInfo *fileInfo, |
86 const QFileInfo *fileInfo, |
79 int offsets[]); |
87 qptrdiff offsets[]); |
80 bool addWidgetMLOffsets(const QString &fileName, |
88 bool addWidgetMLOffsets(const QString &fileName, |
81 quint32 classNameHash, |
89 quint32 classNameHash, |
82 const QList<LayoutItem> &layoutInfoList); |
90 const QList<LayoutItem> &layoutInfoList); |
|
91 bool addGlobalParameters(int zoomLevel, |
|
92 const QHash<QString, HbParameterValueItem> ¶meters); |
83 |
93 |
84 QByteArray result(); |
94 QByteArray result(); |
85 int size() const { return _mapItems.count(); } |
95 int size() const { return mMapItems.count(); } |
|
96 int globalParameterOffset() const { return mGlobalParameterOffset;} |
86 |
97 |
87 QList<HbBinMakerOffsetItem> items() const |
98 QList<HbBinMakerOffsetItem> items() const |
88 { |
99 { |
89 return _mapItems.values(); |
100 return mMapItems.values(); |
90 } |
101 } |
91 |
102 |
92 private: |
103 private: |
93 QMap<quint32, HbBinMakerOffsetItem> _mapItems; |
104 typedef QMap<quint32, QPair<QString, HbParameterValueItem> > ParameterMap; |
|
105 QMap<quint32, HbBinMakerOffsetItem> mMapItems; |
|
106 ParameterMap mParameters; |
|
107 int mGlobalParameterOffset; |
94 }; |
108 }; |
95 |
109 |
96 #endif // HBOFFSETMAPBUILDER_P_H |
110 #endif // HBOFFSETMAPBUILDER_P_H |