.
This commit is contained in:
@@ -8,7 +8,8 @@
|
||||
#include <QVariant>
|
||||
|
||||
|
||||
cBook::cBook(const QString &szTitle) :
|
||||
cBook::cBook(const QString &szTitle, QObject *parent) :
|
||||
QObject(parent),
|
||||
m_szTitle(szTitle),
|
||||
m_szSubtitle(""),
|
||||
m_szShortDescription(""),
|
||||
|
||||
@@ -12,7 +12,7 @@ class cBook : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
cBook(const QString& szTitle = "");
|
||||
explicit cBook(const QString& szTitle = "", QObject *parent = nullptr);
|
||||
|
||||
bool load();
|
||||
bool save();
|
||||
|
||||
+2
-1
@@ -6,7 +6,8 @@
|
||||
#include <QSqlError>
|
||||
|
||||
|
||||
cChapter::cChapter(qint32 iID) :
|
||||
cChapter::cChapter(qint32 iID, QObject *parent) :
|
||||
QObject(parent),
|
||||
m_iID(iID),
|
||||
m_lpPart(0),
|
||||
m_szName(""),
|
||||
|
||||
+3
-2
@@ -10,10 +10,11 @@
|
||||
#include <QObject>
|
||||
|
||||
|
||||
class cChapter
|
||||
class cChapter : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
cChapter(qint32 iID = -1);
|
||||
explicit cChapter(qint32 iID = -1, QObject *parent = nullptr);
|
||||
|
||||
void setID(const qint32& iID);
|
||||
qint32 id();
|
||||
|
||||
+310
@@ -0,0 +1,310 @@
|
||||
#include "ccharacter.h"
|
||||
|
||||
|
||||
cCharacter::cCharacter(qint32 iID, QObject *parent) :
|
||||
m_id(id),
|
||||
QObject(parent),
|
||||
m_bMainCharacter(false),
|
||||
m_szCreature(QString("")),
|
||||
m_gender(GENDER::GENDER_undefined),
|
||||
m_szTitle(QString("")),
|
||||
m_szFirstName(QString("")),
|
||||
m_szMiddleName(QString("")),
|
||||
m_szLastName(QString("")),
|
||||
m_szNickName(QString("")),
|
||||
m_dHeight(-1),
|
||||
m_dWeight(-1),
|
||||
m_dAge(-1),
|
||||
m_dateOfBirth(QDate(1, 1, 1)),
|
||||
m_szPlaceOfBirth(QString("")),
|
||||
m_dateOfDeath(QDate(1, 1, 1)),
|
||||
m_szPlaceOfDeath(QString("")),
|
||||
m_szHairColor(QString("")),
|
||||
m_szHairCut(QString("")),
|
||||
m_szHairLength(QString("")),
|
||||
m_szFigure(QString("")),
|
||||
m_szNature(QString("")),
|
||||
m_szSpokenLanguages(QString("")),
|
||||
m_szSkin(QString("")),
|
||||
m_szSchool(QString("")),
|
||||
m_szJob(QString("")),
|
||||
m_szDescription(QString(""))
|
||||
{
|
||||
}
|
||||
|
||||
void cCharacter::setID(const qint32& iID)
|
||||
{
|
||||
m_id = id;
|
||||
}
|
||||
|
||||
qint32 cCharacter::id()
|
||||
{
|
||||
return(m_id);
|
||||
}
|
||||
|
||||
void cCharacter::setMainCharacter(bool bMainCharacter)
|
||||
{
|
||||
m_bMainCharacter = bMainCharacter;
|
||||
}
|
||||
|
||||
bool cCharacter::mainCharacter()
|
||||
{
|
||||
return(m_bMainCharacter);
|
||||
}
|
||||
|
||||
void cCharacter::setCreature(const QString& szCreature)
|
||||
{
|
||||
m_szCreature = szCreature;
|
||||
}
|
||||
|
||||
QString cCharacter::creature()
|
||||
{
|
||||
return(m_szCreature);
|
||||
}
|
||||
|
||||
void cCharacter::setGender(GENDER gender)
|
||||
{
|
||||
m_gender = gender;
|
||||
}
|
||||
|
||||
GENDER cCharacter::gender()
|
||||
{
|
||||
return(gender);
|
||||
}
|
||||
|
||||
void cCharacter::setTitle(const QString& szTitle)
|
||||
{
|
||||
m_szTitle = szTitle;
|
||||
}
|
||||
|
||||
QString cCharacter::title()
|
||||
{
|
||||
return(m_szTitle);
|
||||
}
|
||||
|
||||
void cCharacter::setFirstName(const QString& szFirstName)
|
||||
{
|
||||
m_szFirstName = szFirstName;
|
||||
}
|
||||
|
||||
QString cCharacter::firstName()
|
||||
{
|
||||
return(m_szFirstName);
|
||||
}
|
||||
|
||||
void cCharacter::setMiddleName(const QString& szMiddleName)
|
||||
{
|
||||
m_szMiddleName = szMiddleName;
|
||||
}
|
||||
|
||||
QString cCharacter::middleName()
|
||||
{
|
||||
return(m_szMiddleName);
|
||||
}
|
||||
|
||||
void cCharacter::setLastName(const QString& szLastName)
|
||||
{
|
||||
m_szLastName = szLastName;
|
||||
}
|
||||
|
||||
QString cCharacter::lastName()
|
||||
{
|
||||
return(m_szLastName);
|
||||
}
|
||||
|
||||
void cCharacter::setNickName(const QString& szNickName)
|
||||
{
|
||||
m_szNickName = szNickName;
|
||||
}
|
||||
|
||||
QString cCharacter::nickName()
|
||||
{
|
||||
return(m_szNickName);
|
||||
}
|
||||
|
||||
void cCharacter::setHeight(qreal dHeight)
|
||||
{
|
||||
m_dHeight = dHeight;
|
||||
}
|
||||
|
||||
qreal cCharacter::height()
|
||||
{
|
||||
return(m_dHeight);
|
||||
}
|
||||
|
||||
void cCharacter::setWeight(qreal dWeight)
|
||||
{
|
||||
m_dWeight = dWeight;
|
||||
}
|
||||
|
||||
qreal cCharacter::weight()
|
||||
{
|
||||
return(m_dWeight);
|
||||
}
|
||||
|
||||
void cCharacter::setAge(qreal dAge)
|
||||
{
|
||||
m_dAge = dAge;
|
||||
}
|
||||
|
||||
qreal cCharacter::age()
|
||||
{
|
||||
return(m_dAge);
|
||||
}
|
||||
|
||||
void cCharacter::setDateOfBirth(const QDate& dateOfBirth)
|
||||
{
|
||||
m_dateOfBirth = dateOfBirth;
|
||||
}
|
||||
|
||||
QDateTime cCharacter::dateOfBirth()
|
||||
{
|
||||
return(m_dateOfBirth);
|
||||
}
|
||||
|
||||
void cCharacter::setPlaceOfBirth(const QString& szPlaceOfBirth)
|
||||
{
|
||||
m_szPlaceOfBirth = szPlaceOfBirth;
|
||||
}
|
||||
|
||||
QString cCharacter::placeOfBirth()
|
||||
{
|
||||
return(m_szPlaceOfBirth);
|
||||
}
|
||||
|
||||
void cCharacter::setDateOfDeath(const QDate& dateOfDeath)
|
||||
{
|
||||
m_dateOfDeath = dateOfDeath;
|
||||
}
|
||||
|
||||
QDateTime cCharacter::dateOfDeath()
|
||||
{
|
||||
return(m_dateOfDeath);
|
||||
}
|
||||
|
||||
void cCharacter::setPlaceOfDeath(const QString& szPlaceOfDeath)
|
||||
{
|
||||
m_szPlaceOfDeath = szPlaceOfDeath;
|
||||
}
|
||||
|
||||
QString cCharacter::placeOfDeath()
|
||||
{
|
||||
return(m_szPlaceOfDeath);
|
||||
}
|
||||
|
||||
void cCharacter::setHairColor(const QString& szHairColor)
|
||||
{
|
||||
m_szHairColor = szHairColor;
|
||||
}
|
||||
|
||||
QString cCharacter::hairColor()
|
||||
{
|
||||
return(m_szHairColor);
|
||||
}
|
||||
|
||||
void cCharacter::setHairCut(const QString& szHairCut)
|
||||
{
|
||||
m_szHairCut = szHairCut;
|
||||
}
|
||||
|
||||
QString cCharacter::hairCut()
|
||||
{
|
||||
return(m_szHairCut);
|
||||
}
|
||||
|
||||
void cCharacter::setHairLength(const QString& szHairLength)
|
||||
{
|
||||
m_szHairLength = szHairLength;
|
||||
}
|
||||
|
||||
QString cCharacter::hairLength()
|
||||
{
|
||||
return(m_szHairLength);
|
||||
}
|
||||
|
||||
void cCharacter::setFigure(const QString& szFigure)
|
||||
{
|
||||
m_szFigure = szFigure;
|
||||
}
|
||||
|
||||
QString cCharacter::figure()
|
||||
{
|
||||
return(m_szFigure);
|
||||
}
|
||||
|
||||
void cCharacter::setNature(const QString& szNature)
|
||||
{
|
||||
m_szNature = szNature;
|
||||
}
|
||||
|
||||
QString cCharacter::nature()
|
||||
{
|
||||
return(m_szNature);
|
||||
}
|
||||
|
||||
void cCharacter::setSpokenLanguages(const QString& szSpokenLanguages)
|
||||
{
|
||||
m_szSpokenLanguages = szSpokenLanguages;
|
||||
}
|
||||
|
||||
QString cCharacter::spokenLanguages()
|
||||
{
|
||||
return(m_szSpokenLanguages);
|
||||
}
|
||||
|
||||
void cCharacter::setSkin(const QString& szSkin)
|
||||
{
|
||||
m_szSkin = szSkin;
|
||||
}
|
||||
|
||||
QString cCharacter::skin()
|
||||
{
|
||||
return(m_szSkin);
|
||||
}
|
||||
|
||||
void cCharacter::setSchool(const QString& szSchool)
|
||||
{
|
||||
m_szSchool = szSchool;
|
||||
}
|
||||
|
||||
QString cCharacter::school()
|
||||
{
|
||||
return(m_szSchool);
|
||||
}
|
||||
|
||||
void cCharacter::setJob(const QString& szJob)
|
||||
{
|
||||
m_szJob = szJob;
|
||||
}
|
||||
|
||||
QString cCharacter::job()
|
||||
{
|
||||
return(m_szJob);
|
||||
}
|
||||
|
||||
void cCharacter::setDescription(const QString& szDescription)
|
||||
{
|
||||
m_szDescription = szDescription;
|
||||
}
|
||||
|
||||
QString cCharacter::description()
|
||||
{
|
||||
return(m_szDescription);
|
||||
}
|
||||
|
||||
bool cCharacterList::load()
|
||||
{
|
||||
cScene* lpScene = find(iID);
|
||||
|
||||
if(!lpScene)
|
||||
{
|
||||
lpScene = new cScene(iID);
|
||||
append(lpScene);
|
||||
}
|
||||
|
||||
return(lpScene);
|
||||
}
|
||||
|
||||
bool cCharacterList::save();
|
||||
cCharacter* cCharacterList::add(const qint32& iID);
|
||||
cCharacter* cCharacterList::find(const qint32& iID);
|
||||
+147
@@ -0,0 +1,147 @@
|
||||
#ifndef CCHARACTER_H
|
||||
#define CCHARACTER_H
|
||||
|
||||
|
||||
#include <QMetaType>
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
#include <QDateTime>
|
||||
#include <QColor>
|
||||
#include <QObject>
|
||||
|
||||
|
||||
class cCharacter : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
enum GENDER
|
||||
{
|
||||
GENDER_undefined = 0,
|
||||
GENDER_male = 1,
|
||||
GENDER_female = 2,
|
||||
};
|
||||
|
||||
explicit cCharacter(qint32 iID = -1, QObject *parent = nullptr);
|
||||
|
||||
void setID(const qint32& iID);
|
||||
qint32 id();
|
||||
|
||||
void setMainCharacter(bool bMainCharacter);
|
||||
bool mainCharacter();
|
||||
|
||||
void setCreature(const QString& szCreature);
|
||||
QString creature();
|
||||
|
||||
void setGender(GENDER gender);
|
||||
GENDER gender();
|
||||
|
||||
void setTitle(const QString& szTitle);
|
||||
QString title();
|
||||
|
||||
void setFirstName(const QString& szFirstName);
|
||||
QString firstName();
|
||||
|
||||
void setMiddleName(const QString& szMiddleName);
|
||||
QString middleName();
|
||||
|
||||
void setLastName(const QString& szLastName);
|
||||
QString lastName();
|
||||
|
||||
void setNickName(const QString& szNickName);
|
||||
QString nickName();
|
||||
|
||||
void setHeight(qreal dHeight);
|
||||
qreal height();
|
||||
|
||||
void setWeight(qreal dWeight);
|
||||
qreal weight();
|
||||
|
||||
void setAge(qreal dAge);
|
||||
qreal age();
|
||||
|
||||
void setDateOfBirth(const QDate& dateOfBirth);
|
||||
QDateTime dateOfBirth();
|
||||
|
||||
void setPlaceOfBirth(const QString& szPlaceOfBirth);
|
||||
QString placeOfBirth();
|
||||
|
||||
void setDateOfDeath(const QDate& dateOfDeath);
|
||||
QDateTime dateOfDeath();
|
||||
|
||||
void setPlaceOfDeath(const QString& szPlaceOfDeath);
|
||||
QString placeOfDeath();
|
||||
|
||||
void setHairColor(const QString& szHairColor);
|
||||
QString hairColor();
|
||||
|
||||
void setHairCut(const QString& szHairCut);
|
||||
QString hairCut();
|
||||
|
||||
void setHairLength(const QString& szHairLength);
|
||||
QString hairLength();
|
||||
|
||||
void setFigure(const QString& szFigure);
|
||||
QString figure();
|
||||
|
||||
void setNature(const QString& szNature);
|
||||
QString nature();
|
||||
|
||||
void setSpokenLanguages(const QString& szSpokenLanguages);
|
||||
QString spokenLanguages();
|
||||
|
||||
void setSkin(const QString& szSkin);
|
||||
QString skin();
|
||||
|
||||
void setSchool(const QString& szSchool);
|
||||
QString school();
|
||||
|
||||
void setJob(const QString& szJob);
|
||||
QString job();
|
||||
|
||||
void setDescription(const QString& szDescription);
|
||||
QString description();
|
||||
private:
|
||||
qint32 m_id;
|
||||
bool m_bMainCharacter;
|
||||
QString m_szCreature;
|
||||
GENDER m_gender;
|
||||
QString m_szTitle;
|
||||
QString m_szFirstName;
|
||||
QString m_szMiddleName;
|
||||
QString m_szLastName;
|
||||
QString m_szNickName;
|
||||
qreal m_dHeight;
|
||||
qreal m_dWeight;
|
||||
qreal m_dAge;
|
||||
QDate m_dateOfBirth;
|
||||
QString m_szPlaceOfBirth;
|
||||
QDate m_dateOfDeath;
|
||||
QString m_szPlaceOfDeath;
|
||||
QString m_szHairColor;
|
||||
QString m_szHairCut;
|
||||
QString m_szHairLength;
|
||||
QString m_szFigure;
|
||||
QString m_szNature;
|
||||
QString m_szSpokenLanguages;
|
||||
QString m_szSkin;
|
||||
QString m_szSchool;
|
||||
QString m_szJob;
|
||||
QString m_szDescription;
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(cCharacter*)
|
||||
|
||||
class cCharacterList : public QList<cCharacter*>
|
||||
{
|
||||
public:
|
||||
bool load();
|
||||
bool save();
|
||||
|
||||
cCharacter* add(const qint32& iID);
|
||||
cCharacter* find(const qint32& iID);
|
||||
};
|
||||
|
||||
#endif // CCHARACTER_H
|
||||
-1960
File diff suppressed because it is too large
Load Diff
@@ -1,212 +0,0 @@
|
||||
#ifndef CDOCUMENTREADER_H
|
||||
#define CDOCUMENTREADER_H
|
||||
|
||||
|
||||
#include <QXmlStreamReader>
|
||||
|
||||
#include <QFile>
|
||||
#include <QDomDocument>
|
||||
#include <QDomElement>
|
||||
#include <QDomNode>
|
||||
|
||||
#include <QFont>
|
||||
#include <QTextOption>
|
||||
#include <QTextFormat>
|
||||
#include <QBrush>
|
||||
#include <QColor>
|
||||
|
||||
#include <QTextTableCellFormat>
|
||||
#include <QTextTableFormat>
|
||||
#include <QTextImageFormat>
|
||||
#include <QTextFrameFormat>
|
||||
#include <QTextListFormat>
|
||||
#include <QTextBlockFormat>
|
||||
#include <QTextCharFormat>
|
||||
#include <QTextLayout>
|
||||
#include <QTextBlock>
|
||||
#include <QTextCursor>
|
||||
|
||||
#include <JlCompress.h>
|
||||
|
||||
|
||||
class cTextDocument;
|
||||
|
||||
class cTextFormat
|
||||
{
|
||||
public:
|
||||
enum TextFormatType
|
||||
{
|
||||
TextFormatTypeUnknown = 0,
|
||||
TextFormatTypeTableCell = 1,
|
||||
TextFormatTypeTable = 2,
|
||||
TextFormatTypeImage = 3,
|
||||
TextFormatTypeFrame = 4,
|
||||
TextFormatTypeList = 5,
|
||||
TextFormatTypeBlock = 6,
|
||||
TextFormatTypeChar = 7,
|
||||
};
|
||||
|
||||
cTextFormat(TextFormatType type = TextFormatTypeUnknown) : m_type(type) {}
|
||||
cTextFormat(const QString& szType) : m_type(TextFormatTypeUnknown)
|
||||
{
|
||||
if(szType.compare("tableCellFormat", Qt::CaseInsensitive))
|
||||
m_type = TextFormatTypeTableCell;
|
||||
else if(szType.compare("tableFormat", Qt::CaseInsensitive))
|
||||
m_type = TextFormatTypeTable;
|
||||
else if(szType.compare("imageFormat", Qt::CaseInsensitive))
|
||||
m_type = TextFormatTypeImage;
|
||||
else if(szType.compare("frameFormat", Qt::CaseInsensitive))
|
||||
m_type = TextFormatTypeFrame;
|
||||
else if(szType.compare("listFormat", Qt::CaseInsensitive))
|
||||
m_type = TextFormatTypeList;
|
||||
else if(szType.compare("blockFormat", Qt::CaseInsensitive))
|
||||
m_type = TextFormatTypeBlock;
|
||||
else if(szType.compare("charFormat", Qt::CaseInsensitive))
|
||||
m_type = TextFormatTypeChar;
|
||||
}
|
||||
|
||||
void setTableCellFormat(const QTextTableCellFormat& format)
|
||||
{
|
||||
tableCellFormat = format;
|
||||
m_type = TextFormatTypeTableCell;
|
||||
}
|
||||
void setTableFormat(const QTextTableFormat& format)
|
||||
{
|
||||
tableFormat = format;
|
||||
m_type = TextFormatTypeTable;
|
||||
}
|
||||
void setImageFormat(const QTextImageFormat& format)
|
||||
{
|
||||
imageFormat = format;
|
||||
m_type = TextFormatTypeImage;
|
||||
}
|
||||
void setFrameFormat(const QTextFrameFormat& format)
|
||||
{
|
||||
frameFormat = format;
|
||||
m_type = TextFormatTypeFrame;
|
||||
}
|
||||
void setListFormat(const QTextListFormat& format)
|
||||
{
|
||||
listFormat = format;
|
||||
m_type = TextFormatTypeList;
|
||||
}
|
||||
void setBlockFormat(const QTextBlockFormat& format)
|
||||
{
|
||||
blockFormat = format;
|
||||
m_type = TextFormatTypeBlock;
|
||||
}
|
||||
void setCharFormat(const QTextCharFormat& format)
|
||||
{
|
||||
charFormat = format;
|
||||
m_type = TextFormatTypeChar;
|
||||
}
|
||||
|
||||
bool isValid()
|
||||
{
|
||||
switch(m_type)
|
||||
{
|
||||
case TextFormatTypeTableCell:
|
||||
return(tableCellFormat.isValid());
|
||||
case TextFormatTypeTable:
|
||||
return(tableFormat.isValid());
|
||||
case TextFormatTypeImage:
|
||||
return(imageFormat.isValid());
|
||||
case TextFormatTypeFrame:
|
||||
return(frameFormat.isValid());
|
||||
case TextFormatTypeList:
|
||||
return(listFormat.isValid());
|
||||
case TextFormatTypeBlock:
|
||||
return(blockFormat.isValid());
|
||||
case TextFormatTypeChar:
|
||||
return(charFormat.isValid());
|
||||
case TextFormatTypeUnknown:
|
||||
return(false);
|
||||
}
|
||||
return(false);
|
||||
}
|
||||
|
||||
void setLayoutDirection(Qt::LayoutDirection layoutDirection)
|
||||
{
|
||||
switch(m_type)
|
||||
{
|
||||
case TextFormatTypeTableCell:
|
||||
tableCellFormat.setLayoutDirection(layoutDirection);
|
||||
break;
|
||||
case TextFormatTypeTable:
|
||||
tableFormat.setLayoutDirection(layoutDirection);
|
||||
break;
|
||||
case TextFormatTypeImage:
|
||||
imageFormat.setLayoutDirection(layoutDirection);
|
||||
break;
|
||||
case TextFormatTypeFrame:
|
||||
frameFormat.setLayoutDirection(layoutDirection);
|
||||
break;
|
||||
case TextFormatTypeList:
|
||||
listFormat.setLayoutDirection(layoutDirection);
|
||||
break;
|
||||
case TextFormatTypeBlock:
|
||||
blockFormat.setLayoutDirection(layoutDirection);
|
||||
break;
|
||||
case TextFormatTypeChar:
|
||||
charFormat.setLayoutDirection(layoutDirection);
|
||||
break;
|
||||
case TextFormatTypeUnknown:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
QTextTableCellFormat tableCellFormat;
|
||||
QTextTableFormat tableFormat;
|
||||
QTextImageFormat imageFormat;
|
||||
QTextFrameFormat frameFormat;
|
||||
QTextListFormat listFormat;
|
||||
QTextBlockFormat blockFormat;
|
||||
QTextCharFormat charFormat;
|
||||
TextFormatType m_type;
|
||||
};
|
||||
|
||||
class cDocumentReader : public QXmlStreamReader
|
||||
{
|
||||
public:
|
||||
cDocumentReader(const QString& szFileName, bool bZip = true);
|
||||
~cDocumentReader();
|
||||
|
||||
bool open();
|
||||
bool close();
|
||||
|
||||
cTextDocument* readDocument();
|
||||
private:
|
||||
bool m_bFirstBlock;
|
||||
bool m_bZip;
|
||||
QString m_szFileName;
|
||||
QFile m_file;
|
||||
QuaZip m_zip;
|
||||
QuaZipFile m_zipFile;
|
||||
|
||||
QMap<int, QTextList*> m_textLists;
|
||||
|
||||
void parseSettings(const QDomElement& element, cTextDocument* lpDocument);
|
||||
void parseDefaults(const QDomElement& element, cTextDocument* lpDocument);
|
||||
void parseTextBlock(const QDomElement& element, QTextCursor *lpCursor, const QVector<cTextFormat>& allFormats);
|
||||
|
||||
QVector<QTextLayout::FormatRange> parseTextFormats(const QDomElement& element);
|
||||
QTextLayout::FormatRange parseRange(const QDomElement& element);
|
||||
QFont parseFont(const QDomElement& element);
|
||||
QTextOption parseDefaultTextOption(const QDomElement& element);
|
||||
QList<QTextOption::Tab> parseTabPositions(const QDomElement& element);
|
||||
QVector<cTextFormat> parseAllFormats(const QDomElement& element);
|
||||
cTextFormat parseFormat(const QDomElement& element);
|
||||
QPen parsePen(const QDomElement& element);
|
||||
QBrush parseBrush(const QDomElement& element);
|
||||
QColor parseColor(const QDomElement& element);
|
||||
|
||||
QTextTableCellFormat parseTextTableCellFormat(const QDomElement& element);
|
||||
QTextTableFormat parseTextTableFormat(const QDomElement& element);
|
||||
QTextImageFormat parseTextImageFormat(const QDomElement& element);
|
||||
QTextFrameFormat parseTextFrameFormat(const QDomElement& element);
|
||||
QTextListFormat parseTextListFormat(const QDomElement& element);
|
||||
QTextBlockFormat parseTextBlockFormat(const QDomElement& element);
|
||||
QTextCharFormat parseTextCharFormat(const QDomElement& element);
|
||||
};
|
||||
|
||||
#endif // CDOCUMENTREADER_H
|
||||
@@ -1,688 +0,0 @@
|
||||
#include "cdocumentwriter.h"
|
||||
#include "ctextdocument.h"
|
||||
|
||||
#include <QFileInfo>
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
|
||||
cDocumentWriter::cDocumentWriter(const QString &szFileName, bool bZip) :
|
||||
m_bZip(bZip),
|
||||
m_szFileName(szFileName),
|
||||
m_lpDocument(0)
|
||||
{
|
||||
QFileInfo fileInfo(szFileName);
|
||||
m_szPath = fileInfo.absolutePath();
|
||||
}
|
||||
|
||||
cDocumentWriter::~cDocumentWriter()
|
||||
{
|
||||
close();
|
||||
}
|
||||
|
||||
bool cDocumentWriter::open()
|
||||
{
|
||||
if(m_szFileName.isEmpty())
|
||||
return(false);
|
||||
|
||||
if(m_bZip)
|
||||
{
|
||||
m_zip.setZipName(m_szFileName);
|
||||
m_zip.open(QuaZip::mdCreate);
|
||||
|
||||
QuaZipNewInfo info("document.xml");
|
||||
m_zipFile.setZip(&m_zip);
|
||||
|
||||
if(!m_zipFile.open(QIODevice::WriteOnly, info))
|
||||
{
|
||||
m_zip.close();
|
||||
return(false);
|
||||
}
|
||||
|
||||
setDevice(&m_zipFile);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_file.setFileName(m_szFileName);
|
||||
if(!m_file.open(QIODevice::WriteOnly | QFile::Text))
|
||||
return(false);
|
||||
|
||||
setDevice(&m_file);
|
||||
}
|
||||
|
||||
setAutoFormatting(true);
|
||||
setAutoFormattingIndent(-1);
|
||||
writeStartDocument();
|
||||
writeStartElement("document");
|
||||
|
||||
return(true);
|
||||
}
|
||||
|
||||
bool cDocumentWriter::close()
|
||||
{
|
||||
if(m_bZip)
|
||||
{
|
||||
if(m_zipFile.isOpen())
|
||||
{
|
||||
writeEndElement();
|
||||
writeEndDocument();
|
||||
m_zipFile.close();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(m_file.isOpen())
|
||||
{
|
||||
writeEndElement();
|
||||
writeEndDocument();
|
||||
m_file.close();
|
||||
}
|
||||
}
|
||||
|
||||
return(true);
|
||||
}
|
||||
|
||||
bool cDocumentWriter::writeDocument(cTextDocument *lpDocument)
|
||||
{
|
||||
m_lpDocument = lpDocument;
|
||||
|
||||
QList<QPair<int, QTextBlockFormat>> textBlockFormats;
|
||||
QTextBlock textBlock = lpDocument->firstBlock();
|
||||
|
||||
while(textBlock.isValid())
|
||||
{
|
||||
int x;
|
||||
for(x = 0;x < textBlockFormats.count();x++)
|
||||
{
|
||||
if(textBlockFormats[x].first == textBlock.blockFormatIndex())
|
||||
break;
|
||||
}
|
||||
if(x >= textBlockFormats.count())
|
||||
textBlockFormats.append(QPair<int, QTextBlockFormat>(textBlock.blockFormatIndex(), textBlock.blockFormat()));
|
||||
|
||||
textBlock = textBlock.next();
|
||||
}
|
||||
|
||||
writeStartElement("documentSettings");
|
||||
writeAttribute("documentMargin", QString::number(lpDocument->documentMargin()));
|
||||
writeAttribute("indentWidth", QString::number(lpDocument->indentWidth()));
|
||||
writeAttribute("textWidth", QString::number(lpDocument->textWidth()));
|
||||
writeAttribute("useDesignMetrics", lpDocument->useDesignMetrics() == true ? "true" : "false");
|
||||
|
||||
writeStartElement("metaInformation");
|
||||
writeAttribute("documentTitle", lpDocument->metaInformation(QTextDocument::DocumentTitle));
|
||||
writeAttribute("documentUrl", lpDocument->metaInformation(QTextDocument::DocumentUrl));
|
||||
writeEndElement();
|
||||
|
||||
writeStartElement("baseUrl");
|
||||
writeAttribute("authority", lpDocument->baseUrl().authority());
|
||||
writeAttribute("fragment", lpDocument->baseUrl().fragment());
|
||||
writeAttribute("host", lpDocument->baseUrl().host());
|
||||
writeAttribute("password", lpDocument->baseUrl().password());
|
||||
writeAttribute("path", lpDocument->baseUrl().path());
|
||||
writeAttribute("port", QString::number(lpDocument->baseUrl().port()));
|
||||
writeAttribute("query", lpDocument->baseUrl().query());
|
||||
writeAttribute("scheme", lpDocument->baseUrl().scheme());
|
||||
writeAttribute("url", lpDocument->baseUrl().url());
|
||||
writeAttribute("userInfo", lpDocument->baseUrl().userInfo());
|
||||
writeAttribute("userName", lpDocument->baseUrl().userName());
|
||||
writeEndElement();
|
||||
|
||||
writeStartElement("pageSize");
|
||||
writeAttribute("width", QString::number(lpDocument->pageSize().width()));
|
||||
writeAttribute("height", QString::number(lpDocument->pageSize().height()));
|
||||
writeEndElement();
|
||||
writeEndElement();
|
||||
|
||||
writeStartElement("defaults");
|
||||
writeAttribute("defaultCursorMoveStyle", QString::number(lpDocument->defaultCursorMoveStyle()));
|
||||
writeAttribute("defaultStyleSheet", lpDocument->defaultStyleSheet());
|
||||
|
||||
writeStartElement("defaultFont");
|
||||
writeFont(lpDocument->defaultFont());
|
||||
writeEndElement();
|
||||
|
||||
writeStartElement("defaultTextOption");
|
||||
writeTextOption(lpDocument->defaultTextOption());
|
||||
writeEndElement();
|
||||
writeEndElement();
|
||||
|
||||
writeFormats(lpDocument->allFormats());
|
||||
writeTextBlockFormats(textBlockFormats);
|
||||
|
||||
textBlock = lpDocument->firstBlock();
|
||||
writeTextBlocks(textBlock);
|
||||
|
||||
return(true);
|
||||
}
|
||||
|
||||
void cDocumentWriter::writeTextBlockFormats(const QList<QPair<int, QTextBlockFormat>> textBlockFormats)
|
||||
{
|
||||
writeStartElement("textBlockFormats");
|
||||
for(int x = 0;x < textBlockFormats.count();x++)
|
||||
{
|
||||
writeStartElement("format");
|
||||
writeFormat(textBlockFormats[x].second, textBlockFormats[x].first);
|
||||
writeEndElement();
|
||||
}
|
||||
writeEndElement();
|
||||
}
|
||||
|
||||
void cDocumentWriter::writeTextBlocks(QTextBlock& textBlock)
|
||||
{
|
||||
writeStartElement("textBlocks");
|
||||
while(textBlock.isValid())
|
||||
{
|
||||
writeStartElement("textBlock");
|
||||
writeTextBlock(textBlock);
|
||||
writeEndElement();
|
||||
textBlock = textBlock.next();
|
||||
}
|
||||
writeEndElement();
|
||||
}
|
||||
|
||||
#include <QTextList>
|
||||
#include <QTextTable>
|
||||
|
||||
void cDocumentWriter::writeTextBlock(const QTextBlock& textBlock)
|
||||
{
|
||||
QTextCursor cursor(textBlock);
|
||||
QTextList* lpTextList = cursor.currentList();
|
||||
QTextTable* lpTextTable = cursor.currentTable();
|
||||
|
||||
writeAttribute("blockFormatIndex", QString::number(textBlock.blockFormatIndex()));
|
||||
writeAttribute("charFormatIndex", QString::number(textBlock.charFormatIndex()));
|
||||
writeAttribute("listFormatIndex", QString::number(lpTextList == 0 ? -1 : lpTextList->formatIndex()));
|
||||
writeAttribute("tableFormatIndex", QString::number(lpTextTable == 0 ? -1 : lpTextTable->formatIndex()));
|
||||
|
||||
QVector<QTextLayout::FormatRange> textFormats = textBlock.textFormats();
|
||||
writeStartElement("textFormats");
|
||||
for(int x = 0;x < textFormats.count();x++)
|
||||
{
|
||||
QTextLayout::FormatRange range = textFormats[x];
|
||||
QTextCharFormat format = range.format;
|
||||
writeStartElement("range");
|
||||
writeAttribute("start", QString::number(range.start));
|
||||
writeAttribute("length", QString::number(range.length));
|
||||
writeTextCharFormat((QTextCharFormat*)&format, -1, WriteAttribute);
|
||||
writeTextFormat((QTextFormat*)&format, -1, WriteAll);
|
||||
writeTextCharFormat((QTextCharFormat*)&format, -1, WriteElements);
|
||||
writeEndElement();
|
||||
}
|
||||
writeEndElement();
|
||||
|
||||
writeTextElement("text", textBlock.text());
|
||||
}
|
||||
|
||||
void cDocumentWriter::writeColor(QColor color)
|
||||
{
|
||||
writeAttribute("alpha", QString::number(color.alpha()));
|
||||
writeAttribute("r", QString::number(color.red()));
|
||||
writeAttribute("g", QString::number(color.green()));
|
||||
writeAttribute("b", QString::number(color.blue()));
|
||||
}
|
||||
|
||||
void cDocumentWriter::writeGradient(const QGradient* lpGradient)
|
||||
{
|
||||
writeAttribute("type", QString::number(lpGradient->type()));
|
||||
writeTextElement("spread", QString::number(lpGradient->spread()));
|
||||
|
||||
for(int x = 0;x < lpGradient->stops().count();x++)
|
||||
{
|
||||
writeStartElement("stop");
|
||||
writeAttribute("pos", QString::number(lpGradient->stops()[x].first));
|
||||
|
||||
writeStartElement("color");
|
||||
writeColor(lpGradient->stops()[x].second);
|
||||
writeEndElement();
|
||||
|
||||
writeEndElement();
|
||||
}
|
||||
}
|
||||
|
||||
void cDocumentWriter::writePen(const QPen& pen)
|
||||
{
|
||||
writeAttribute("capStyle", QString::number(pen.capStyle()));
|
||||
writeAttribute("dashOffset", QString::number(pen.dashOffset()));
|
||||
writeAttribute("isCosmetic", pen.isCosmetic() == true ? "true" : "false");
|
||||
writeAttribute("joinStyle", QString::number(pen.joinStyle()));
|
||||
writeAttribute("miterLimit", QString::number(pen.miterLimit()));
|
||||
writeAttribute("style", QString::number(pen.style()));
|
||||
writeAttribute("width", QString::number(pen.width()));
|
||||
writeAttribute("widthF", QString::number(pen.widthF()));
|
||||
|
||||
writeStartElement("brush");
|
||||
writeBrush(pen.brush());
|
||||
writeEndElement();
|
||||
|
||||
writeStartElement("color");
|
||||
writeColor(pen.color());
|
||||
writeEndElement();
|
||||
|
||||
if(pen.dashPattern().count())
|
||||
{
|
||||
writeStartElement("dashPattern");
|
||||
for(int x = 0;x < pen.dashPattern().count();x++)
|
||||
writeTextElement("pattern", QString::number(pen.dashPattern()[x]));
|
||||
writeEndElement();
|
||||
}
|
||||
}
|
||||
|
||||
void cDocumentWriter::writeBrush(const QBrush& brush)
|
||||
{
|
||||
writeAttribute("style", QString::number(brush.style()));
|
||||
|
||||
writeStartElement("color");
|
||||
writeColor(brush.color());
|
||||
writeEndElement();
|
||||
|
||||
if(brush.gradient())
|
||||
{
|
||||
writeStartElement("gradient");
|
||||
writeGradient(brush.gradient());
|
||||
writeEndElement();
|
||||
}
|
||||
|
||||
//matrix
|
||||
//texture oder textureImage
|
||||
}
|
||||
|
||||
void cDocumentWriter::writeFont(const QFont& font)
|
||||
{
|
||||
writeAttribute("bold", font.bold() == true ? "true" : "false");
|
||||
writeAttribute("capitalization", QString::number(font.capitalization()));
|
||||
// writeAttribute("defaultFamily", font.defaultFamily());
|
||||
// writeAttribute("exactMatch", font.exactMatch() == true ? "true" : "false");
|
||||
writeAttribute("family", font.family());
|
||||
writeAttribute("fixedPitch", font.fixedPitch() == true ? "true" : "false");
|
||||
writeAttribute("hintingPreference", QString::number(font.hintingPreference()));
|
||||
writeAttribute("italic", font.italic() == true ? "true" : "false");
|
||||
writeAttribute("kerning", font.kerning() == true ? "true" : "false");
|
||||
writeAttribute("letterSpacing", QString::number(font.letterSpacing()));
|
||||
writeAttribute("letterSpacingType", QString::number(font.letterSpacingType()));
|
||||
writeAttribute("overline", QString::number(font.overline()));
|
||||
writeAttribute("pixelSize", QString::number(font.pixelSize()));
|
||||
writeAttribute("pointSize", QString::number(font.pointSize()));
|
||||
writeAttribute("pointSizeF", QString::number(font.pointSizeF()));
|
||||
writeAttribute("stretch", QString::number(font.stretch()));
|
||||
writeAttribute("strikeOut", font.strikeOut() == true ? "true" : "false");
|
||||
writeAttribute("style", QString::number(font.style()));
|
||||
writeAttribute("styleHint", QString::number(font.styleHint()));
|
||||
writeAttribute("styleName", font.styleName());
|
||||
writeAttribute("styleStrategy", QString::number(font.styleStrategy()));
|
||||
writeAttribute("underline", font.underline() == true ? "true" : "false");
|
||||
writeAttribute("weight", QString::number(font.weight()));
|
||||
writeAttribute("wordSpacing", QString::number(font.wordSpacing()));
|
||||
}
|
||||
|
||||
void cDocumentWriter::writeFormat(const QTextFormat& textFormat, int id)
|
||||
{
|
||||
writeAttribute("type", QString::number(textFormat.type()));
|
||||
|
||||
if(textFormat.isTableCellFormat())
|
||||
{
|
||||
writeAttribute("typeText", "tableCellFormat");
|
||||
writeTextTableCellFormat((QTextTableCellFormat*)&textFormat, id, WriteAttribute);
|
||||
writeTextCharFormat((QTextCharFormat*)&textFormat, id, WriteAttribute);
|
||||
writeTextFormat((QTextFormat*)&textFormat, id, WriteAll);
|
||||
writeTextTableCellFormat((QTextTableCellFormat*)&textFormat, id, WriteElements);
|
||||
writeTextCharFormat((QTextCharFormat*)&textFormat, id, WriteElements);
|
||||
}
|
||||
else if(textFormat.isTableFormat())
|
||||
{
|
||||
writeAttribute("typeText", "tableFormat");
|
||||
writeTextTableFormat((QTextTableFormat*)&textFormat, id, WriteAttribute);
|
||||
writeTextFrameFormat((QTextFrameFormat*)&textFormat, id, WriteAttribute);
|
||||
writeTextFormat((QTextFormat*)&textFormat, id, WriteAll);
|
||||
writeTextTableFormat((QTextTableFormat*)&textFormat, id, WriteElements);
|
||||
writeTextFrameFormat((QTextFrameFormat*)&textFormat, id, WriteElements);
|
||||
}
|
||||
else if(textFormat.isImageFormat())
|
||||
{
|
||||
writeAttribute("typeText", "imageFormat");
|
||||
writeTextImageFormat((QTextImageFormat*)&textFormat, id, WriteAttribute);
|
||||
writeTextCharFormat((QTextCharFormat*)&textFormat, id, WriteAttribute);
|
||||
writeTextFormat((QTextFormat*)&textFormat, id, WriteAll);
|
||||
writeTextImageFormat((QTextImageFormat*)&textFormat, id, WriteElements);
|
||||
writeTextCharFormat((QTextCharFormat*)&textFormat, id, WriteElements);
|
||||
}
|
||||
else if(textFormat.isFrameFormat())
|
||||
{
|
||||
writeAttribute("typeText", "frameFormat");
|
||||
writeTextFrameFormat((QTextFrameFormat*)&textFormat, id, WriteAttribute);
|
||||
writeTextFormat((QTextFormat*)&textFormat, id, WriteAll);
|
||||
writeTextFrameFormat((QTextFrameFormat*)&textFormat, id, WriteElements);
|
||||
}
|
||||
else if(textFormat.isListFormat())
|
||||
{
|
||||
writeAttribute("typeText", "listFormat");
|
||||
writeTextListFormat((QTextListFormat*)&textFormat, id, WriteAttribute);
|
||||
writeTextFormat((QTextFormat*)&textFormat, id, WriteAll);
|
||||
writeTextListFormat((QTextListFormat*)&textFormat, id, WriteElements);
|
||||
}
|
||||
else if(textFormat.isBlockFormat())
|
||||
{
|
||||
writeAttribute("typeText", "blockFormat");
|
||||
writeTextBlockFormat((QTextBlockFormat*)&textFormat, id, WriteAttribute);
|
||||
writeTextFormat((QTextFormat*)&textFormat, id, WriteAll);
|
||||
writeTextBlockFormat((QTextBlockFormat*)&textFormat, id, WriteElements);
|
||||
}
|
||||
else if(textFormat.isCharFormat())
|
||||
{
|
||||
writeAttribute("typeText", "charFormat");
|
||||
writeTextCharFormat((QTextCharFormat*)&textFormat, id, WriteAttribute);
|
||||
writeTextFormat((QTextFormat*)&textFormat, id, WriteAll);
|
||||
writeTextCharFormat((QTextCharFormat*)&textFormat, id, WriteElements);
|
||||
}
|
||||
}
|
||||
|
||||
void cDocumentWriter::writeTextFormat(QTextFormat* lpTextFormat, int /*id*/, WritePart part)
|
||||
{
|
||||
if(lpTextFormat->isValid())
|
||||
{
|
||||
if(part & WriteAttribute)
|
||||
{
|
||||
writeAttribute("layoutDirection", QString::number(lpTextFormat->layoutDirection()));
|
||||
}
|
||||
|
||||
if(part & WriteElements)
|
||||
{
|
||||
writeStartElement("background");
|
||||
writeBrush(lpTextFormat->background());
|
||||
writeEndElement();
|
||||
|
||||
writeStartElement("foreground");
|
||||
writeBrush(lpTextFormat->foreground());
|
||||
writeEndElement();
|
||||
|
||||
writeStartElement("properties");
|
||||
QMap<int, QVariant> properties = lpTextFormat->properties();
|
||||
QMapIterator<int, QVariant> property(properties);
|
||||
|
||||
while(property.hasNext())
|
||||
{
|
||||
property.next();
|
||||
|
||||
writeStartElement("property");
|
||||
writeAttribute("key", QString::number(property.key()));
|
||||
writeAttribute("type", QString::number(property.value().type()));
|
||||
writeTextElement("value", property.value().toString());
|
||||
writeEndElement();
|
||||
}
|
||||
writeEndElement();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void cDocumentWriter::writeFormats(const QVector<QTextFormat> formats)
|
||||
{
|
||||
writeStartElement("allFormats");
|
||||
for(int x = 0;x < formats.count();x++)
|
||||
{
|
||||
writeStartElement("format");
|
||||
writeAttribute("id", QString::number(x));
|
||||
writeFormat(formats[x]);
|
||||
writeEndElement();
|
||||
}
|
||||
writeEndElement();
|
||||
}
|
||||
|
||||
void cDocumentWriter::writeTabPositions(const QList<QTextOption::Tab> tabs)
|
||||
{
|
||||
for(int x = 0;x < tabs.count();x++)
|
||||
{
|
||||
QTextOption::Tab tab = tabs[x];
|
||||
writeStartElement("tabPosition");
|
||||
writeAttribute("delimiter", tab.delimiter);
|
||||
writeAttribute("position", QString::number(tab.position));
|
||||
writeAttribute("type", QString::number(tab.type));
|
||||
writeEndElement();
|
||||
}
|
||||
}
|
||||
|
||||
void cDocumentWriter::writeTextBlockFormat(QTextBlockFormat* lpTextBlockFormat, int id, WritePart part)
|
||||
{
|
||||
if(part & WriteAttribute && id != -1)
|
||||
writeAttribute("id", QString::number(id));
|
||||
|
||||
if(lpTextBlockFormat->isValid())
|
||||
{
|
||||
if(part & WriteAttribute)
|
||||
{
|
||||
writeAttribute("alignment", QString::number(lpTextBlockFormat->alignment()));
|
||||
writeAttribute("topMargin", QString::number(lpTextBlockFormat->topMargin()));
|
||||
writeAttribute("leftMargin", QString::number(lpTextBlockFormat->leftMargin()));
|
||||
writeAttribute("bottomMargin", QString::number(lpTextBlockFormat->bottomMargin()));
|
||||
writeAttribute("rightMargin", QString::number(lpTextBlockFormat->rightMargin()));
|
||||
writeAttribute("indent", QString::number(lpTextBlockFormat->indent()));
|
||||
writeAttribute("lineHeight", QString::number(lpTextBlockFormat->lineHeight()));
|
||||
writeAttribute("lineHeightType", QString::number(lpTextBlockFormat->lineHeightType()));
|
||||
writeAttribute("nonBreakableLines", lpTextBlockFormat->nonBreakableLines() == true ? "true" : "false");
|
||||
writeAttribute("pageBreakPolicy", QString::number(lpTextBlockFormat->pageBreakPolicy()));
|
||||
writeAttribute("textIndent", QString::number(lpTextBlockFormat->textIndent()));
|
||||
}
|
||||
|
||||
if(part & WriteElements)
|
||||
{
|
||||
writeStartElement("tabPositions");
|
||||
writeTabPositions(lpTextBlockFormat->tabPositions());
|
||||
writeEndElement();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void cDocumentWriter::writeTextCharFormat(QTextCharFormat* lpTextCharFormat, int id, WritePart part)
|
||||
{
|
||||
if(part & WriteAttribute && id != -1)
|
||||
writeAttribute("id", QString::number(id));
|
||||
|
||||
if(lpTextCharFormat->isValid())
|
||||
{
|
||||
if(part & WriteAttribute)
|
||||
{
|
||||
writeAttribute("anchorHref", lpTextCharFormat->anchorHref());
|
||||
// writeAttribute("fontCapitalization", QString::number(lpTextCharFormat->fontCapitalization()));
|
||||
// writeAttribute("fontFamily", lpTextCharFormat->fontFamily());
|
||||
// writeAttribute("fontFixedPitch", lpTextCharFormat->fontFixedPitch() == true ? "true" : "false");
|
||||
// writeAttribute("fontHintingPreference", QString::number(lpTextCharFormat->fontHintingPreference()));
|
||||
// writeAttribute("fontItalic", lpTextCharFormat->fontItalic() == true ? "true" : "false");
|
||||
// writeAttribute("fontKerning", lpTextCharFormat->fontKerning() == true ? "true" : "false");
|
||||
// writeAttribute("fontLetterSpacing", QString::number(lpTextCharFormat->fontLetterSpacing()));
|
||||
// writeAttribute("fontLetterSpacingType", QString::number(lpTextCharFormat->fontLetterSpacingType()));
|
||||
// writeAttribute("fontOverline", QString::number(lpTextCharFormat->fontOverline()));
|
||||
// writeAttribute("fontPointSize", QString::number(lpTextCharFormat->fontPointSize()));
|
||||
// writeAttribute("fontStretch", QString::number(lpTextCharFormat->fontStretch()));
|
||||
// writeAttribute("fontStrikeOut", lpTextCharFormat->fontStrikeOut() == true ? "true" : "false");
|
||||
// writeAttribute("fontStyleHint", QString::number(lpTextCharFormat->fontStyleHint()));
|
||||
// writeAttribute("fontStyleStrategy", QString::number(lpTextCharFormat->fontStyleStrategy()));
|
||||
// writeAttribute("fontUnderline", lpTextCharFormat->fontUnderline() == true ? "true" : "false");
|
||||
// writeAttribute("fontWeight", QString::number(lpTextCharFormat->fontWeight()));
|
||||
// writeAttribute("fontWordSpacing", QString::number(lpTextCharFormat->fontWordSpacing()));
|
||||
writeAttribute("isAnchor", lpTextCharFormat->isAnchor() == true ? "true" : "false");
|
||||
writeAttribute("toolTip", lpTextCharFormat->toolTip());
|
||||
writeAttribute("verticalAlignment", QString::number(lpTextCharFormat->verticalAlignment()));
|
||||
}
|
||||
|
||||
if(part & WriteElements)
|
||||
{
|
||||
writeStartElement("textOutline");
|
||||
writePen(lpTextCharFormat->textOutline());
|
||||
writeEndElement();
|
||||
|
||||
writeStartElement("anchorNames");
|
||||
for(int x = 0;x < lpTextCharFormat->anchorNames().count();x++)
|
||||
writeTextElement("anchor", lpTextCharFormat->anchorNames()[x]);
|
||||
writeEndElement();
|
||||
|
||||
writeStartElement("font");
|
||||
writeFont(lpTextCharFormat->font());
|
||||
writeEndElement();
|
||||
|
||||
writeStartElement("underlineColor");
|
||||
writeColor(lpTextCharFormat->underlineColor());
|
||||
writeEndElement();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void cDocumentWriter::writeTextFrameFormat(QTextFrameFormat* lpTextFrameFormat, int id, WritePart part)
|
||||
{
|
||||
if(part & WriteAttribute && id != -1)
|
||||
writeAttribute("id", QString::number(id));
|
||||
|
||||
if(lpTextFrameFormat->isValid())
|
||||
{
|
||||
if(part & WriteAttribute)
|
||||
{
|
||||
writeAttribute("border", QString::number(lpTextFrameFormat->border()));
|
||||
writeAttribute("borderStyle", QString::number(lpTextFrameFormat->borderStyle()));
|
||||
writeAttribute("margin", QString::number(lpTextFrameFormat->margin()));
|
||||
writeAttribute("leftMargin", QString::number(lpTextFrameFormat->leftMargin()));
|
||||
writeAttribute("topMargin", QString::number(lpTextFrameFormat->topMargin()));
|
||||
writeAttribute("rightMargin", QString::number(lpTextFrameFormat->rightMargin()));
|
||||
writeAttribute("bottomMargin", QString::number(lpTextFrameFormat->bottomMargin()));
|
||||
writeAttribute("width", QString::number(lpTextFrameFormat->width().rawValue()));
|
||||
writeAttribute("height", QString::number(lpTextFrameFormat->height().rawValue()));
|
||||
writeAttribute("padding", QString::number(lpTextFrameFormat->padding()));
|
||||
writeAttribute("pageBreakPolicy", QString::number(lpTextFrameFormat->pageBreakPolicy()));
|
||||
writeAttribute("position", QString::number(lpTextFrameFormat->position()));
|
||||
}
|
||||
|
||||
if(part & WriteElements)
|
||||
{
|
||||
writeStartElement("borderBrush");
|
||||
writeBrush(lpTextFrameFormat->borderBrush());
|
||||
writeEndElement();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void cDocumentWriter::writeTextImageFormat(QTextImageFormat* lpTextImageFormat, int id, WritePart part)
|
||||
{
|
||||
if(part & WriteAttribute && id != -1)
|
||||
writeAttribute("id", QString::number(id));
|
||||
|
||||
if(lpTextImageFormat->isValid())
|
||||
{
|
||||
if(part & WriteAttribute)
|
||||
{
|
||||
writeAttribute("name", lpTextImageFormat->name());
|
||||
writeAttribute("height", QString::number(lpTextImageFormat->height()));
|
||||
writeAttribute("width", QString::number(lpTextImageFormat->width()));
|
||||
}
|
||||
|
||||
if(m_lpDocument)
|
||||
{
|
||||
QPixmap pixmap = m_lpDocument->resource(2, lpTextImageFormat->name()).value<QPixmap>();
|
||||
if(!pixmap.isNull())
|
||||
{
|
||||
QString name = lpTextImageFormat->name();
|
||||
if(name.left(1) == ':')
|
||||
name = name.mid(1);
|
||||
if(name.left(1) == '/')
|
||||
name = name.mid(1);
|
||||
|
||||
name = m_szPath + "/" + name;
|
||||
QString path = name.left(name.lastIndexOf("/"));
|
||||
|
||||
QFileInfo fileInfo(name);
|
||||
if(fileInfo.suffix().isEmpty())
|
||||
name.append(".png");
|
||||
|
||||
QDir dir;
|
||||
dir.mkpath(path);
|
||||
bool ret = pixmap.save(name);
|
||||
if(!ret)
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void cDocumentWriter::writeTextListFormat(QTextListFormat* lpTextListFormat, int id, WritePart part)
|
||||
{
|
||||
if(part & WriteAttribute && id != -1)
|
||||
writeAttribute("id", QString::number(id));
|
||||
|
||||
if(lpTextListFormat->isValid())
|
||||
{
|
||||
if(part & WriteAttribute)
|
||||
{
|
||||
writeAttribute("indent", QString::number(lpTextListFormat->indent()));
|
||||
writeAttribute("numberPrefix", lpTextListFormat->numberPrefix());
|
||||
writeAttribute("numberSuffix", lpTextListFormat->numberSuffix());
|
||||
writeAttribute("style", QString::number(lpTextListFormat->style()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void cDocumentWriter::writeTextTableCellFormat(QTextTableCellFormat* lpTextTableCellFormat, int id, WritePart part)
|
||||
{
|
||||
if(part & WriteAttribute && id != -1)
|
||||
writeAttribute("id", QString::number(id));
|
||||
|
||||
if(lpTextTableCellFormat->isValid())
|
||||
{
|
||||
if(part & WriteAttribute)
|
||||
{
|
||||
writeAttribute("leftPadding", QString::number(lpTextTableCellFormat->leftPadding()));
|
||||
writeAttribute("topPadding", QString::number(lpTextTableCellFormat->topPadding()));
|
||||
writeAttribute("rightPadding", QString::number(lpTextTableCellFormat->rightPadding()));
|
||||
writeAttribute("bottomPadding", QString::number(lpTextTableCellFormat->bottomPadding()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void cDocumentWriter::writeTextTableFormat(QTextTableFormat* lpTextTableFormat, int id, WritePart part)
|
||||
{
|
||||
if(part & WriteAttribute && id != -1)
|
||||
writeAttribute("id", QString::number(id));
|
||||
|
||||
if(lpTextTableFormat->isValid())
|
||||
{
|
||||
if(part & WriteAttribute)
|
||||
{
|
||||
writeAttribute("alignment", QString::number(lpTextTableFormat->alignment()));
|
||||
writeAttribute("cellPadding", QString::number(lpTextTableFormat->cellPadding()));
|
||||
writeAttribute("cellSpacing", QString::number(lpTextTableFormat->cellSpacing()));
|
||||
writeAttribute("columns", QString::number(lpTextTableFormat->columns()));
|
||||
writeAttribute("headerRowCount", QString::number(lpTextTableFormat->headerRowCount()));
|
||||
}
|
||||
|
||||
if(part & WriteElements)
|
||||
{
|
||||
if(lpTextTableFormat->columnWidthConstraints().count())
|
||||
{
|
||||
writeStartElement("columnWidthConstraints");
|
||||
for(int x = 0;x < lpTextTableFormat->columnWidthConstraints().count();x++)
|
||||
{
|
||||
writeStartElement("columnWidthConstraint");
|
||||
writeAttribute("rawValue", QString::number(lpTextTableFormat->columnWidthConstraints()[x].rawValue()));
|
||||
writeAttribute("type", QString::number(lpTextTableFormat->columnWidthConstraints()[x].type()));
|
||||
writeEndElement();
|
||||
}
|
||||
writeEndElement();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void cDocumentWriter::writeTextOption(const QTextOption& textOption)
|
||||
{
|
||||
writeAttribute("alignment", QString::number(textOption.alignment()));
|
||||
writeAttribute("flags", QString::number(textOption.flags()));
|
||||
writeAttribute("tabStopDistance", QString::number(textOption.tabStopDistance()));
|
||||
writeAttribute("textDirection", QString::number(textOption.textDirection()));
|
||||
writeAttribute("useDesignMetrics", textOption.useDesignMetrics() == true ? "true" : "false");
|
||||
writeAttribute("wrapMode", QString::number(textOption.wrapMode()));
|
||||
|
||||
writeStartElement("tabArray");
|
||||
for(int x = 0;x < textOption.tabArray().count();x++)
|
||||
writeTextElement("tab", QString::number(textOption.tabArray()[x]));
|
||||
writeEndElement();
|
||||
|
||||
writeStartElement("tabs");
|
||||
writeTabPositions(textOption.tabs());
|
||||
writeEndElement();
|
||||
}
|
||||
@@ -1,82 +0,0 @@
|
||||
#ifndef CDOCUMENTWRITER_H
|
||||
#define CDOCUMENTWRITER_H
|
||||
|
||||
|
||||
#include <QXmlStreamWriter>
|
||||
|
||||
#include <QFile>
|
||||
#include <QString>
|
||||
|
||||
#include <QColor>
|
||||
#include <QGradient>
|
||||
#include <QPen>
|
||||
#include <QBrush>
|
||||
#include <QVector>
|
||||
#include <QPair>
|
||||
|
||||
#include <QTextBlock>
|
||||
#include <QTextBlockFormat>
|
||||
#include <QTextCharFormat>
|
||||
#include <QTextFormat>
|
||||
|
||||
#include <JlCompress.h>
|
||||
|
||||
|
||||
class cTextDocument;
|
||||
|
||||
|
||||
class cDocumentWriter : public QXmlStreamWriter
|
||||
{
|
||||
public:
|
||||
enum WritePart
|
||||
{
|
||||
WriteAll = 3,
|
||||
WriteAttribute = 1,
|
||||
WriteElements = 2,
|
||||
};
|
||||
|
||||
cDocumentWriter(const QString& szFileName, bool bZip = true);
|
||||
~cDocumentWriter();
|
||||
|
||||
bool open();
|
||||
bool close();
|
||||
|
||||
bool writeDocument(cTextDocument* lpDocument);
|
||||
|
||||
private:
|
||||
bool m_bZip;
|
||||
QString m_szFileName;
|
||||
QString m_szPath;
|
||||
QFile m_file;
|
||||
QuaZip m_zip;
|
||||
QuaZipFile m_zipFile;
|
||||
cTextDocument* m_lpDocument;
|
||||
|
||||
void writeTextBlockFormats(const QList<QPair<int, QTextBlockFormat>> textBlockFormats);
|
||||
void writeTextBlocks(QTextBlock& textBlock);
|
||||
void writeColor(QColor color);
|
||||
void writeGradient(const QGradient* lpGradient);
|
||||
void writePen(const QPen& pen);
|
||||
void writeBrush(const QBrush& brush);
|
||||
void writeFormat(const QTextFormat& textFormat, int id = -1);
|
||||
void writeFont(const QFont& font);
|
||||
|
||||
void writeTextBlock(const QTextBlock& textBlock);
|
||||
|
||||
void writeFormats(const QVector<QTextFormat> formats);
|
||||
|
||||
void writeTextFormat(QTextFormat* lpTextFormat, int id = -1, WritePart part = WriteAll);
|
||||
void writeTextBlockFormat(QTextBlockFormat* lpTextBlockFormat, int id = -1, WritePart part = WriteAll);
|
||||
void writeTextCharFormat(QTextCharFormat* lpTextCharFormat, int id = -1, WritePart part = WriteAll);
|
||||
void writeTextFrameFormat(QTextFrameFormat* lpTextFrameFormat, int id = -1, WritePart part = WriteAll);
|
||||
void writeTextImageFormat(QTextImageFormat* lpTextImageFormat, int id = -1, WritePart part = WriteAll);
|
||||
void writeTextListFormat(QTextListFormat* lpTextListFormat, int id = -1, WritePart part = WriteAll);
|
||||
void writeTextTableCellFormat(QTextTableCellFormat* lpTextTableCellFormat, int id = -1, WritePart part = WriteAll);
|
||||
void writeTextTableFormat(QTextTableFormat* lpTextTableFormat, int id = -1, WritePart part = WriteAll);
|
||||
|
||||
void writeTextOption(const QTextOption &textOption);
|
||||
|
||||
void writeTabPositions(const QList<QTextOption::Tab> tabs);
|
||||
};
|
||||
|
||||
#endif // CDOCUMENTWRITER_H
|
||||
+3
-1
@@ -2,7 +2,6 @@
|
||||
#include "ui_cmainwindow.h"
|
||||
|
||||
#include "ctextdocument.h"
|
||||
#include "cdocumentreader.h"
|
||||
|
||||
#include "cstructurewindow.h"
|
||||
#include "cwidget.h"
|
||||
@@ -16,6 +15,8 @@
|
||||
#include <QDir>
|
||||
|
||||
|
||||
#include <QTextEdit>
|
||||
|
||||
cMainWindow::cMainWindow(QWidget *parent) :
|
||||
QMainWindow(parent),
|
||||
ui(new Ui::cMainWindow),
|
||||
@@ -41,6 +42,7 @@ cMainWindow::cMainWindow(QWidget *parent) :
|
||||
|
||||
QMainWindow* lpMainWindow = new QMainWindow(this);
|
||||
lpMainWindow->setWindowTitle("Bla");
|
||||
|
||||
cWidget* lpWidget2 = new cWidget(lpMainWindow);
|
||||
lpWidget2->setWindow(ui->m_lpMdiArea->addSubWindow(lpMainWindow));
|
||||
|
||||
|
||||
+13
-4
@@ -35,7 +35,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>147</width>
|
||||
<width>194</width>
|
||||
<height>477</height>
|
||||
</rect>
|
||||
</property>
|
||||
@@ -45,6 +45,15 @@
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="0" column="0">
|
||||
<widget class="QTreeView" name="m_lpOutline">
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::NoEditTriggers</set>
|
||||
</property>
|
||||
<property name="rootIsDecorated">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="animated">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<attribute name="headerVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
@@ -57,7 +66,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>147</width>
|
||||
<width>194</width>
|
||||
<height>477</height>
|
||||
</rect>
|
||||
</property>
|
||||
@@ -70,7 +79,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>147</width>
|
||||
<width>194</width>
|
||||
<height>477</height>
|
||||
</rect>
|
||||
</property>
|
||||
@@ -83,7 +92,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>147</width>
|
||||
<width>194</width>
|
||||
<height>477</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
#include <QSqlError>
|
||||
|
||||
|
||||
cPart::cPart(qint32 iID) :
|
||||
cPart::cPart(qint32 iID, QObject *parent) :
|
||||
QObject(parent),
|
||||
m_iID(iID),
|
||||
m_szName(""),
|
||||
m_iSortOrder(-1),
|
||||
|
||||
@@ -12,7 +12,7 @@ class cPart : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
cPart(qint32 iID = -1);
|
||||
explicit cPart(qint32 iID = -1, QObject *parent = nullptr);
|
||||
|
||||
void setID(const qint32& iID);
|
||||
qint32 id();
|
||||
|
||||
+2
-1
@@ -6,7 +6,8 @@
|
||||
#include <QSqlError>
|
||||
|
||||
|
||||
cScene::cScene(qint32 iID) :
|
||||
cScene::cScene(qint32 iID, QObject *parent) :
|
||||
QObject(parent),
|
||||
m_iID(iID),
|
||||
m_lpChapter(0),
|
||||
m_szName(""),
|
||||
|
||||
@@ -26,7 +26,7 @@ public:
|
||||
STATE_finished = 4,
|
||||
};
|
||||
|
||||
cScene(qint32 iID = -1);
|
||||
explicit cScene(qint32 iID = -1, QObject *parent = nullptr);
|
||||
|
||||
void setID(const qint32& iID);
|
||||
qint32 id();
|
||||
|
||||
+5
-2
@@ -18,7 +18,8 @@
|
||||
#include <QThread>
|
||||
|
||||
|
||||
cStoryBook::cStoryBook(const QString &szProjectPath) :
|
||||
cStoryBook::cStoryBook(const QString &szProjectPath, QObject *parent) :
|
||||
QObject(parent),
|
||||
m_szProjectPath(szProjectPath),
|
||||
m_bIsOpen(false)
|
||||
{
|
||||
@@ -149,13 +150,15 @@ bool cStoryBook::createDatabase()
|
||||
" id INTEGER PRIMARY KEY AUTOINCREMENT "
|
||||
" UNIQUE, "
|
||||
" mainCharacter BOOLEAN, "
|
||||
" gender BOOLEAN, "
|
||||
" gender INTEGER, "
|
||||
" title TEXT, "
|
||||
" firstName TEXT, "
|
||||
" middleName TEXT, "
|
||||
" lastName TEXT, "
|
||||
" nickName TEXT, "
|
||||
" height DOUBLE, "
|
||||
" weight DOUBLE, "
|
||||
" age DOUBLE, "
|
||||
" dateOfBirth DATE, "
|
||||
" placeOfBirth TEXT, "
|
||||
" dateOfDeath DATE, "
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ class cStoryBook : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
cStoryBook(const QString& szProjectPath);
|
||||
explicit cStoryBook(const QString& szProjectPath, QObject *parent = nullptr);
|
||||
~cStoryBook();
|
||||
|
||||
bool openDatabase();
|
||||
|
||||
+15
-35
@@ -1,5 +1,4 @@
|
||||
#include "ctextdocument.h"
|
||||
#include "cdocumentwriter.h"
|
||||
|
||||
#include <QVector>
|
||||
|
||||
@@ -52,55 +51,36 @@ cTextDocument::cTextDocument(const QString &text, QObject *parent) :
|
||||
void cTextDocument::init()
|
||||
{
|
||||
setPageSize((QSizeF(210, 297)));
|
||||
/*
|
||||
QTextCursor* myCursor = new QTextCursor(this);
|
||||
|
||||
QTextBlockFormat format;
|
||||
format.setBackground(Qt::red);
|
||||
myCursor->setBlockFormat(format);
|
||||
|
||||
myCursor->insertText("the ");
|
||||
|
||||
format.setBackground(Qt::green);
|
||||
myCursor->insertBlock(format);
|
||||
myCursor->insertText("fish ");
|
||||
|
||||
format.setBackground(Qt::yellow);
|
||||
myCursor->insertBlock(format);
|
||||
myCursor->insertText("are ");
|
||||
|
||||
format.setBackground(Qt::red);
|
||||
myCursor->insertBlock(format);
|
||||
myCursor->insertText("coming!");
|
||||
|
||||
format.setBackground(Qt::green);
|
||||
myCursor->insertBlock(format);
|
||||
myCursor->insertText(QString("%1 blocks").arg(this->blockCount()));
|
||||
*/
|
||||
}
|
||||
|
||||
bool cTextDocument::save(bool bZip)
|
||||
bool cTextDocument::save()
|
||||
{
|
||||
if(!m_szFileName.isEmpty())
|
||||
return(saveDocument(bZip));
|
||||
return(saveDocument());
|
||||
return(false);
|
||||
}
|
||||
|
||||
bool cTextDocument::saveAs(const QString& szFileName, bool bZip)
|
||||
bool cTextDocument::saveAs(const QString& szFileName)
|
||||
{
|
||||
m_szFileName = szFileName;
|
||||
return(saveDocument(bZip));
|
||||
return(saveDocument());
|
||||
}
|
||||
|
||||
bool cTextDocument::saveDocument(bool bZip)
|
||||
#include <QByteArray>
|
||||
|
||||
bool cTextDocument::saveDocument()
|
||||
{
|
||||
cDocumentWriter docWriter(m_szFileName, bZip);
|
||||
if(!docWriter.open())
|
||||
QFile file(m_szFileName);
|
||||
QByteArray data = this->toHtml().toUtf8();
|
||||
|
||||
if(!file.open(QFile::WriteOnly | QFile::Truncate))
|
||||
return(false);
|
||||
|
||||
docWriter.writeDocument(this);
|
||||
QByteArray zipped = qCompress(data);
|
||||
file.write(zipped);
|
||||
|
||||
file.close();
|
||||
|
||||
docWriter.close();
|
||||
return(true);
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -22,15 +22,15 @@ public:
|
||||
cTextDocument(QObject *parent = Q_NULLPTR);
|
||||
cTextDocument(const QString &text, QObject *parent = Q_NULLPTR);
|
||||
|
||||
bool save(bool bZip = true);
|
||||
bool saveAs(const QString& szFileName, bool bZip = true);
|
||||
bool save();
|
||||
bool saveAs(const QString& szFileName);
|
||||
|
||||
void printPreview(QPrinter* lpPrinter);
|
||||
private:
|
||||
QString m_szFileName;
|
||||
|
||||
void init();
|
||||
bool saveDocument(bool bZip = true);
|
||||
bool saveDocument();
|
||||
private slots:
|
||||
};
|
||||
|
||||
|
||||
+5
-19
@@ -28,35 +28,21 @@ win32-msvc* {
|
||||
message("msvc 32-bit")
|
||||
} else {
|
||||
message("msvc 64-bit")
|
||||
INCLUDEPATH += C:/dev/3rdParty/quazip/include
|
||||
DEPENDPATH += C:/dev/3rdParty/quazip/include
|
||||
LIBS += C:/dev/3rdParty/quazip/msc/lib/quazip.lib
|
||||
INCLUDEPATH += C:/dev/3rdParty/zlib/include
|
||||
DEPENDPATH += C:/dev/3rdParty/zlib/include
|
||||
LIBS += C:/dev/3rdParty/zlib/msc/lib/zlib.lib
|
||||
}
|
||||
}
|
||||
|
||||
win32-g++ {
|
||||
message("mingw")
|
||||
INCLUDEPATH += C:/dev/3rdParty/quazip/include
|
||||
DEPENDPATH += C:/dev/3rdParty/quazip/include
|
||||
LIBS += -LC:/dev/3rdParty/quazip/gcc/lib -lquazip
|
||||
INCLUDEPATH += C:/dev/3rdParty/zlib/include
|
||||
DEPENDPATH += C:/dev/3rdParty/zlib/include
|
||||
LIBS += -LC:/dev/3rdParty/zlib/gcc/lib -lz
|
||||
}
|
||||
|
||||
unix {
|
||||
LIBS += -lquazip
|
||||
message("*nix")
|
||||
}
|
||||
|
||||
|
||||
SOURCES += \
|
||||
main.cpp \
|
||||
cmainwindow.cpp \
|
||||
cdocumentreader.cpp \
|
||||
cdocumentwriter.cpp \
|
||||
ctextdocument.cpp \
|
||||
common.cpp \
|
||||
ctextedit.cpp \
|
||||
@@ -66,12 +52,11 @@ SOURCES += \
|
||||
cbook.cpp \
|
||||
cpart.cpp \
|
||||
cchapter.cpp \
|
||||
cscene.cpp
|
||||
cscene.cpp \
|
||||
ccharacter.cpp
|
||||
|
||||
HEADERS += \
|
||||
cmainwindow.h \
|
||||
cdocumentreader.h \
|
||||
cdocumentwriter.h \
|
||||
ctextdocument.h \
|
||||
common.h \
|
||||
ctextedit.h \
|
||||
@@ -82,7 +67,8 @@ HEADERS += \
|
||||
cbook.h \
|
||||
cpart.h \
|
||||
cchapter.h \
|
||||
cscene.h
|
||||
cscene.h \
|
||||
ccharacter.h
|
||||
|
||||
FORMS += \
|
||||
cmainwindow.ui \
|
||||
|
||||
Reference in New Issue
Block a user