qpalette.sip 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. // qpalette.sip generated by MetaSIP
  2. //
  3. // This file is part of the QtGui Python extension module.
  4. //
  5. // Copyright (c) 2026 Riverbank Computing Limited <info@riverbankcomputing.com>
  6. //
  7. // This file is part of PyQt6.
  8. //
  9. // This file may be used under the terms of the GNU General Public License
  10. // version 3.0 as published by the Free Software Foundation and appearing in
  11. // the file LICENSE included in the packaging of this file. Please review the
  12. // following information to ensure the GNU General Public License version 3.0
  13. // requirements will be met: http://www.gnu.org/copyleft/gpl.html.
  14. //
  15. // If you do not wish to use this file under the terms of the GPL version 3.0
  16. // then you may purchase a commercial license. For more information contact
  17. // info@riverbankcomputing.com.
  18. //
  19. // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
  20. // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  21. class QPalette
  22. {
  23. %TypeHeaderCode
  24. #include <qpalette.h>
  25. %End
  26. public:
  27. QPalette();
  28. QPalette(const QColor &button);
  29. QPalette(Qt::GlobalColor button);
  30. QPalette(const QColor &button, const QColor &background);
  31. QPalette(const QBrush &foreground, const QBrush &button, const QBrush &light, const QBrush &dark, const QBrush &mid, const QBrush &text, const QBrush &bright_text, const QBrush &base, const QBrush &background);
  32. QPalette(const QPalette &palette);
  33. QPalette(const QVariant &variant /GetWrapper/) /NoDerived/;
  34. %MethodCode
  35. if (a0->canConvert<QPalette>())
  36. sipCpp = new QPalette(a0->value<QPalette>());
  37. else
  38. sipError = sipBadCallableArg(0, a0Wrapper);
  39. %End
  40. ~QPalette();
  41. enum ColorGroup
  42. {
  43. Active,
  44. Disabled,
  45. Inactive,
  46. NColorGroups,
  47. Current,
  48. All,
  49. Normal,
  50. };
  51. enum ColorRole
  52. {
  53. WindowText,
  54. Button,
  55. Light,
  56. Midlight,
  57. Dark,
  58. Mid,
  59. Text,
  60. BrightText,
  61. ButtonText,
  62. Base,
  63. Window,
  64. Shadow,
  65. Highlight,
  66. HighlightedText,
  67. Link,
  68. LinkVisited,
  69. AlternateBase,
  70. ToolTipBase,
  71. ToolTipText,
  72. PlaceholderText,
  73. %If (Qt_6_6_0 -)
  74. Accent,
  75. %End
  76. NoRole,
  77. NColorRoles,
  78. };
  79. QPalette::ColorGroup currentColorGroup() const;
  80. void setCurrentColorGroup(QPalette::ColorGroup cg);
  81. const QColor &color(QPalette::ColorGroup cg, QPalette::ColorRole cr) const;
  82. const QBrush &brush(QPalette::ColorGroup cg, QPalette::ColorRole cr) const;
  83. void setBrush(QPalette::ColorGroup cg, QPalette::ColorRole cr, const QBrush &brush);
  84. void setColorGroup(QPalette::ColorGroup cr, const QBrush &foreground, const QBrush &button, const QBrush &light, const QBrush &dark, const QBrush &mid, const QBrush &text, const QBrush &bright_text, const QBrush &base, const QBrush &background);
  85. bool isEqual(QPalette::ColorGroup cr1, QPalette::ColorGroup cr2) const;
  86. const QColor &color(QPalette::ColorRole cr) const;
  87. const QBrush &brush(QPalette::ColorRole cr) const;
  88. const QBrush &windowText() const;
  89. const QBrush &button() const;
  90. const QBrush &light() const;
  91. const QBrush &dark() const;
  92. const QBrush &mid() const;
  93. const QBrush &text() const;
  94. const QBrush &base() const;
  95. const QBrush &alternateBase() const;
  96. const QBrush &window() const;
  97. const QBrush &midlight() const;
  98. const QBrush &brightText() const;
  99. const QBrush &buttonText() const;
  100. const QBrush &shadow() const;
  101. const QBrush &highlight() const;
  102. const QBrush &highlightedText() const;
  103. const QBrush &link() const;
  104. const QBrush &linkVisited() const;
  105. const QBrush &toolTipBase() const;
  106. const QBrush &toolTipText() const;
  107. const QBrush &placeholderText() const;
  108. bool operator==(const QPalette &p) const;
  109. bool operator!=(const QPalette &p) const;
  110. bool isCopyOf(const QPalette &p) const;
  111. QPalette resolve(const QPalette &) const;
  112. void setColor(QPalette::ColorGroup acg, QPalette::ColorRole acr, const QColor &acolor);
  113. void setColor(QPalette::ColorRole acr, const QColor &acolor);
  114. void setBrush(QPalette::ColorRole acr, const QBrush &abrush);
  115. bool isBrushSet(QPalette::ColorGroup cg, QPalette::ColorRole cr) const;
  116. qint64 cacheKey() const;
  117. void swap(QPalette &other /Constrained/);
  118. %If (Qt_6_6_0 -)
  119. const QBrush &accent() const;
  120. %End
  121. };
  122. QDataStream &operator<<(QDataStream &s, const QPalette &p) /ReleaseGIL/;
  123. QDataStream &operator>>(QDataStream &ds, QPalette &p /Constrained/) /ReleaseGIL/;