Bitcoin Core  0.18.99
P2P Digital Currency
platformstyle.h
Go to the documentation of this file.
1 // Copyright (c) 2015 The Bitcoin Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4 
5 #ifndef BITCOIN_QT_PLATFORMSTYLE_H
6 #define BITCOIN_QT_PLATFORMSTYLE_H
7 
8 #include <QIcon>
9 #include <QPixmap>
10 #include <QString>
11 
12 /* Coin network-specific GUI style information */
14 {
15 public:
17  static const PlatformStyle *instantiate(const QString &platformId);
18 
19  const QString &getName() const { return name; }
20 
21  bool getImagesOnButtons() const { return imagesOnButtons; }
22  bool getUseExtraSpacing() const { return useExtraSpacing; }
23 
24  QColor TextColor() const { return textColor; }
25  QColor SingleColor() const { return singleColor; }
26 
28  QImage SingleColorImage(const QString& filename) const;
29 
31  QIcon SingleColorIcon(const QString& filename) const;
32 
34  QIcon SingleColorIcon(const QIcon& icon) const;
35 
37  QIcon TextColorIcon(const QString& filename) const;
38 
40  QIcon TextColorIcon(const QIcon& icon) const;
41 
42 private:
43  PlatformStyle(const QString &name, bool imagesOnButtons, bool colorizeIcons, bool useExtraSpacing);
44 
45  QString name;
49  QColor singleColor;
50  QColor textColor;
51  /* ... more to come later */
52 };
53 
54 #endif // BITCOIN_QT_PLATFORMSTYLE_H
55 
bool getUseExtraSpacing() const
Definition: platformstyle.h:22
PlatformStyle(const QString &name, bool imagesOnButtons, bool colorizeIcons, bool useExtraSpacing)
QIcon SingleColorIcon(const QString &filename) const
Colorize an icon (given filename) with the icon color.
QIcon TextColorIcon(const QString &filename) const
Colorize an icon (given filename) with the text color.
QColor singleColor
Definition: platformstyle.h:49
QColor SingleColor() const
Definition: platformstyle.h:25
QColor textColor
Definition: platformstyle.h:50
static const PlatformStyle * instantiate(const QString &platformId)
Get style associated with provided platform name, or 0 if not known.
QImage SingleColorImage(const QString &filename) const
Colorize an image (given filename) with the icon color.
const QString & getName() const
Definition: platformstyle.h:19
bool imagesOnButtons
Definition: platformstyle.h:46
QColor TextColor() const
Definition: platformstyle.h:24
bool useExtraSpacing
Definition: platformstyle.h:48
bool getImagesOnButtons() const
Definition: platformstyle.h:21
const char * platformId