wumu
2024-05-07 5e74d49c960965e3134cda27f603024483a4a1d7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// xlsxcolor_p.h
 
#ifndef QXLSX_XLSXCOLOR_P_H
#define QXLSX_XLSXCOLOR_P_H
 
#include <QtGlobal>
#include <QVariant>
#include <QColor>
#include <QXmlStreamWriter>
#include <QXmlStreamReader>
 
#include "xlsxglobal.h"
 
QT_BEGIN_NAMESPACE_XLSX
 
class Styles;
 
class XlsxColor
{
public:
    explicit XlsxColor(const QColor &color = QColor());
    explicit XlsxColor(const QString &theme, const QString &tint=QString());
    explicit XlsxColor (int index);
 
    bool isThemeColor() const;
    bool isIndexedColor() const;
    bool isRgbColor() const;
    bool isInvalid() const;
 
    QColor rgbColor() const;
    int indexedColor() const;
    QStringList themeColor() const;
 
    operator QVariant() const;
 
    static QColor fromARGBString(const QString &c);
    static QString toARGBString(const QColor &c);
 
    bool saveToXml(QXmlStreamWriter &writer, const QString &node=QString()) const;
    bool loadFromXml(QXmlStreamReader &reader);
 
private:
    QVariant val;
};
 
#if !defined(QT_NO_DATASTREAM)
  QDataStream &operator<<(QDataStream &, const XlsxColor &);
  QDataStream &operator>>(QDataStream &, XlsxColor &);
#endif
 
#ifndef QT_NO_DEBUG_STREAM
  QDebug operator<<(QDebug dbg, const XlsxColor &c);
#endif
 
QT_END_NAMESPACE_XLSX
 
Q_DECLARE_METATYPE(QXlsx::XlsxColor)
 
#endif // QXLSX_XLSXCOLOR_P_H