xlsxmediafile_p.h 960 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // xlsxmediafile_p.h
  2. #ifndef QXLSX_XLSXMEDIAFILE_H
  3. #define QXLSX_XLSXMEDIAFILE_H
  4. #include "xlsxglobal.h"
  5. #include <QString>
  6. #include <QByteArray>
  7. QT_BEGIN_NAMESPACE_XLSX
  8. class MediaFile
  9. {
  10. public:
  11. MediaFile(const QString &fileName);
  12. MediaFile(const QByteArray &bytes, const QString &suffix, const QString &mimeType=QString());
  13. public:
  14. void set(const QByteArray &bytes, const QString &suffix, const QString &mimeType=QString());
  15. QString suffix() const;
  16. QString mimeType() const;
  17. QByteArray contents() const;
  18. bool isIndexValid() const;
  19. int index() const;
  20. void setIndex(int idx);
  21. QByteArray hashKey() const;
  22. void setFileName(const QString &name);
  23. QString fileName() const;
  24. protected:
  25. QString m_fileName;
  26. QByteArray m_contents;
  27. QString m_suffix;
  28. QString m_mimeType;
  29. int m_index;
  30. bool m_indexValid;
  31. QByteArray m_hashKey;
  32. };
  33. QT_END_NAMESPACE_XLSX
  34. #endif // QXLSX_XLSXMEDIAFILE_H