VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
uiArticulatedPartsElement.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2019 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 #pragma once
12 
15 #include "ui_articulatedPartSelectionDialogUi.h"
18 #include <vrfutil/enumDictionary.h>
19 
20 class QTreeWidget;
21 class QTreeWidgetItem;
22 class QAbstractButton;
23 class QFrame;
28 
30 {
31  Q_OBJECT
32 
33 public:
34 
37 
39  virtual ~DtUiArticulatedPartsElement();
40 
42 
43  virtual void setEnabled(bool);
44 
45  virtual DtVector attachPointFor(int part) const;
46 
47 protected:
48  virtual void removePartsForSystem(const DtComponentSystemDescriptor* def);
49  virtual void removePartsForSystem(const DtComponentSystemDefinition* def, const DtString& systemName);
50 
51  virtual void addPartsForSystem(const DtComponentSystemDescriptor* def);
52  virtual void addPartsForSystem(const DtComponentSystemDefinition* def);
53 
54  virtual void updateEnableState();
55 
56  virtual void setFromParameters(const std::vector<DtReaderWriter*>& parentRw);
57  virtual void processUiEvent(const DtUiElementEvent&);
58 
59  virtual void createControls(QWidget*);
60 
61  virtual void elementChanged();
62 
64  virtual QString uniqueDisplayName(const QString& baseName, const DtRwString* system = 0);
65 
66  virtual DtArticulatedPartEditDialog* createArticulatedPartEditDialog(QWidget* p);
67 
68  virtual DtArticulatedPartSelectionDialog* createArticulatedPartSelectionDialog(QWidget* p);
69 
71  virtual void addPartToGui(DtArtPartType partNum, const QString& partName,
72  const QString& assocComp, const QString& comment, const std::list<QString>& sources);
73 
75  virtual void refreshGui();
76 
77  virtual void updateLabelTitle();
78  virtual void decorateElement();
79 
81  virtual void addPartLocationMark();
82 
84  virtual void removePartLocationMark();
85 
87  virtual void slot_facadesCreated(const DtDisplayDefinitionWidget::Facades&);
88 
90  void disableAllPartAnimations();
91 
92  virtual bool isWheel(int partNum, DtVector& maxRot, DtVector& minRot, DtVector& rotRate) const;
93 
94 protected slots:
95  virtual void choosePartToAdd();
96  virtual void addPart(DtArtPartType partNum);
97  virtual void removePart();
98  virtual void onSelectionChanged();
99  virtual void openEditWindow();
100  virtual void onItemChanged(QTreeWidgetItem*, int);
101  virtual void doneWithAdd(bool);
102  virtual void acceptEdit();
103  virtual void rejectEdit();
104 
105 public:
108  QAbstractButton* myAddButton;
109  QAbstractButton* myRemoveButton;
110  QAbstractButton* myEditButton;
111  QAbstractButton* myWarningButton;
112 
113  static QString theAttachPointSuffix;
114  static QString theEndPointSuffix;
115 
116 protected:
119  std::vector<DtString> myMissingPlatforms;
120  std::map<DtArtPartType, DtSimArtPartDescriptor> myModelParts;
121  std::map<DtArtPartType, DtSimArtPartDescriptor> myComponentDefaultParts;
122  QString myMarkedPart;
125 
126  std::set<int> myFacadeParts;
127 
129 };
130 
133 {
134  Q_OBJECT
135 public:
136  DtArticulatedPartSelectionDialog(makVrv::DtDe& de, QWidget* parent, Qt::WindowFlags f = 0);
138 
139  virtual void setAvailableParts(const DtEnumDictionary::EnumMap& availableParts,
140  const std::set<DtArtPartType>& partsWithVisualModelDefaults);
141 
142 protected:
143  virtual void closeEvent(QCloseEvent*);
144  virtual void reject();
145  virtual void accept();
146 
147 protected slots:
148 
149  void validateSelection();
150 
151 signals:
152  void addPart(DtArtPartType partNum);
153  void done(bool);
154 
155 protected:
156  Ui::DtArticulatedPartSelectionDialogUi myUiImpl;
158 };
159 
QAbstractButton * myRemoveButton
Definition: uiArticulatedPartsElement.h:109
std::map< DtArtPartType, DtSimArtPartDescriptor > myComponentDefaultParts
Definition: uiArticulatedPartsElement.h:121
bool myDialogDisplayed
Definition: uiArticulatedPartsElement.h:118
DtDisplayDefinitionWidget::Facades myFacades
Definition: uiArticulatedPartsElement.h:123
std::map< DtArtPartType, DtSimArtPartDescriptor > myModelParts
Definition: uiArticulatedPartsElement.h:120
virtual void createControls(QWidget *parent)
If additional widgets or connections need to be made do it here. The parent is the myWidget member...
virtual void setFromParameters(DtReaderWriter *parentRw)
Calls setFromParameters with std::vector of parameter.
A readable, writable type that holds an articulated part type, attached-to part type, attachment point, and a list of art-part params (DtSimArtPartParamList).
Definition: simArtPartDescriptor.h:28
makVrv::DtSignalConnectionManager myConnections
Definition: uiArticulatedPartsElement.h:124
virtual void processUiEvent(const DtUiElementEvent &)
Process ui event. Default does nothing.
Definition: uiElement.h:223
Dialog for selecting an articulated from the provided list.
Definition: uiArticulatedPartsElement.h:132
Description: Readable, Writable DtString Variable substitutions are done on this object when it is re...
Definition: rwString.h:20
static QString theEndPointSuffix
Definition: uiArticulatedPartsElement.h:114
boost::function< DtUiElement *(makVrv::DtDe &)> CreatorFunction
Definition: uiElement.h:177
Definition: uiArticulatedPartsElement.h:29
bool myCurrentlyEnabled
Definition: uiArticulatedPartsElement.h:117
virtual void elementChanged()
Ui::DtArticulatedPartSelectionDialogUi myUiImpl
Definition: uiArticulatedPartsElement.h:156
virtual void decorateElement()
Sets element decoration depending on the isModified state of the element.
QAbstractButton * myAddButton
Definition: uiArticulatedPartsElement.h:108
DtComponentSystemDefinition.
Definition: componentSystemDefinition.h:25
QIcon myVisualModelIcon
Definition: uiArticulatedPartsElement.h:128
QTreeWidget * myTree
Definition: uiArticulatedPartsElement.h:107
DtArticulatedPartEditDialogShdPtr myCurrentDialog
Definition: uiArticulatedPartsElement.h:106
QAbstractButton * myWarningButton
Definition: uiArticulatedPartsElement.h:111
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
std::vector< makVrf::DtVrfObjectFacadeInterface * > Facades
Definition: displayDefinitionWidget.h:178
QAbstractButton * myEditButton
Definition: uiArticulatedPartsElement.h:110
virtual void setEnabled(bool)
If this item is not enabled it cannot be modified.
QString myMarkedPart
Definition: uiArticulatedPartsElement.h:122
Descriptor for a DtComponentSystem.
Definition: componentSystemDescriptor.h:23
static QString theAttachPointSuffix
Definition: uiArticulatedPartsElement.h:113
Dialog which allows the user to view and edit the parameters for an articulated part.
Definition: articulatedPartEditDialog.h:29
std::vector< DtString > myMissingPlatforms
Definition: uiArticulatedPartsElement.h:119
The DtUiElement class is the base for which all UI elements are defined.
Definition: uiElement.h:95
std::set< int > myFacadeParts
Definition: uiArticulatedPartsElement.h:126
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
makVrv::DtDe & myDe
Definition: uiArticulatedPartsElement.h:157
std::map< int, DtEnumInfo > EnumMap
Definition: enumDictionary.h:108
DtBoost::shared_ptr< DtArticulatedPartEditDialog > DtArticulatedPartEditDialogShdPtr
Definition: articulatedPartEditDialog.h:116
virtual void updateLabelTitle()
Updates label title based on valid units.
#define DT_DLL_simulationObjectEditorimpl
This file is used to determine how to build.
Definition: simulationObjectEditorImplDefines.h:32
Base class of the ui element class chain.
Definition: uiElement.h:172

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)