VR-Forces 4.3 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
weaponSelectionWidget.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2013 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 #pragma once
12 
16 
17 class QLabel;
18 class QVBoxLayout;
19 class QString;
20 class QListWidget;
21 
22 namespace makVrv
23 {
24  class DtSimEntry;
25  class DtUnicode;
26 }
27 
28 namespace makVrf
29 {
32  {
33  Q_OBJECT
34  public:
35  DtWeaponSelectionWidget(makVrv::DtDe& de, QWidget* parent, const Qt::WindowFlags& flags = 0);
36 
37  //DTOR
38  virtual ~DtWeaponSelectionWidget();
39 
41  virtual void setLabel(const std::string&);
42 
44  virtual void setRange(double bottom, double top);
45 
47  virtual void setDefaultValue(const std::string&);
48 
50  virtual void setVariableData(const std::string&);
51 
53  virtual void setupFrom(const std::vector<makVrv::DtSimEntry*>& data);
54 
56  virtual DtReaderWriter* createBoundVariable(const std::string& variableName);
57 
59  virtual void setupFromBoundVariable(const DtReaderWriter* variableName);
60 
64  virtual void requestWeaponsFor(const std::vector<makVrv::DtSimEntry*>& data);
65  virtual void slot_receivedWeaponList(std::string entityName);
66 
70  virtual bool includeResources() const;
71  virtual void setIncludeResources(const bool doInclude);
73 
74  static makVrv::DtUnicode codeVariableType()
75  {
76  return makVrv::DtUnicode::tr("String (weapon name)");
77  }
78 
79  protected:
80  virtual void addWeapon(const WeaponSystem&);
81  virtual void weaponUpdated(const WeaponSystem&);
82  virtual void weaponChanged();
83  virtual void weaponCheckingDisabled();
84  virtual void weaponCheckComplete();
85  virtual void updateWeapons();
86 
87  protected slots:
88  virtual void validateWeapon();
89 
90  protected:
91  std::list<std::string> myAwaitingWeaponSystemResponse;
92  std::vector<std::string> myCurrSelected;
97 
98  public:
100  QListWidget* myWeaponSystems;
101  QVBoxLayout* myContentLayout;
102  QString myDefaultValue;
103 
104  };
105 
108  {
109  public:
110  DtDirectFireWeaponSelectionWidget(makVrv::DtDe& de, QWidget* parent, const Qt::WindowFlags& flags = 0);
111 
112  //DTOR
114 
115  protected:
116  virtual void addWeapon(const WeaponSystem&);
117  };
118 
121  {
122  public:
123  DtIndirectFireWeaponSelectionWidget(makVrv::DtDe& de, QWidget* parent, const Qt::WindowFlags& flags = 0);
124 
125  //DTOR
127 
128  protected:
129  virtual void addWeapon(const WeaponSystem&);
130  };
131 
135 }

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)