qpixmapcache.sip 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. // qpixmapcache.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 QPixmapCache
  22. {
  23. %TypeHeaderCode
  24. #include <qpixmapcache.h>
  25. %End
  26. public:
  27. class Key
  28. {
  29. %TypeHeaderCode
  30. #include <qpixmapcache.h>
  31. %End
  32. public:
  33. Key();
  34. Key(const QPixmapCache::Key &other);
  35. ~Key();
  36. bool operator==(const QPixmapCache::Key &key) const;
  37. bool operator!=(const QPixmapCache::Key &key) const;
  38. void swap(QPixmapCache::Key &other /Constrained/);
  39. bool isValid() const;
  40. %If (Qt_6_6_0 -)
  41. Py_hash_t __hash__() const;
  42. %MethodCode
  43. sipRes = qHash(*sipCpp);
  44. %End
  45. %End
  46. };
  47. static int cacheLimit();
  48. static void clear();
  49. static QPixmap find(const QString &key);
  50. %MethodCode
  51. sipRes = new QPixmap;
  52. if (!QPixmapCache::find(*a0, sipRes))
  53. {
  54. delete sipRes;
  55. sipRes = 0;
  56. }
  57. %End
  58. static QPixmap find(const QPixmapCache::Key &key);
  59. %MethodCode
  60. sipRes = new QPixmap;
  61. if (!QPixmapCache::find(*a0, sipRes))
  62. {
  63. delete sipRes;
  64. sipRes = 0;
  65. }
  66. %End
  67. static bool insert(const QString &key, const QPixmap &);
  68. static QPixmapCache::Key insert(const QPixmap &pixmap);
  69. static void remove(const QString &key);
  70. static void remove(const QPixmapCache::Key &key);
  71. static bool replace(const QPixmapCache::Key &key, const QPixmap &pixmap);
  72. static void setCacheLimit(int);
  73. };