VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
articulatedPartEditDialog.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 
14 #include <QtWidgets/QDialog>
16 #include <vlutil/vlSmartPointers.h>
19 #include "ui_articulatedPartEditDialogUi.h"
20 
22 class QPushButton;
23 class DtUiElement;
24 class DtUiElementEvent;
25 class QSignalMapper;
26 
30 {
31  Q_OBJECT
32 public:
33  DtArticulatedPartEditDialog(makVrv::DtDe&, DtUiElement* elementParent, QWidget* parent, Qt::WindowFlags f = Qt::Tool);
34 
35  virtual ~DtArticulatedPartEditDialog() override;
36 
39  virtual void setPart(const DtSimArtPartDescriptor& descriptor, const std::set<DtArtPartType>& otherParts,
40  const DtSimArtPartDescriptor* modelDefault, const DtSimArtPartDescriptor* componentDefault,
41  const DtSimArtPartDescriptorList& allPartDescriptors);
42 
43  virtual bool getPart(DtSimArtPartDescriptor& descriptor);
44 
45  virtual bool useModelDefaults() const;
46 
47  virtual bool useComponentDefaults() const;
48 
49  virtual void setEnabled(bool);
50 
51  virtual void accept() override;
52  virtual void reject() override;
53 
54  virtual void setPartName(const QString&);
55 
56 public:
57  virtual int exec() override;
58  virtual void execModeless(DtUiElement*);
59 
60 protected:
61  virtual void closeEvent(QCloseEvent* e) override;
62 
63  virtual void setValuesFromPart(const DtSimArtPartDescriptor& descriptor);
64 
67  virtual void determineIfSettingsMatchDefaults();
68 
69 protected slots:
70 
71  virtual void setEditOccurred(int editType);
72 
73  virtual void restoreModelDefaults();
74 
75  virtual void restoreComponentDefaults();
76 
77 signals:
78  void uiEvent(const DtUiElementEvent&);
79 
80 public:
81  Ui::DtArticulatedPartEditDialogUi myUiImpl;
83 
84 protected:
85  bool myModeless;
86 
88  bool myEnabled;
89 
90  DtArtPartType myPartType;
91 
92  QSignalMapper* myEditMapper;
93 
94  std::set<DtArtPartType> myOtherParts;
95 
98 
101 
103 
105 
106  std::vector<bool> myHasEdits;
107 
108  const QString myRestoreFromCompText;
110  const QString myRestoreFromModelText;
112 
113  QString myPartName;
115 };
116 
117 typedef std::shared_ptr<DtArticulatedPartEditDialog> DtArticulatedPartEditDialogShdPtr;
119 
QSignalMapper * myEditMapper
Definition: articulatedPartEditDialog.h:92
A readable, writable type that holds an articulated part type, attached-to part type, attachment point, and a list of art-part params (DtSimArtPartParamList). The read/write name is not used for anything in particular, and therefore may be used for file readability.
Definition: simArtPartDescriptor.h:28
makVrv::DtDe & myDe
Definition: articulatedPartEditDialog.h:87
std::vector< bool > myHasEdits
Definition: articulatedPartEditDialog.h:106
bool myUseComponentDefault
Definition: articulatedPartEditDialog.h:100
DtArtPartType myPartType
Definition: articulatedPartEditDialog.h:90
std::shared_ptr< DtArticulatedPartEditDialog > DtArticulatedPartEditDialogShdPtr
Definition: articulatedPartEditDialog.h:117
Q_DECLARE_METATYPE(DtArticulatedPartEditDialogShdPtr)
DtUiElement * myElement
Definition: articulatedPartEditDialog.h:82
Instances of DtSimArtPartDescriptorList are lists of DtSimArtPartDescriptors. This is an optional par...
Definition: simArtPartDescriptorList.h:16
ReaderWriter object that maintains a list of reader-writer variable bindings. It keeps a list of name...
Definition: rwVariableBindings.h:28
bool myModeless
Definition: articulatedPartEditDialog.h:85
bool myUseModelDefault
Definition: articulatedPartEditDialog.h:97
const QString myRestoreFromModelTextNotNeeded
Definition: articulatedPartEditDialog.h:111
DtSimArtPartDescriptor myOrigState
Definition: articulatedPartEditDialog.h:102
DtSimArtPartDescriptorList myArtPartDescriptors
Definition: articulatedPartEditDialog.h:104
const DtSimArtPartDescriptor * myModelDefault
Definition: articulatedPartEditDialog.h:96
Ui::DtArticulatedPartEditDialogUi myUiImpl
Definition: articulatedPartEditDialog.h:81
QString myPartName
Definition: articulatedPartEditDialog.h:113
bool myEnabled
Definition: articulatedPartEditDialog.h:88
Dialog which allows the user to view and edit the parameters for an articulated part.
Definition: articulatedPartEditDialog.h:29
const DtSimArtPartDescriptor * myComponentDefault
Definition: articulatedPartEditDialog.h:99
The DtUiElement class is the base for which all UI elements are defined. If you wish to create a new ...
Definition: uiElement.h:97
const QString myRestoreFromCompText
Definition: articulatedPartEditDialog.h:108
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
const QString myRestoreFromCompTextNotNeeded
Definition: articulatedPartEditDialog.h:109
std::set< DtArtPartType > myOtherParts
Definition: articulatedPartEditDialog.h:94
const QString myRestoreFromModelText
Definition: articulatedPartEditDialog.h:110
DtUiElement * myElementParent
Definition: articulatedPartEditDialog.h:114
#define DT_DLL_simulationObjectEditorimpl
This file is used to determine how to build.
Definition: simulationObjectEditorImplDefines.h:33
Base class of the ui element class chain. Properties available through designer for all ui elements a...
Definition: uiElement.h:193

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)