VR-Forces 4.8 Class Documentation
 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;
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();
106 
107  static std::string creatorName();
108  virtual bool shouldBeHidden() const;
109 
110  virtual QWidget* widgetRepresentation(QWidget* p, makVrv::DtStateView<makVrv::DtVrlinkSimulatedBaseState>* s);
111 
112  protected:
113  virtual void stateViewUpdated(makVrv::DtStateView<makVrv::DtVrlinkSimulatedBaseState>*);
114  virtual QVariant value(int col, int role, const QTreeWidgetItem*,
116  virtual bool valueNeedsUpdate(int col, makVrv::DtStateView<makVrv::DtVrlinkSimulatedBaseState>*);
117  virtual bool mouseReleaseEvent();
118 
119  virtual void suppliedAdded(makVrv::DtElementID source, makVrv::DtElementID target);
120  virtual void suppliedRemoved(makVrv::DtElementID source, makVrv::DtElementID target);
121 
122  protected:
124  QString myMode;
125  QString myCurrentValue;
126 
128  };
129 
131  }
132 }
std::set< makVrv::DtElementID > Supplying
Definition: influenceManager.h:170
std::map< DtString, QTreeWidgetItem * > SuppliedInformation
Definition: aggregateSuppliesPageLogic.h:86
std::set< QString > myAmmunition
Definition: aggregateSuppliesPageLogic.h:81
DtItemUpdateFunctionCreator< DtAggregateReceivingSupply > DtAggregateReceivingSupplyCreator
Definition: aggregateSuppliesPageLogic.h:130
QString myCurrentValue
Definition: aggregateSuppliesPageLogic.h:125
DtUniqueID DtElementID
The ElementID is a specific type of unique ID used to represent VR-Vantage uniquely defined elements...
Definition: DtUniqueID.h:26
makVrv::DtSignalConnectionManager myConnections
Definition: aggregateSuppliesPageLogic.h:127
Definition: informationDialogPage.h:203
A structure composed of distinct fields, each of which is itself a property.
Definition: rwPropertiesStructure.h:21
SuppliedInformation mySuppliedInformation
Definition: aggregateSuppliesPageLogic.h:87
bool myInitialized
Definition: aggregateSuppliesPageLogic.h:84
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:24
DtAggregateReceivingSupply(makVrv::DtDe &de)
Definition: aggregateSuppliesPageLogic.h:93
QString myMode
Definition: aggregateSuppliesPageLogic.h:124
const char * source
Definition: lz4.h:436
unsigned long long DtUniqueID
Definition: DtUniqueID.h:22
int myNumberSupplying
Definition: aggregateSuppliesPageLogic.h:123
#define DT_DLL_VRFGUIOBJECTINFORMATIONQT
Contains DLL export macros.
Definition: vrfGuiObjectInformationQt.h:25
std::set< QString > mySupplies
Definition: aggregateSuppliesPageLogic.h:82
A list of properties.
Definition: rwProperties.h:126
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
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 Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)