4#ifndef DISTANCEFIELDMODEL_H
5#define DISTANCEFIELDMODEL_H
7#include <QAbstractListModel>
9#include <QtGui/qpainterpath.h>
10#include <QtGui/private/qtextengine_p.h>
12#include <QScopedPointer>
157 int rowCount(
const QModelIndex &parent = QModelIndex())
const override;
160 void setFont(
const QString &fileName);
169 return m_distanceFields.at(row);
174 return m_paths.at(row);
184 void error(
const QString &errorString);
191 void reserveSpace(quint16 glyphCount,
192 bool doubleResolution,
196 UnicodeRange unicodeRangeForUcs4(quint32 ucs4)
const;
200 QScopedPointer<QThread> m_workerThread;
201 quint16 m_glyphCount;
202 QList<QImage> m_distanceFields;
203 QList<QPainterPath> m_paths;
204 QMultiHash<UnicodeRange, glyph_t> m_glyphsPerUnicodeRange;
205 QHash<quint32, glyph_t> m_glyphsPerUcs4;
206 bool m_doubleGlyphResolution;
208 QMetaEnum m_rangeEnum;
int rowCount(const QModelIndex &parent=QModelIndex()) const override
Returns the number of rows under the given parent.
void error(const QString &errorString)
void setFont(const QString &fileName)
QImage distanceField(int row) const
QString nameForUnicodeRange(UnicodeRange range) const
~DistanceFieldModel() override
QList< glyph_t > glyphIndexesForUnicodeRange(UnicodeRange range) const
bool doubleGlyphResolution() const
QPainterPath path(int row) const
glyph_t glyphIndexForUcs4(quint32 ucs4) const
void distanceFieldGenerated()
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
Returns the data for the given role and section in the header with the specified orientation.
QList< UnicodeRange > unicodeRanges() const
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
Returns the data stored under the given role for the item referred to by the index.
void closeEvent(QCloseEvent *event) override
[21]
MainWindow(QWidget *parent=nullptr)
void open(const QString &path)
Combined button and popup list for selecting options.
#define ALIGN_OFFSET(offset)
static QT_BEGIN_NAMESPACE void openHelp()
#define PAD_BUFFER(buffer, size)
#define TO_FIXED_POINT(value)
quint32 checkSumAdjustment
quint32 boundingRectWidth
quint32 boundingRectHeight