VR-Forces 5.0.3 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
aggregateSuppliesPageLogic.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2013 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
8 
9 #pragma once
10 
16 
17 #include <QStandardItemModel>
18 
19 class QTreeWidgetItem;
20 
21 namespace makVrf
22 {
23  class DtObjectListViewItem;
24  struct DtVrlinkSimulatedAggregateState;
25 
26  namespace makVrfGuiObjectInformationQt
27  {
28  class DtAggregateAmmunitionTab;
29  class DtAggregateSuppliesTab;
30 
32  {
33  public:
35 
37 
38  protected:
39  virtual void slot_onStateViewUpdated(makVrv::DtStateView<makVrv::DtVrlinkSimulatedBaseState>* s);
40  virtual void nameChanged();
41 
42  protected:
43 
44  virtual void updateSupplyingInformation();
45  virtual void updateSupplyingInformation(const DtInfluenceManager::Supplying&, const QString& operation);
46 
48  virtual void updateAmmunition(DtAggregateAmmunitionTab* tab,
49  const DtRwProperties& stateProperties);
50 
52  virtual void updateSupplies(DtAggregateSuppliesTab* tab,
53  const DtRwProperties& stateProperties);
54 
57  virtual void getSupplyInfo(double& amount, DtString& pacingTracking,
58  const DtString& propertyName, const DtRwProperties& properties) const;
59  virtual void getSupplyASRInfo(double& amount,
60  const DtString& propertyName, const DtRwProperties& properties, bool fromSupplyUnit) const;
61  virtual void getSupplyASRInfoFromSupplierUnits(double& amount, const DtString& propertyName,
62  bool useLargeAmmunition = false) const;
63 
66  virtual void getSupplyInfo(double& amount,
67  DtString& pacingTracking, const DtRwPropertiesStructure* supplyRw) const;
68  virtual void getSupplyASRInfo(double& amount,
69  const DtRwPropertiesStructure* supplyRw, bool fromSupplier) const;
70 
71  virtual void slot_aggregateUpdated(makVrv::DtUniqueID id, int flags);
72 
73  virtual void updateSupplyMode(makVrv::DtStateView<makVrv::DtVrlinkSimulatedBaseState>* s);
74 
75  virtual void getAmmoASRInfo(const DtString& type, double& asrInfo, bool fromSupplyUnit);
76 
77  virtual void suppliedAdded(makVrv::DtElementID source, makVrv::DtElementID target);
78  virtual void suppliedRemoved(makVrv::DtElementID source, makVrv::DtElementID target);
79 
80  protected:
81  std::set<QString> myAmmunition;
82  std::set<QString> mySupplies;
83  std::map<DtString, double> myAmmunitionASR;
84 
85  typedef std::map<DtString, QTreeWidgetItem*> SuppliedInformation;
87  };
88 
90  {
91  public:
93  : DtInfoIconItem(de)
94  {
95  myFixedItemWidth = 20;
96  }
97 
99  : DtInfoIconItem(l)
100  {
101  myFixedItemWidth = 20;
102  }
103 
104  virtual ~DtAggregateReceivingSupply();
105 
106  static std::string creatorName();
107  virtual bool shouldBeHidden() const;
108 
109  virtual QWidget* widgetRepresentation(QWidget* p, makVrv::DtStateView<makVrv::DtVrlinkSimulatedBaseState>* s);
110 
111  protected:
112  virtual void stateViewUpdated(makVrv::DtStateView<makVrv::DtVrlinkSimulatedBaseState>*);
113  virtual QVariant value(int col, int role, const QTreeWidgetItem*,
115  virtual bool valueNeedsUpdate(int col, makVrv::DtStateView<makVrv::DtVrlinkSimulatedBaseState>*);
116  virtual bool mouseReleaseEvent();
117 
118  virtual void suppliedAdded(makVrv::DtElementID source, makVrv::DtElementID target);
119  virtual void suppliedRemoved(makVrv::DtElementID source, makVrv::DtElementID target);
120 
121  protected:
123  QString myMode;
124  QString myCurrentValue;
125 
127  };
128 
130  }
131 }
std::set< makVrv::DtElementID > Supplying
Definition: influenceManager.h:169
std::map< DtString, QTreeWidgetItem * > SuppliedInformation
Definition: aggregateSuppliesPageLogic.h:85
std::set< QString > myAmmunition
Definition: aggregateSuppliesPageLogic.h:81
DtItemUpdateFunctionCreator< DtAggregateReceivingSupply > DtAggregateReceivingSupplyCreator
Definition: aggregateSuppliesPageLogic.h:129
QString myCurrentValue
Definition: aggregateSuppliesPageLogic.h:124
makVrv::DtSignalConnectionManager myConnections
Definition: aggregateSuppliesPageLogic.h:126
Definition: informationDialogPage.h:204
A structure composed of distinct fields, each of which is itself a property. The DtRwPropertiesStruct...
Definition: rwPropertiesStructure.h:21
SuppliedInformation mySuppliedInformation
Definition: aggregateSuppliesPageLogic.h:86
Defines the DtRwPropertiesStructure class, a structure containing fields, which are themselves proper...
std::map< DtString, double > myAmmunitionASR
Definition: aggregateSuppliesPageLogic.h:83
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
DtAggregateReceivingSupply(makVrv::DtDe &de)
Definition: aggregateSuppliesPageLogic.h:92
QString myMode
Definition: aggregateSuppliesPageLogic.h:123
const char * source
Definition: lz4.h:442
int myNumberSupplying
Definition: aggregateSuppliesPageLogic.h:122
#define DT_DLL_VRFGUIOBJECTINFORMATIONQT
Contains DLL export macros.
Definition: vrfGuiObjectInformationQt.h:24
std::set< QString > mySupplies
Definition: aggregateSuppliesPageLogic.h:82
A list of properties. A DtPropertyInterface object that is a specialized version of DtRwVariableBindi...
Definition: rwProperties.h:126
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:70
DtAggregateReceivingSupply(DtInformationDialogPageLogic *l)
Definition: aggregateSuppliesPageLogic.h:98
Definition: aggregateSuppliesPageLogic.h:89
This is a general class which will update QStandardItemModels to display resource data in a standard ...
Definition: aggregateResourcesPageLogic.h:26

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)