VR-Forces Development_Version 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 #include <vrfutil/rwUUID.h>
17 
18 class QLabel;
19 class QBoxLayout;
20 class QString;
21 class QListWidget;
22 class QComboBox;
23 
24 namespace makVrv
25 {
26  class DtSimEntry;
27  class DtUnicode;
28 }
29 
30 namespace makVrf
31 {
34  {
35  Q_OBJECT
36  public:
37  DtWeaponSelectionWidget(makVrv::DtDe& de, QWidget* parent, const Qt::WindowFlags& flags = 0);
38 
39  //DTOR
40  virtual ~DtWeaponSelectionWidget();
41 
43  virtual void setLabel(const std::string&);
44 
46  virtual void setRange(double bottom, double top);
47 
49  virtual void setDefaultValue(const std::string&);
50 
52  virtual void setVariableData(const std::string&);
53 
55  virtual void setupFrom(const std::vector<makVrv::DtSimEntry*>& data);
56 
58  virtual DtReaderWriter* createBoundVariable(const std::string& variableName);
59 
61  virtual void setupFromBoundVariable(const DtReaderWriter* variableName);
62 
66  virtual void requestWeaponsFor(const std::vector<makVrv::DtSimEntry*>& data);
67  virtual void slot_receivedWeaponList(const DtUUID& entity);
68 
72  virtual bool includeResources() const;
73  virtual void setIncludeResources(const bool doInclude);
75 
77  virtual void setAllowMultipleSelection(bool);
78 
80  virtual QStringList selectedWeapons() const;
81 
82  static makVrv::DtUnicode codeVariableType()
83  {
84  return makVrv::DtUnicode::tr("String (weapon name)");
85  }
86 
87  protected:
88  virtual void addWeapon(const WeaponSystem&);
89  virtual void weaponUpdated(const WeaponSystem&);
90  virtual void weaponChanged();
91  virtual void weaponCheckingDisabled();
92  virtual void weaponCheckComplete();
93  virtual void updateWeapons();
94 
95  protected:
96  std::list<DtUUID> myAwaitingWeaponSystemResponse;
97  std::vector<DtUUID> myCurrSelected;
102 
103  public:
106  QListWidget* myWeaponSystemsList;
107  QBoxLayout* myContentLayout;
108  QString myDefaultValue;
109 
110  protected:
112  QString myTitle;
113  };
114 
117  {
118  public:
119  DtDirectFireWeaponSelectionWidget(makVrv::DtDe& de, QWidget* parent, const Qt::WindowFlags& flags = 0);
120 
121  //DTOR
123 
124  protected:
125  virtual void addWeapon(const WeaponSystem&);
126  };
127 
130  {
131  public:
132  DtIndirectFireWeaponSelectionWidget(makVrv::DtDe& de, QWidget* parent, const Qt::WindowFlags& flags = 0);
133 
134  //DTOR
136 
137  protected:
138  virtual void addWeapon(const WeaponSystem&);
139  };
140 
144 }

Document ID: Generated on Mon Jul 4 01:00:18 EDT 2016 from SVN revision 166489
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)