VR-Forces 4.3 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gumballStatusPixmapGenerator.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2015 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 #pragma once
14 #include <QString>
15 #include <QColor>
16 #include <QImage>
17 
18 namespace makVrv
19 {
20  class DtDe;
21 }
22 
24 #define USE_SVGS 1
25 
26 namespace makVrf
27 {
28 
30  {
31  public:
32 
33  enum StatusColor {
39  SELECTED_STATUS
40  };
41 
42  DtGumballStatusPixmapGenerator(const std::string& iconsPath);
43 
45 
47  void init();
48 
51 
53  static void registerInstance(makVrv::DtDe&, DtGumballStatusPixmapGenerator*);
54 
56  virtual QImage effectivenessPixmap(const QString& effectivenessStatus);
57 
60  virtual QImage selectedStatusPixmap(const QString& personnelStatus,
61  const QString& polStatus, const QString& weaponsStatus,
62  const QString& ammoStatus);
63 
64  protected:
65 
66 #ifdef USE_SVGS
67 
68  virtual StatusColor getPieSectionColor(const QString& pieSectionState);
69 #else
70 
71  virtual QColor getPieSectionColor(const QString& pieSectionState);
72 
75  virtual QImage circlePixmapFilledWith(QList<QColor>& colorList);
76 #endif
77 
79  virtual int getEffectivenessLevel(const QString& effectivenessState);
80 
81  private:
84 
85  protected:
86  std::string myIconsPath;
87 
88  QByteArray my3SliceSvgData;
89  QByteArray my4SliceSvgData;
90  std::map<StatusColor, QByteArray> myLightColors;
91  std::map<StatusColor, QByteArray> myDarkColors;
92  std::map<StatusColor, QByteArray> myHighlightColors;
93  };
94 
95 }

Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)