xlsxformat_p.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. // xlsxformat_p.h
  2. #ifndef XLSXFORMAT_P_H
  3. #define XLSXFORMAT_P_H
  4. #include <QtGlobal>
  5. #include <QSharedData>
  6. #include <QMap>
  7. #include <QSet>
  8. #include "xlsxformat.h"
  9. QT_BEGIN_NAMESPACE_XLSX
  10. class FormatPrivate : public QSharedData
  11. {
  12. public:
  13. enum FormatType
  14. {
  15. FT_Invalid = 0,
  16. FT_NumFmt = 0x01,
  17. FT_Font = 0x02,
  18. FT_Alignment = 0x04,
  19. FT_Border = 0x08,
  20. FT_Fill = 0x10,
  21. FT_Protection = 0x20
  22. };
  23. enum Property {
  24. P_STARTID,
  25. //numFmt
  26. P_NumFmt_Id,
  27. P_NumFmt_FormatCode,
  28. //font
  29. P_Font_STARTID,
  30. P_Font_Size = P_Font_STARTID,
  31. P_Font_Italic,
  32. P_Font_StrikeOut,
  33. P_Font_Color,
  34. P_Font_Bold,
  35. P_Font_Script,
  36. P_Font_Underline,
  37. P_Font_Outline,
  38. P_Font_Shadow,
  39. P_Font_Name,
  40. P_Font_Family,
  41. P_Font_Charset,
  42. P_Font_Scheme,
  43. P_Font_Condense,
  44. P_Font_Extend,
  45. P_Font_ENDID,
  46. //border
  47. P_Border_STARTID,
  48. P_Border_LeftStyle = P_Border_STARTID,
  49. P_Border_RightStyle,
  50. P_Border_TopStyle,
  51. P_Border_BottomStyle,
  52. P_Border_DiagonalStyle,
  53. P_Border_LeftColor,
  54. P_Border_RightColor,
  55. P_Border_TopColor,
  56. P_Border_BottomColor,
  57. P_Border_DiagonalColor,
  58. P_Border_DiagonalType,
  59. P_Border_ENDID,
  60. //fill
  61. P_Fill_STARTID,
  62. P_Fill_Pattern = P_Fill_STARTID,
  63. P_Fill_BgColor,
  64. P_Fill_FgColor,
  65. P_Fill_ENDID,
  66. //alignment
  67. P_Alignment_STARTID,
  68. P_Alignment_AlignH = P_Alignment_STARTID,
  69. P_Alignment_AlignV,
  70. P_Alignment_Wrap,
  71. P_Alignment_Rotation,
  72. P_Alignment_Indent,
  73. P_Alignment_ShinkToFit,
  74. P_Alignment_ENDID,
  75. //protection
  76. P_Protection_Locked,
  77. P_Protection_Hidden,
  78. P_ENDID
  79. };
  80. FormatPrivate();
  81. FormatPrivate(const FormatPrivate &other);
  82. ~FormatPrivate();
  83. bool dirty; //The key re-generation is need.
  84. QByteArray formatKey;
  85. bool font_dirty;
  86. bool font_index_valid;
  87. QByteArray font_key;
  88. int font_index;
  89. bool fill_dirty;
  90. bool fill_index_valid;
  91. QByteArray fill_key;
  92. int fill_index;
  93. bool border_dirty;
  94. bool border_index_valid;
  95. QByteArray border_key;
  96. int border_index;
  97. int xf_index;
  98. bool xf_indexValid;
  99. bool is_dxf_fomat;
  100. int dxf_index;
  101. bool dxf_indexValid;
  102. int theme;
  103. QMap<int, QVariant> properties;
  104. };
  105. QT_END_NAMESPACE_XLSX
  106. #endif