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 bool selectedSystemInherited() const;
45  virtual void updateEnableState();
46 
47  virtual void setFromParameters(const std::vector<DtReaderWriter*>& parentRw) override;
48  virtual void processUiEvent(const DtUiElementEvent&) override;
49 
50  virtual void createControls(QWidget*) override;
51 
52  virtual void elementChanged() override;
53 
55  virtual QString uniqueDisplayName(const QString& baseName, const DtRwString* system = 0);
56 
57  virtual DtSystemSelectionDialog* createSystemSelectionDialog(QWidget* p);
58  virtual DtSystemReplaceDialog* createSystemReplaceDialog(QWidget* p);
59 
60  virtual void dialogDone(bool) override;
61 
63  virtual DtRwVariableBindings* backupFor(const DtRwVariableBindings*, DtReaderWriter* source, int systemIndex) const;
64 
65  virtual void updateLabelTitle() override;
66  virtual void decorateElement() override;
67 
69  virtual DtFilename getSystemFilename() const override;
70 
71 protected:
72  virtual void addSystem(const DtSystemDefinitionInfo& systemDefInfo, QString, DtRwVariableBindings* curBindings);
73  virtual DtRwVariableBindings* removeSystem(const DtSystemDefinitionInfo* forReplace);
74 
83  virtual bool restoreRemovedInheritedSystem(const DtSystemDefinitionInfo& sysDefInfo);
84 
85 protected slots:
86  virtual void chooseSystemToAdd();
87  //name is an optional parameter that will override the name generated by availableSystemName()
88  virtual void addSystem(const DtSystemDefinitionInfo& systemDefInfo, QString);
89  virtual void replaceSystemWithOtherSystem(const DtSystemDefinitionInfo& toReplaceWith, QString);
90  virtual void removeSystem();
91  virtual void onSelectionChanged();
92  virtual void openPropertyEditWindow() override;
93  virtual void dialogClosed();
94  virtual void onRemoveMissingSystems();
95  virtual void doneWithAdd(bool);
96  virtual void doneWithReplace(bool);
97  virtual void chooseSystemToReplace();
98  virtual void onRevertButtonClicked();
99 
100 public:
102  QListWidget* myList;
103  QAbstractButton* myAddButton;
104  QAbstractButton* myRemoveButton;
105  QAbstractButton* myPropertiesButton;
106  QAbstractButton* myLaunchOpdEditor;
107  QAbstractButton* myWarningButton;
108  QAbstractButton* myReplaceSystemButton;
109  QAbstractButton* myRevertButton;
110 
111 protected:
112  typedef std::map<DtReaderWriter*, std::vector<DtRwVariableBindings*> > SystemDescriptorMap;
114  typedef std::map<DtReaderWriter*, std::map<DtReaderWriter*, DtRwVariableBindings*> > BackupDescriptorMap;
118  std::vector<DtString> myMissingPlatforms;
119 
121 };
122 
124 
126 {
127  Q_OBJECT
128 public:
129  DtSystemSelectionDialog(QWidget* parent, Qt::WindowFlags f = 0);
130  virtual ~DtSystemSelectionDialog() override;
131 
132  virtual void setAvailableSystems(const DtSystemDefinitionInfoList& availableSystems);
133 
134 protected:
135  virtual void closeEvent(QCloseEvent*) override;
136  virtual void reject() override;
137  virtual void accept() override;
138 
139 protected slots:
140  virtual void selectionChanged(QListWidgetItem* current, QListWidgetItem* previous);
141  virtual void itemDoubleClicked(QListWidgetItem* item);
142 
143 signals:
144  void addSystem(const DtSystemDefinitionInfo&, QString);
145  void done(bool);
146 
147 protected:
148  Ui::DtSystemSelectionDialogUi myUiImpl;
149 };
150 
152 {
153  Q_OBJECT
154 public:
155  DtSystemReplaceDialog(QWidget* parent, std::string systemName, Qt::WindowFlags f = 0) :
156  DtSystemSelectionDialog(parent, f),
157  myOldSystemName(systemName)
158  {}
159 
160 protected:
161 
162  virtual void accept() override;
163  std::string myOldSystemName;
164 
165 signals:
166  void replaceSystemWithOtherSystem(const DtSystemDefinitionInfo&, QString);
167 
168 
169 };
170 
171 
174 
std::string myOldSystemName
Definition: uiMultiSystemElement.h:163
std::map< DtReaderWriter *, std::vector< DtRwVariableBindings * > > SystemDescriptorMap
Definition: uiMultiSystemElement.h:112
systemTypes
Definition: uiSystemElement.h:51
std::list< DtSystemDefinitionInfo > DtSystemDefinitionInfoList
Definition: componentSystemDatabase.h:34
QAbstractButton * myWarningButton
Definition: uiMultiSystemElement.h:107
Ui::DtSystemSelectionDialogUi myUiImpl
Definition: uiMultiSystemElement.h:148
virtual void processUiEvent(const DtUiElementEvent &)
Process ui event. Default does nothing.
Definition: uiElement.h:244
std::vector< DtString > myMissingPlatforms
Definition: uiMultiSystemElement.h:118
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:106
boost::function< DtUiElement *(makVrv::DtDe &)> CreatorFunction
Definition: uiElement.h:198
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:117
virtual void decorateElement()
Sets element decoration depending on the isModified state of the element. This version changes myLabe...
QListWidget * myList
Definition: uiMultiSystemElement.h:102
Q_DECLARE_METATYPE(DtArticulatedPartEditDialogShdPtr)
ReaderWriter object that maintains a list of reader-writer variable bindings. It keeps a list of name...
Definition: rwVariableBindings.h:28
DtSystemReplaceDialog(QWidget *parent, std::string systemName, Qt::WindowFlags f=0)
Definition: uiMultiSystemElement.h:155
Structure that holds additional information about a DtComponentSystemDefinition that is loaded by the...
Definition: componentSystemDatabase.h:28
QAbstractButton * myRemoveButton
Definition: uiMultiSystemElement.h:104
virtual void dialogDone(bool)
Dialog for selecting a system from the provided system list.
Definition: uiMultiSystemElement.h:125
BackupDescriptorMap myBackupList
Definition: uiMultiSystemElement.h:115
bool myCurrentlyEnabled
Definition: uiMultiSystemElement.h:116
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:103
DtSystemPropertyEditDialogShdPtr myCurrentDialog
Definition: uiMultiSystemElement.h:101
virtual void setFromParameters(const std::vector< DtReaderWriter * > &parentRw) override
QAbstractButton * myReplaceSystemButton
Definition: uiMultiSystemElement.h:108
DtUiSystemElement::systemTypes mySystemType
Definition: uiMultiSystemElement.h:120
const char * source
Definition: lz4.h:442
QAbstractButton * myRevertButton
Definition: uiMultiSystemElement.h:109
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:25
SystemDescriptorMap mySystemDescriptors
Definition: uiMultiSystemElement.h:113
std::map< DtReaderWriter *, std::map< DtReaderWriter *, DtRwVariableBindings * > > BackupDescriptorMap
Definition: uiMultiSystemElement.h:114
Definition: uiMultiSystemElement.h:25
QAbstractButton * myPropertiesButton
Definition: uiMultiSystemElement.h:105
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:151
#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)