xlsxabstractooxmlfile.h 961 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. // xlsxabstractooxmlfile.h
  2. #ifndef QXLSX_XLSXABSTRACTOOXMLFILE_H
  3. #define QXLSX_XLSXABSTRACTOOXMLFILE_H
  4. #include "xlsxglobal.h"
  5. QT_BEGIN_NAMESPACE_XLSX
  6. class Relationships;
  7. class AbstractOOXmlFilePrivate;
  8. class AbstractOOXmlFile
  9. {
  10. Q_DECLARE_PRIVATE(AbstractOOXmlFile)
  11. public:
  12. enum CreateFlag
  13. {
  14. F_NewFromScratch,
  15. F_LoadFromExists
  16. };
  17. public:
  18. virtual ~AbstractOOXmlFile();
  19. virtual void saveToXmlFile(QIODevice *device) const = 0;
  20. virtual bool loadFromXmlFile(QIODevice *device) = 0;
  21. virtual QByteArray saveToXmlData() const;
  22. virtual bool loadFromXmlData(const QByteArray &data);
  23. Relationships *relationships() const;
  24. void setFilePath(const QString path);
  25. QString filePath() const;
  26. protected:
  27. AbstractOOXmlFile(CreateFlag flag);
  28. AbstractOOXmlFile(AbstractOOXmlFilePrivate *d);
  29. AbstractOOXmlFilePrivate *d_ptr;
  30. };
  31. QT_END_NAMESPACE_XLSX
  32. #endif // QXLSX_XLSXABSTRACTOOXMLFILE_H