VR-Forces 4.2 Class Documentation
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 
63  virtual void requestWeaponsFor(const std::vector<makVrv::DtSimEntry*>& data,bool getResources=false);
64  virtual void slot_receivedWeaponList(std::string entityName);
65 
66  static makVrv::DtUnicode codeVariableType()
67  {
68  return makVrv::DtUnicode::tr("String (weapon name)");
69  }
70 
71  protected:
72  virtual void addWeapon(const WeaponSystem&);
73  virtual void weaponUpdated(const WeaponSystem&);
74  virtual void weaponChanged();
75  virtual void weaponCheckingDisabled();
76  virtual void weaponCheckComplete();
77  virtual void updateWeapons();
78 
79  protected slots:
80  virtual void validateWeapon();
81 
82  protected:
83  std::list<std::string> myAwaitingWeaponSystemResponse;
84  std::vector<std::string> myCurrSelected;
85 
86  public:
87  QLabel* myWeaponLabel;
88  QListWidget* myWeaponSystems;
89  QVBoxLayout* myContentLayout;
90  QString myDefaultValue;
91 
92  };
93 
96  {
97  public:
98  DtDirectFireWeaponSelectionWidget(makVrv::DtDe& de, QWidget* parent, const Qt::WindowFlags& flags = 0);
99 
100  //DTOR
102 
103  protected:
104  virtual void addWeapon(const WeaponSystem&);
105  };
106 
109  {
110  public:
111  DtIndirectFireWeaponSelectionWidget(makVrv::DtDe& de, QWidget* parent, const Qt::WindowFlags& flags = 0);
112 
113  //DTOR
115 
116  protected:
117  virtual void addWeapon(const WeaponSystem&);
118  };
119 
123 }

Document ID: Generated on Sun Nov 24 19:49:21 EST 2013 from SVN revision 133924
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)