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();
36 
39  virtual void setPart(const DtSimArtPartDescriptor& descriptor,
40  const std::set<DtArtPartType>& otherParts,
41  const DtSimArtPartDescriptor* modelDefault,
42  const DtSimArtPartDescriptor* componentDefault);
43 
44  virtual bool getPart(DtSimArtPartDescriptor& descriptor);
45 
46  virtual bool useModelDefaults() const;
47 
48  virtual bool useComponentDefaults() const;
49 
50  virtual void setEnabled(bool);
51 
52  virtual void accept();
53  virtual void reject();
54 
55  virtual void setPartName(const QString&);
56 
57 public:
58  virtual int exec();
59  virtual void execModeless(DtUiElement*);
60 
61 protected:
62  virtual void closeEvent(QCloseEvent* e);
63 
64  virtual void setValuesFromPart(const DtSimArtPartDescriptor& descriptor);
65 
68  virtual void determineIfSettingsMatchDefaults();
69 
70 protected slots:
71 
72  virtual void setEditOccurred(int editType);
73 
74  virtual void restoreModelDefaults();
75 
76  virtual void restoreComponentDefaults();
77 
78 signals:
79  void uiEvent(const DtUiElementEvent&);
80 
81 public:
82  Ui::DtArticulatedPartEditDialogUi myUiImpl;
84 
85 protected:
86  bool myModeless;
87 
89  bool myEnabled;
90 
91  DtArtPartType myPartType;
92 
93  QSignalMapper* myEditMapper;
94 
95  std::set<DtArtPartType> myOtherParts;
96 
99 
102 
104 
105  std::vector<bool> myHasEdits;
106 
107  const QString myRestoreFromCompText;
109  const QString myRestoreFromModelText;
111 
112  QString myPartName;
114 };
115 
116 typedef DtBoost::shared_ptr<DtArticulatedPartEditDialog> DtArticulatedPartEditDialogShdPtr;
118 
QSignalMapper * myEditMapper
Definition: articulatedPartEditDialog.h:93
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:88
std::vector< bool > myHasEdits
Definition: articulatedPartEditDialog.h:105
bool myUseComponentDefault
Definition: articulatedPartEditDialog.h:101
DtArtPartType myPartType
Definition: articulatedPartEditDialog.h:91
Q_DECLARE_METATYPE(DtArticulatedPartEditDialogShdPtr)
DtUiElement * myElement
Definition: articulatedPartEditDialog.h:83
ReaderWriter object that maintains a list of reader-writer variable bindings. It keeps a list of name...
Definition: rwVariableBindings.h:27
bool myModeless
Definition: articulatedPartEditDialog.h:86
bool myUseModelDefault
Definition: articulatedPartEditDialog.h:98
const QString myRestoreFromModelTextNotNeeded
Definition: articulatedPartEditDialog.h:110
DtSimArtPartDescriptor myOrigState
Definition: articulatedPartEditDialog.h:103
const DtSimArtPartDescriptor * myModelDefault
Definition: articulatedPartEditDialog.h:97
Ui::DtArticulatedPartEditDialogUi myUiImpl
Definition: articulatedPartEditDialog.h:82
QString myPartName
Definition: articulatedPartEditDialog.h:112
bool myEnabled
Definition: articulatedPartEditDialog.h:89
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:100
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:107
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:72
DtBoost::shared_ptr< DtArticulatedPartEditDialog > DtArticulatedPartEditDialogShdPtr
Definition: articulatedPartEditDialog.h:116
const QString myRestoreFromCompTextNotNeeded
Definition: articulatedPartEditDialog.h:108
std::set< DtArtPartType > myOtherParts
Definition: articulatedPartEditDialog.h:95
const QString myRestoreFromModelText
Definition: articulatedPartEditDialog.h:109
DtUiElement * myElementParent
Definition: articulatedPartEditDialog.h:113
#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:183

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)