pIconManager.sip 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*!
  2. \file pIconManager.h
  3. \brief A cache class for icons and pixmaps
  4. \author Filipe AZEVEDO aka Nox P\@sNox <pasnox@gmail.com>
  5. */
  6. /*!
  7. \ingroup Gui
  8. \namespace pIconManager
  9. \brief A cache class for icons and pixmaps.
  10. This class allow to cache and share QPixmap & QIcon.
  11. Icons and pixmaps can easily be loaded on demand by using coresponding members.
  12. */
  13. namespace pIconManager
  14. {
  15. %TypeHeaderCode
  16. #include <gui/pIconManager.h>
  17. %End
  18. /*!
  19. \brief Return the filepath of the file \a fileName in \a prefix folder (check is done recursively).
  20. \param fileName The file name of the file to find (ie: toto.txt).
  21. \param prefix The start path to look from, the scan is done recursively until a match or nothing found.
  22. \return A QString containing the absolute file path of the file, the fileName/prefix pair is cached for fast lookup the next call.
  23. */
  24. QString filePath( const QString& fileName, const QString& prefix = ":/" );
  25. /*!
  26. \brief Return the filepath of the pixmap \a fileName in \a prefix folder (check is done recursively).
  27. \param fileName The file name of the pixmap to find (ie: toto.png).
  28. \param prefix The start path to look from, the scan is done recursively until a match or nothing found.
  29. \return A QString containing the absolute file path of the pixmap, the fileName/prefix pair is cached for fast lookup the next call.
  30. */
  31. QPixmap pixmap( const QString& fileName, const QString& prefix = ":/" );
  32. /*!
  33. \brief Return the filepath of the icon \a fileName in \a prefix folder (check is done recursively).
  34. \param fileName The file name of the icon to find (ie: toto.png).
  35. \param prefix The start path to look from, the scan is done recursively until a match or nothing found.
  36. \return A QString containing the absolute file path of the icon, the fileName/prefix pair is cached for fast lookup the next call.
  37. */
  38. QIcon icon( const QString& fileName, const QString& prefix = ":/" );
  39. };