Fabcoin Core  0.16.2
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 FABCOIN_QT_PLATFORMSTYLE_H
6 #define FABCOIN_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  QColor MenuColor() const { return menuColor; }
27 
29  QImage SingleColorImage(const QString& filename) const;
30 
32  QIcon SingleColorIcon(const QString& filename) const;
33 
35  QIcon SingleColorIcon(const QIcon& icon) const;
36 
38  QIcon TextColorIcon(const QString& filename) const;
39 
41  QIcon TextColorIcon(const QIcon& icon) const;
42 
44  QIcon MenuColorIcon(const QString& filename) const;
45 
47  QIcon MenuColorIcon(const QIcon& icon) const;
48 
49  enum StateType{
50  NavBar = 0,
52  };
54  QIcon MultiStatesIcon(const QString& resourcename, StateType type = NavBar, QColor color = Qt::white, QColor colorAlt = 0x2d2d2d) const;
55 
57  Normal = 0,
62  };
63  QIcon TableColorIcon(const QString& resourcename, TableColorType type) const;
64  QImage TableColorImage(const QString& resourcename, TableColorType type) const;
65  void TableColor(TableColorType type, int& color, double& opacity) const;
66 
67 private:
68  PlatformStyle(const QString &name, bool imagesOnButtons, bool colorizeIcons, bool useExtraSpacing);
69 
70  QString name;
74  QColor singleColor;
75  QColor textColor;
76  QColor menuColor;
77  /* ... more to come later */
78 };
79 
80 #endif // FABCOIN_QT_PLATFORMSTYLE_H
81 
void TableColor(TableColorType type, int &color, double &opacity) const
QIcon TableColorIcon(const QString &resourcename, TableColorType type) const
QColor TextColor() const
Definition: platformstyle.h:24
PlatformStyle(const QString &name, bool imagesOnButtons, bool colorizeIcons, bool useExtraSpacing)
QColor singleColor
Definition: platformstyle.h:74
QIcon SingleColorIcon(const QString &filename) const
Colorize an icon (given filename) with the icon color.
const QString & getName() const
Definition: platformstyle.h:19
QColor menuColor
Definition: platformstyle.h:76
QColor SingleColor() const
Definition: platformstyle.h:25
QColor textColor
Definition: platformstyle.h:75
QColor MenuColor() const
Definition: platformstyle.h:26
static const PlatformStyle * instantiate(const QString &platformId)
Get style associated with provided platform name, or 0 if not known.
PlatformStyle::TableColorType type
Definition: rpcconsole.cpp:61
QIcon MultiStatesIcon(const QString &resourcename, StateType type=NavBar, QColor color=Qt::white, QColor colorAlt=0x2d2d2d) const
Get multi-states icon.
QIcon MenuColorIcon(const QString &filename) const
Colorize an icon (given filename) with the menu text color.
QImage TableColorImage(const QString &resourcename, TableColorType type) const
bool imagesOnButtons
Definition: platformstyle.h:71
bool useExtraSpacing
Definition: platformstyle.h:73
bool getImagesOnButtons() const
Definition: platformstyle.h:21
bool getUseExtraSpacing() const
Definition: platformstyle.h:22
QImage SingleColorImage(const QString &filename) const
Colorize an image (given filename) with the icon color.
const char * platformId
QIcon TextColorIcon(const QString &filename) const
Colorize an icon (given filename) with the text color.