2015-12-01 16:24:51 +00:00
|
|
|
#ifndef APPLESTRING_H
|
|
|
|
#define APPLESTRING_H
|
|
|
|
|
|
|
|
#include <QVector>
|
|
|
|
#include <QChar>
|
|
|
|
#include <QString>
|
|
|
|
#include <QByteArray>
|
|
|
|
|
|
|
|
#include "util.h"
|
|
|
|
|
|
|
|
class AppleChar {
|
|
|
|
public:
|
|
|
|
AppleChar() { m_val = 0; }
|
|
|
|
AppleChar(quint8 ch) { m_val = ch; }
|
|
|
|
|
|
|
|
QChar printable() const;
|
|
|
|
|
|
|
|
TextAttribute getAttribute() const;
|
|
|
|
TextSet getTextSet() const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
quint8 m_val;
|
|
|
|
};
|
|
|
|
|
|
|
|
class AppleString : public QByteArray {
|
|
|
|
public:
|
2016-02-26 21:06:48 +00:00
|
|
|
void setData(const QByteArray &data) { insert(0,data); }
|
2015-12-01 16:24:51 +00:00
|
|
|
QString printable() const;
|
|
|
|
QVector<TextAttribute> attributes() const;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // APPLESTRING_H
|