VR-Forces 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 
36  virtual ~DtAggregateSuppliesPageLogic() override;
37  virtual void activate(DtSimObjectReference) override;
38 
39  protected:
40  virtual void slot_onStateViewUpdated(DtSimObjectReference s);
41  virtual void nameChanged();
42 
43  protected:
44 
45  virtual void updateSupplyingInformation();
46  virtual void updateSupplyingInformation(const DtInfluenceManager::Supplying&, const QString& operation);
47 
49  virtual void updateAmmunition(DtAggregateAmmunitionTab* tab,
50  const DtRwProperties& stateProperties);
51 
53  virtual void updateSupplies(DtAggregateSuppliesTab* tab,
54  const DtRwProperties& stateProperties);
55 
58  virtual void getSupplyInfo(double& amount, DtString& pacingTracking,
59  const DtString& propertyName, const DtRwProperties& properties) const;
60  virtual void getSupplyASRInfo(double& amount,
61  const DtString& propertyName, const DtRwProperties& properties, bool fromSupplyUnit) const;
62  virtual void getSupplyASRInfoFromSupplierUnits(double& amount, const DtString& propertyName,
63  bool useLargeAmmunition = false) const;
64 
67  virtual void getSupplyInfo(double& amount,
68  DtString& pacingTracking, const DtRwPropertiesStructure* supplyRw) const;
69  virtual void getSupplyASRInfo(double& amount,
70  const DtRwPropertiesStructure* supplyRw, bool fromSupplier) const;
71 
72  virtual void slot_aggregateUpdated(makVrv::DtUniqueID id, int flags) override;
73 
74  virtual void updateSupplyMode(DtSimObjectReference s);
75 
76  virtual void getAmmoASRInfo(const DtString& type, double& asrInfo, bool fromSupplyUnit);
77 
78  virtual void suppliedAdded(makVrv::DtElementID source, makVrv::DtElementID target);
79  virtual void suppliedRemoved(makVrv::DtElementID source, makVrv::DtElementID target);
80 
81  protected:
82  std::set<QString> myAmmunition;
83  std::set<QString> mySupplies;
84  std::map<DtString, double> myAmmunitionASR;
85 
86  typedef std::map<DtString, QTreeWidgetItem*> SuppliedInformation;
88  };
89 
91  {
92  public:
94  : DtInfoIconItem(de)
95  {
96  myFixedItemWidth = 20;
97  }
98 
100  : DtInfoIconItem(l)
101  {
102  myFixedItemWidth = 20;
103  }
104 
105  virtual ~DtAggregateReceivingSupply() override;
106 
107  static std::string creatorName();
108  virtual bool shouldBeHidden(DtSimObjectReference) const override;
109 
110  virtual QWidget* widgetRepresentation(QWidget* p, DtSimObjectReference s) override;
111  virtual void activate(DtSimObjectReference) override;
112 
113  protected:
114  virtual QVariant value(int col, int role, const DtSimObjectReference) const override;
115  virtual bool mouseReleaseEvent() override;
116 
117  virtual void suppliedAdded(makVrv::DtElementID source, makVrv::DtElementID target);
118  virtual void suppliedRemoved(makVrv::DtElementID source, makVrv::DtElementID target);
119 
120  protected:
122  QString myMode;
123  QString myCurrentValue;
124 
126  };
127 
129  }
130 }
std::set< makVrv::DtElementID > Supplying
Definition: influenceManager.h:169
std::map< DtString, QTreeWidgetItem * > SuppliedInformation
Definition: aggregateSuppliesPageLogic.h:86
std::set< QString > myAmmunition
Definition: aggregateSuppliesPageLogic.h:82
DtItemUpdateFunctionCreator< DtAggregateReceivingSupply > DtAggregateReceivingSupplyCreator
Definition: aggregateSuppliesPageLogic.h:128
QString myCurrentValue
Definition: aggregateSuppliesPageLogic.h:123
DtUniqueID DtElementID
The ElementID is a specific type of unique ID used to represent VR-Vantage uniquely defined elements...
Definition: DtUniqueID.h:23
makVrv::DtSignalConnectionManager myConnections
Definition: aggregateSuppliesPageLogic.h:125
Definition: informationDialogPage.h:206
A structure composed of distinct fields, each of which is itself a property. The DtRwPropertiesStruct...
Definition: rwPropertiesStructure.h:21
SuppliedInformation mySuppliedInformation
Definition: aggregateSuppliesPageLogic.h:87
Defines the DtRwPropertiesStructure class, a structure containing fields, which are themselves proper...
std::map< DtString, double > myAmmunitionASR
Definition: aggregateSuppliesPageLogic.h:84
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
DtAggregateReceivingSupply(makVrv::DtDe &de)
Definition: aggregateSuppliesPageLogic.h:93
QString myMode
Definition: aggregateSuppliesPageLogic.h:122
const char * source
Definition: lz4.h:442
unsigned long long DtUniqueID
Definition: DtUniqueID.h:19
int myNumberSupplying
Definition: aggregateSuppliesPageLogic.h:121
#define DT_DLL_VRFGUIOBJECTINFORMATIONQT
Contains DLL export macros.
Definition: vrfGuiObjectInformationQt.h:24
std::set< QString > mySupplies
Definition: aggregateSuppliesPageLogic.h:83
A list of properties. A DtPropertyInterface object that is a specialized version of DtRwVariableBindi...
Definition: rwProperties.h:122
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:76
DtAggregateReceivingSupply(DtInformationDialogPageLogic *l)
Definition: aggregateSuppliesPageLogic.h:99
Definition: aggregateSuppliesPageLogic.h:90
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 Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)