53 #include <QDataStream>
54 #include <QListWidgetItem>
56 #include <QtAlgorithms>
71 : m_listWidget(listWidget)
96 foreach (qint16 index,
indexes()) {
202 qSort(keys.begin(), keys.end());
248 qint16 lastIndex = 0;
250 foreach (qint16 index, library.
m_symbols.keys()) {
251 if (index > lastIndex) {
258 stream.writeRawData(
"KXStitchSymbols", 15);
259 stream.setVersion(QDataStream::Qt_4_0);
263 if (stream.status() != QDataStream::Ok) {
292 stream.readRawData(magic, 15);
294 if (strncmp(magic,
"KXStitchSymbols", 15) == 0) {
295 stream.setVersion(QDataStream::Qt_4_0);
298 QMap<qint16, QPainterPath> paths_v100;
299 QList<qint16> paths_v100_keys;
306 if (stream.status() != QDataStream::Ok) {
317 stream >> paths_v100;
318 paths_v100_keys = paths_v100.keys();
320 foreach (qint16 index, paths_v100_keys) {
322 symbol.
setPath(paths_v100[index]);