pGuiUtils.sip 1.1 KB

1234567891011121314151617181920212223242526272829
  1. namespace pGuiUtils
  2. {
  3. %TypeHeaderCode
  4. #include <gui/pGuiUtils.h>
  5. %End
  6. /*!
  7. Create a QPixmap of \a size filled with \a color.
  8. */
  9. QPixmap filledPixmap( const QColor& color, const QSize& size );
  10. /*!
  11. Create a cache key using \a key and \a size used for caching scaled pixmap in QPixmapCache.
  12. */
  13. QString cacheKey( const QString& key, const QSize& size = QSize() );
  14. /*!
  15. Create a QPixmap from \a filePath. If \a size is not null, the pixmap is scaled to \a size.
  16. The resulted pixmap is cached in QPixmapCache so a call with same parameters will be very quick.
  17. \note The scale is done using Qt::KeepAspectRatio and Qt::SmoothTransformation.
  18. */
  19. QPixmap scaledPixmap( const QString& filePath, const QSize& size = QSize() );
  20. /*!
  21. Create a QPixmap from \a pixmap. If \a size is not null, the pixmap is scaled to \a size.
  22. The resulted pixmap is cached in QPixmapCache using \a key so a call with same parameters will be very quick.
  23. \note The scale is done using Qt::KeepAspectRatio and Qt::SmoothTransformation.
  24. */
  25. QPixmap scaledPixmap( const QPixmap& pixmap, const QString& key, const QSize& size = QSize() );
  26. };