You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.3 KiB
54 lines
1.3 KiB
12 years ago
|
#ifndef QXLSX_DRAWING_H
|
||
|
#define QXLSX_DRAWING_H
|
||
|
|
||
|
#include <QObject>
|
||
|
#include <QList>
|
||
|
|
||
|
class QIODevice;
|
||
|
|
||
|
namespace QXlsx {
|
||
|
class XmlStreamWriter;
|
||
|
|
||
|
struct XlsxDrawingDimensionData
|
||
|
{
|
||
|
int drawing_type;
|
||
|
int col_from;
|
||
|
int row_from;
|
||
|
double col_from_offset;
|
||
|
double row_from_offset;
|
||
|
int col_to;
|
||
|
int row_to;
|
||
|
double col_to_offset;
|
||
|
double row_to_offset;
|
||
|
int col_absolute;
|
||
|
int row_absolute;
|
||
|
int width;
|
||
|
int height;
|
||
|
QString description;
|
||
|
int shape;
|
||
|
};
|
||
|
|
||
|
class Drawing : public QObject
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
public:
|
||
|
explicit Drawing(QObject *parent = 0);
|
||
|
void saveToXmlFile(QIODevice *device);
|
||
|
|
||
|
bool embedded;
|
||
|
int orientation;
|
||
|
QList <XlsxDrawingDimensionData *> dimensionList;
|
||
|
|
||
|
private:
|
||
|
void writeTwoCellAnchor(XmlStreamWriter &writer, int index, XlsxDrawingDimensionData *data);
|
||
|
void writeAbsoluteAnchor(XmlStreamWriter &writer, int index);
|
||
|
void writePos(XmlStreamWriter &writer, int x, int y);
|
||
|
void writeExt(XmlStreamWriter &writer, int cx, int cy);
|
||
|
void writeGraphicFrame(XmlStreamWriter &writer, int index, const QString &name=QString());
|
||
|
void writePicture(XmlStreamWriter &writer, int index, double col_abs, double row_abs, int width, int height, const QString &description);
|
||
|
};
|
||
|
|
||
|
} // namespace QXlsx
|
||
|
|
||
|
#endif // QXLSX_DRAWING_H
|