You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

platformstyle.h 1.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. // Copyright (c) 2015 The Starwels developers
  2. // Distributed under the MIT software license, see the accompanying
  3. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
  4. #ifndef STARWELS_QT_PLATFORMSTYLE_H
  5. #define STARWELS_QT_PLATFORMSTYLE_H
  6. #include <QIcon>
  7. #include <QPixmap>
  8. #include <QString>
  9. /* Coin network-specific GUI style information */
  10. class PlatformStyle
  11. {
  12. public:
  13. /** Get style associated with provided platform name, or 0 if not known */
  14. static const PlatformStyle *instantiate(const QString &platformId);
  15. const QString &getName() const { return name; }
  16. bool getImagesOnButtons() const { return imagesOnButtons; }
  17. bool getUseExtraSpacing() const { return useExtraSpacing; }
  18. QColor TextColor() const { return textColor; }
  19. QColor SingleColor() const { return singleColor; }
  20. /** Colorize an image (given filename) with the icon color */
  21. QImage SingleColorImage(const QString& filename) const;
  22. /** Colorize an icon (given filename) with the icon color */
  23. QIcon SingleColorIcon(const QString& filename) const;
  24. /** Colorize an icon (given object) with the icon color */
  25. QIcon SingleColorIcon(const QIcon& icon) const;
  26. /** Colorize an icon (given filename) with the text color */
  27. QIcon TextColorIcon(const QString& filename) const;
  28. /** Colorize an icon (given object) with the text color */
  29. QIcon TextColorIcon(const QIcon& icon) const;
  30. private:
  31. PlatformStyle(const QString &name, bool imagesOnButtons, bool colorizeIcons, bool useExtraSpacing);
  32. QString name;
  33. bool imagesOnButtons;
  34. bool colorizeIcons;
  35. bool useExtraSpacing;
  36. QColor singleColor;
  37. QColor textColor;
  38. /* ... more to come later */
  39. };
  40. #endif // STARWELS_QT_PLATFORMSTYLE_H