代码拉取完成,页面将自动刷新
#ifndef PAPER_H
#define PAPER_H
#include <QTextEdit>
#include <QTextDocument>
#include <QTextFrame>
#include <QTextFrameFormat>
#include <QDebug>
#include <QImage>
#include <QImageReader>
#include <QMimeData>
#include <QFileInfo>
//ofd文件按照正常值*5的比例进行变化存取
const double A4width = 210*5;
const double A4height = 297*5;
const double B5width = 210*5;
const double B5height = 276*5;
const double A5width = 148*5;
const double A5height = 210*5;
typedef struct paperMargin
{
double topMargin;
double bottomMargin;
double leftMargin;
double rightMargin;
}PaperMargin;
class Paper : public QTextEdit
{
Q_OBJECT
public:
Paper(QWidget *parent = 0);
void initPaper();
void setHeight(double);
void setWidth(double);
double getHeight();
double getWidth();
void setPaperMargin(double, double, double, double);
void setLeftMargin(double);
void setRightMargin(double);
void setTopMargin(double);
void setBottomMargin(double);
void setFrameMargin();
void setLineDistance(double);
void setLetterDistanceScale(double);
double getLetterDistanceScale();
double getLineDistance();
PaperMargin getPaperMargin();
QTextDocument* getPaperDocument();
void insertImage(QString, double, double);
int getPaperNum();
void setPaperNum(int);
private:
QTextDocument *doc;
QTextFrame *rootFrame;
PaperMargin paperMargin;
double height;
double width;
int num; //加载htmlye'm页面时计数用
double lineDistance;
double letterDistanceScale; //字距比例
signals:
void textEditIsEmpty();
public slots:
void ifIsEmpty();
void resetPaper();
};
#endif // PAPER_H
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。