qicon.sip 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265
  1. // qicon.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 QIcon /Supertype=PyQt6.sip.wrapper/
  22. {
  23. %TypeHeaderCode
  24. #include <qicon.h>
  25. %End
  26. public:
  27. enum Mode
  28. {
  29. Normal,
  30. Disabled,
  31. Active,
  32. Selected,
  33. };
  34. enum State
  35. {
  36. On,
  37. Off,
  38. };
  39. %If (Qt_6_7_0 -)
  40. enum class ThemeIcon
  41. {
  42. AddressBookNew,
  43. ApplicationExit,
  44. AppointmentNew,
  45. CallStart,
  46. CallStop,
  47. ContactNew,
  48. DocumentNew,
  49. DocumentOpen,
  50. DocumentOpenRecent,
  51. DocumentPageSetup,
  52. DocumentPrint,
  53. DocumentPrintPreview,
  54. DocumentProperties,
  55. DocumentRevert,
  56. DocumentSave,
  57. DocumentSaveAs,
  58. DocumentSend,
  59. EditClear,
  60. EditCopy,
  61. EditCut,
  62. EditDelete,
  63. EditFind,
  64. EditPaste,
  65. EditRedo,
  66. EditSelectAll,
  67. EditUndo,
  68. FolderNew,
  69. FormatIndentLess,
  70. FormatIndentMore,
  71. FormatJustifyCenter,
  72. FormatJustifyFill,
  73. FormatJustifyLeft,
  74. FormatJustifyRight,
  75. FormatTextDirectionLtr,
  76. FormatTextDirectionRtl,
  77. FormatTextBold,
  78. FormatTextItalic,
  79. FormatTextUnderline,
  80. FormatTextStrikethrough,
  81. GoDown,
  82. GoHome,
  83. GoNext,
  84. GoPrevious,
  85. GoUp,
  86. HelpAbout,
  87. HelpFaq,
  88. InsertImage,
  89. InsertLink,
  90. InsertText,
  91. ListAdd,
  92. ListRemove,
  93. MailForward,
  94. MailMarkImportant,
  95. MailMarkRead,
  96. MailMarkUnread,
  97. MailMessageNew,
  98. MailReplyAll,
  99. MailReplySender,
  100. MailSend,
  101. MediaEject,
  102. MediaPlaybackPause,
  103. MediaPlaybackStart,
  104. MediaPlaybackStop,
  105. MediaRecord,
  106. MediaSeekBackward,
  107. MediaSeekForward,
  108. MediaSkipBackward,
  109. MediaSkipForward,
  110. ObjectRotateLeft,
  111. ObjectRotateRight,
  112. ProcessStop,
  113. SystemLockScreen,
  114. SystemLogOut,
  115. SystemSearch,
  116. SystemReboot,
  117. SystemShutdown,
  118. ToolsCheckSpelling,
  119. ViewFullscreen,
  120. ViewRefresh,
  121. ViewRestore,
  122. WindowClose,
  123. WindowNew,
  124. ZoomFitBest,
  125. ZoomIn,
  126. ZoomOut,
  127. AudioCard,
  128. AudioInputMicrophone,
  129. Battery,
  130. CameraPhoto,
  131. CameraVideo,
  132. CameraWeb,
  133. Computer,
  134. DriveHarddisk,
  135. DriveOptical,
  136. InputGaming,
  137. InputKeyboard,
  138. InputMouse,
  139. InputTablet,
  140. MediaFlash,
  141. MediaOptical,
  142. MediaTape,
  143. MultimediaPlayer,
  144. NetworkWired,
  145. NetworkWireless,
  146. Phone,
  147. Printer,
  148. Scanner,
  149. VideoDisplay,
  150. AppointmentMissed,
  151. AppointmentSoon,
  152. AudioVolumeHigh,
  153. AudioVolumeLow,
  154. AudioVolumeMedium,
  155. AudioVolumeMuted,
  156. BatteryCaution,
  157. BatteryLow,
  158. DialogError,
  159. DialogInformation,
  160. DialogPassword,
  161. DialogQuestion,
  162. DialogWarning,
  163. FolderDragAccept,
  164. FolderOpen,
  165. FolderVisiting,
  166. ImageLoading,
  167. ImageMissing,
  168. MailAttachment,
  169. MailUnread,
  170. MailRead,
  171. MailReplied,
  172. MediaPlaylistRepeat,
  173. MediaPlaylistShuffle,
  174. NetworkOffline,
  175. PrinterPrinting,
  176. SecurityHigh,
  177. SecurityLow,
  178. SoftwareUpdateAvailable,
  179. SoftwareUpdateUrgent,
  180. SyncError,
  181. SyncSynchronizing,
  182. UserAvailable,
  183. UserOffline,
  184. WeatherClear,
  185. WeatherClearNight,
  186. WeatherFewClouds,
  187. WeatherFewCloudsNight,
  188. WeatherFog,
  189. WeatherShowers,
  190. WeatherSnow,
  191. WeatherStorm,
  192. };
  193. %End
  194. QIcon();
  195. QIcon(const QPixmap &pixmap);
  196. QIcon(const QIcon &other);
  197. explicit QIcon(const QString &fileName);
  198. explicit QIcon(QIconEngine *engine /GetWrapper/);
  199. %MethodCode
  200. sipCpp = new QIcon(a0);
  201. // The QIconEngine is implicitly shared by copies of the QIcon and is destroyed
  202. // by C++ when the last copy is destroyed. Therefore we need to transfer
  203. // ownership but not to associate it with this QIcon. The Python object will
  204. // get tidied up when the virtual dtor gets called.
  205. sipTransferTo(a0Wrapper, Py_None);
  206. %End
  207. QIcon(const QVariant &variant /GetWrapper/) /NoDerived/;
  208. %MethodCode
  209. if (a0->canConvert<QIcon>())
  210. sipCpp = new QIcon(a0->value<QIcon>());
  211. else
  212. sipError = sipBadCallableArg(0, a0Wrapper);
  213. %End
  214. ~QIcon();
  215. QPixmap pixmap(const QSize &size, qreal devicePixelRatio, QIcon::Mode mode = QIcon::Normal, QIcon::State state = QIcon::Off) const;
  216. QPixmap pixmap(const QSize &size, QIcon::Mode mode = QIcon::Normal, QIcon::State state = QIcon::Off) const;
  217. QPixmap pixmap(int w, int h, QIcon::Mode mode = QIcon::Normal, QIcon::State state = QIcon::Off) const;
  218. QPixmap pixmap(int extent, QIcon::Mode mode = QIcon::Normal, QIcon::State state = QIcon::Off) const;
  219. QSize actualSize(const QSize &size, QIcon::Mode mode = QIcon::Normal, QIcon::State state = QIcon::Off) const;
  220. QList<QSize> availableSizes(QIcon::Mode mode = QIcon::Normal, QIcon::State state = QIcon::Off) const;
  221. void paint(QPainter *painter, const QRect &rect, Qt::Alignment alignment = Qt::AlignCenter, QIcon::Mode mode = QIcon::Normal, QIcon::State state = QIcon::Off) const;
  222. void paint(QPainter *painter, int x, int y, int w, int h, Qt::Alignment alignment = Qt::AlignCenter, QIcon::Mode mode = QIcon::Normal, QIcon::State state = QIcon::Off) const;
  223. bool isNull() const;
  224. bool isDetached() const;
  225. void addPixmap(const QPixmap &pixmap, QIcon::Mode mode = QIcon::Normal, QIcon::State state = QIcon::Off);
  226. void addFile(const QString &fileName, const QSize &size = QSize(), QIcon::Mode mode = QIcon::Normal, QIcon::State state = QIcon::Off);
  227. qint64 cacheKey() const;
  228. static QIcon fromTheme(const QString &name);
  229. static QIcon fromTheme(const QString &name, const QIcon &fallback);
  230. %If (Qt_6_7_0 -)
  231. static QIcon fromTheme(QIcon::ThemeIcon icon);
  232. %End
  233. %If (Qt_6_7_0 -)
  234. static QIcon fromTheme(QIcon::ThemeIcon icon, const QIcon &fallback);
  235. %End
  236. static bool hasThemeIcon(const QString &name);
  237. %If (Qt_6_7_0 -)
  238. static bool hasThemeIcon(QIcon::ThemeIcon icon);
  239. %End
  240. static QStringList themeSearchPaths();
  241. static void setThemeSearchPaths(const QStringList &searchpath);
  242. static QString themeName();
  243. static void setThemeName(const QString &path);
  244. QString name() const;
  245. void swap(QIcon &other /Constrained/);
  246. void setIsMask(bool isMask);
  247. bool isMask() const;
  248. static QStringList fallbackSearchPaths();
  249. static void setFallbackSearchPaths(const QStringList &paths);
  250. static QString fallbackThemeName();
  251. static void setFallbackThemeName(const QString &name);
  252. };
  253. QDataStream &operator<<(QDataStream &, const QIcon &) /ReleaseGIL/;
  254. QDataStream &operator>>(QDataStream &, QIcon & /Constrained/) /ReleaseGIL/;