VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
uiMultiSystemElement.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2015 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 #pragma once
12 
15 #include "ui_systemSelectionDialogUi.h"
17 
18 class QListWidget;
20 class QAbstractButton;
21 class QFrame;
24 
26 {
27  Q_OBJECT
28 
29 public:
30 
33 
35  virtual ~DtUiMultiSystemElement() override;
36 
37  virtual bool isModified() const override;
38 
40 
41  virtual void setEnabled(bool) override;
42 
43 protected:
44  virtual void updateEnableState();
45 
46  virtual void setFromParameters(const std::vector<DtReaderWriter*>& parentRw) override;
47  virtual void processUiEvent(const DtUiElementEvent&) override;
48 
49  virtual void createControls(QWidget*) override;
50 
51  virtual void elementChanged() override;
52 
54  virtual QString uniqueDisplayName(const QString& baseName, const DtRwString* system = 0);
55 
56  virtual DtSystemSelectionDialog* createSystemSelectionDialog(QWidget* p);
57  virtual DtSystemReplaceDialog* createSystemReplaceDialog(QWidget* p);
58 
59  virtual void dialogDone(bool) override;
60 
62  virtual DtRwVariableBindings* backupFor(const DtRwVariableBindings*, DtReaderWriter* source, int systemIndex) const;
63 
64  virtual void updateLabelTitle() override;
65  virtual void decorateElement() override;
66 
68  virtual DtFilename getSystemFilename() const override;
69 
70 protected:
71  virtual void addSystem(const DtSystemDefinitionInfo& systemDefInfo, QString, DtRwVariableBindings* curBindings);
72  virtual DtRwVariableBindings* removeSystem(const DtSystemDefinitionInfo* forReplace);
73 
74 protected slots:
75  virtual void chooseSystemToAdd();
76  //name is an optional parameter that will override the name generated by availableSystemName()
77  virtual void addSystem(const DtSystemDefinitionInfo& systemDefInfo, QString);
78  virtual void replaceSystemWithOtherSystem(const DtSystemDefinitionInfo& toReplaceWith, QString);
79  virtual void removeSystem();
80  virtual void onSelectionChanged();
81  virtual void openPropertyEditWindow() override;
82  virtual void dialogClosed();
83  virtual void onRemoveMissingSystems();
84  virtual void doneWithAdd(bool);
85  virtual void doneWithReplace(bool);
86  virtual void chooseSystemToReplace();
87  virtual void onRevertButtonClicked();
88 
89 public:
91  QListWidget* myList;
92  QAbstractButton* myAddButton;
93  QAbstractButton* myRemoveButton;
94  QAbstractButton* myPropertiesButton;
95  QAbstractButton* myLaunchOpdEditor;
96  QAbstractButton* myWarningButton;
97  QAbstractButton* myReplaceSystemButton;
98  QAbstractButton* myRevertButton;
99 
100 protected:
101  typedef std::map<DtReaderWriter*, std::vector<DtRwVariableBindings*> > SystemDescriptorMap;
103  typedef std::map<DtReaderWriter*, std::map<DtReaderWriter*, DtRwVariableBindings*> > BackupDescriptorMap;
107  std::vector<DtString> myMissingPlatforms;
108 
110 };
111 
113 
115 {
116  Q_OBJECT
117 public:
118  DtSystemSelectionDialog(QWidget* parent, Qt::WindowFlags f = 0);
119  virtual ~DtSystemSelectionDialog() override;
120 
121  virtual void setAvailableSystems(const DtSystemDefinitionInfoList& availableSystems);
122 
123 protected:
124  virtual void closeEvent(QCloseEvent*) override;
125  virtual void reject() override;
126  virtual void accept() override;
127 
128 protected slots:
129  virtual void selectionChanged(QListWidgetItem* current, QListWidgetItem* previous);
130  virtual void itemDoubleClicked(QListWidgetItem* item);
131 
132 signals:
133  void addSystem(const DtSystemDefinitionInfo&, QString);
134  void done(bool);
135 
136 protected:
137  Ui::DtSystemSelectionDialogUi myUiImpl;
138 };
139 
141 {
142  Q_OBJECT
143 public:
144  DtSystemReplaceDialog(QWidget* parent, std::string systemName, Qt::WindowFlags f = 0) :
145  DtSystemSelectionDialog(parent, f),
146  myOldSystemName(systemName)
147  {}
148 
149 protected:
150 
151  virtual void accept() override;
152  std::string myOldSystemName;
153 
154 signals:
155  void replaceSystemWithOtherSystem(const DtSystemDefinitionInfo&, QString);
156 
157 
158 };
159 
160 
163 
std::string myOldSystemName
Definition: uiMultiSystemElement.h:152
std::map< DtReaderWriter *, std::vector< DtRwVariableBindings * > > SystemDescriptorMap
Definition: uiMultiSystemElement.h:101
systemTypes
Definition: uiSystemElement.h:51
std::list< DtSystemDefinitionInfo > DtSystemDefinitionInfoList
Definition: componentSystemDatabase.h:34
QAbstractButton * myWarningButton
Definition: uiMultiSystemElement.h:96
Ui::DtSystemSelectionDialogUi myUiImpl
Definition: uiMultiSystemElement.h:137
virtual void processUiEvent(const DtUiElementEvent &)
Process ui event. Default does nothing.
Definition: uiElement.h:236
std::vector< DtString > myMissingPlatforms
Definition: uiMultiSystemElement.h:107
Definition: readerWriter.h:85
Description: Readable, Writable DtString Variable substitutions are done on this object when it is re...
Definition: rwString.h:20
QAbstractButton * myLaunchOpdEditor
Definition: uiMultiSystemElement.h:95
boost::function< DtUiElement *(makVrv::DtDe &)> CreatorFunction
Definition: uiElement.h:190
std::shared_ptr< DtSystemPropertyEditDialog > DtSystemPropertyEditDialogShdPtr
Definition: systemPropertyEditDialog.h:89
virtual void elementChanged()
virtual DtFilename getSystemFilename() const
Gets the system filename to edit.
bool myDialogDisplayed
Definition: uiMultiSystemElement.h:106
virtual void decorateElement()
Sets element decoration depending on the isModified state of the element. This version changes myLabe...
QListWidget * myList
Definition: uiMultiSystemElement.h:91
Q_DECLARE_METATYPE(DtArticulatedPartEditDialogShdPtr)
ReaderWriter object that maintains a list of reader-writer variable bindings. It keeps a list of name...
Definition: rwVariableBindings.h:27
DtSystemReplaceDialog(QWidget *parent, std::string systemName, Qt::WindowFlags f=0)
Definition: uiMultiSystemElement.h:144
Structure that holds additional information about a DtComponentSystemDefinition that is loaded by the...
Definition: componentSystemDatabase.h:28
QAbstractButton * myRemoveButton
Definition: uiMultiSystemElement.h:93
virtual void dialogDone(bool)
Dialog for selecting a system from the provided system list.
Definition: uiMultiSystemElement.h:114
BackupDescriptorMap myBackupList
Definition: uiMultiSystemElement.h:104
bool myCurrentlyEnabled
Definition: uiMultiSystemElement.h:105
virtual bool isModified() const
virtual void createControls(QWidget *parent) override
If additional widgets or connections need to be made do it here. The parent is the myWidget member...
QAbstractButton * myAddButton
Definition: uiMultiSystemElement.h:92
DtSystemPropertyEditDialogShdPtr myCurrentDialog
Definition: uiMultiSystemElement.h:90
virtual void setFromParameters(const std::vector< DtReaderWriter * > &parentRw) override
QAbstractButton * myReplaceSystemButton
Definition: uiMultiSystemElement.h:97
DtUiSystemElement::systemTypes mySystemType
Definition: uiMultiSystemElement.h:109
const char * source
Definition: lz4.h:442
QAbstractButton * myRevertButton
Definition: uiMultiSystemElement.h:98
virtual void setEnabled(bool)
If this item is not enabled it cannot be modified.
virtual void openPropertyEditWindow()
Descriptor for a DtComponentSystem. Specified a system being added to an entity. This does not actual...
Definition: componentSystemDescriptor.h:23
SystemDescriptorMap mySystemDescriptors
Definition: uiMultiSystemElement.h:102
std::map< DtReaderWriter *, std::map< DtReaderWriter *, DtRwVariableBindings * > > BackupDescriptorMap
Definition: uiMultiSystemElement.h:103
Definition: uiMultiSystemElement.h:25
QAbstractButton * myPropertiesButton
Definition: uiMultiSystemElement.h:94
The DtUiElement class is the base for which all UI elements are defined. If you wish to create a new ...
Definition: uiElement.h:97
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
Definition: uiSystemElement.h:25
virtual void accept() override
virtual void updateLabelTitle()
Updates label title based on valid units.
Definition: uiMultiSystemElement.h:140
#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:185

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)