VR-Forces 5.0.2 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();
36 
37  virtual bool isModified() const;
38 
40 
41  virtual void setEnabled(bool);
42 
43 protected:
44  virtual void updateEnableState();
45 
46  virtual void setFromParameters(const std::vector<DtReaderWriter*>& parentRw);
47  virtual void processUiEvent(const DtUiElementEvent&);
48 
49  virtual void createControls(QWidget*);
50 
51  virtual void elementChanged();
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);
60 
62  virtual DtRwVariableBindings* backupFor(const DtRwVariableBindings*, DtReaderWriter* source, int systemIndex) const;
63 
64  virtual void updateLabelTitle();
65  virtual void decorateElement();
66 
68  virtual DtFilename getSystemFilename() const;
69 
70 protected slots:
71  virtual void chooseSystemToAdd();
72  //name is an optional parameter that will override the name generated by availableSystemName()
73  virtual void addSystem(const DtSystemDefinitionInfo& systemDefInfo, QString);
74  virtual void replaceSystemWithOtherSystem(const DtSystemDefinitionInfo& toReplaceWith, QString);
75  virtual void removeSystem();
76  virtual void onSelectionChanged();
77  virtual void openPropertyEditWindow();
78  virtual void dialogClosed();
79  virtual void onRemoveMissingSystems();
80  virtual void doneWithAdd(bool);
81  virtual void doneWithReplace(bool);
82  virtual void chooseSystemToReplace();
83  virtual void onRevertButtonClicked();
84 
85 public:
87  QListWidget* myList;
88  QAbstractButton* myAddButton;
89  QAbstractButton* myRemoveButton;
90  QAbstractButton* myPropertiesButton;
91  QAbstractButton* myLaunchOpdEditor;
92  QAbstractButton* myWarningButton;
93  QAbstractButton* myReplaceSystemButton;
94  QAbstractButton* myRevertButton;
95 
96 protected:
97  typedef std::map<DtReaderWriter*, std::vector<DtRwVariableBindings*> > SystemDescriptorMap;
99  typedef std::map<DtReaderWriter*, std::map<DtReaderWriter*, DtRwVariableBindings*> > BackupDescriptorMap;
103  std::vector<DtString> myMissingPlatforms;
104 
106 };
107 
109 
111 {
112  Q_OBJECT
113 public:
114  DtSystemSelectionDialog(QWidget* parent, Qt::WindowFlags f = 0);
115  virtual ~DtSystemSelectionDialog();
116 
117  virtual void setAvailableSystems(const DtSystemDefinitionInfoList& availableSystems);
118 
119 protected:
120  virtual void closeEvent(QCloseEvent*);
121  virtual void reject();
122  virtual void accept();
123 
124 protected slots:
125  virtual void selectionChanged(QListWidgetItem* current, QListWidgetItem* previous);
126  virtual void itemDoubleClicked(QListWidgetItem* item);
127 
128 signals:
129  void addSystem(const DtSystemDefinitionInfo&, QString);
130  void done(bool);
131 
132 protected:
133  Ui::DtSystemSelectionDialogUi myUiImpl;
134 };
135 
137 {
138  Q_OBJECT
139 public:
140  DtSystemReplaceDialog(QWidget* parent, std::string systemName, Qt::WindowFlags f = 0) :
141  DtSystemSelectionDialog(parent, f),
142  myOldSystemName(systemName)
143  {}
144 
145 protected:
146 
147  virtual void accept();
148  std::string myOldSystemName;
149 
150 signals:
151  void replaceSystemWithOtherSystem(const DtSystemDefinitionInfo&, QString);
152 
153 
154 };
155 
156 
159 
std::string myOldSystemName
Definition: uiMultiSystemElement.h:148
std::map< DtReaderWriter *, std::vector< DtRwVariableBindings * > > SystemDescriptorMap
Definition: uiMultiSystemElement.h:97
virtual void accept()
systemTypes
Definition: uiSystemElement.h:51
std::list< DtSystemDefinitionInfo > DtSystemDefinitionInfoList
Definition: componentSystemDatabase.h:34
QAbstractButton * myWarningButton
Definition: uiMultiSystemElement.h:92
Ui::DtSystemSelectionDialogUi myUiImpl
Definition: uiMultiSystemElement.h:133
virtual void processUiEvent(const DtUiElementEvent &)
Process ui event. Default does nothing.
Definition: uiElement.h:231
std::vector< DtString > myMissingPlatforms
Definition: uiMultiSystemElement.h:103
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:91
boost::function< DtUiElement *(makVrv::DtDe &)> CreatorFunction
Definition: uiElement.h:185
virtual void elementChanged()
virtual DtFilename getSystemFilename() const
Gets the system filename to edit.
bool myDialogDisplayed
Definition: uiMultiSystemElement.h:102
virtual void decorateElement()
Sets element decoration depending on the isModified state of the element. This version changes myLabe...
QListWidget * myList
Definition: uiMultiSystemElement.h:87
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:140
Structure that holds additional information about a DtComponentSystemDefinition that is loaded by the...
Definition: componentSystemDatabase.h:28
QAbstractButton * myRemoveButton
Definition: uiMultiSystemElement.h:89
virtual void dialogDone(bool)
virtual void createControls(QWidget *parent)
If additional widgets or connections need to be made do it here. The parent is the myWidget member...
Dialog for selecting a system from the provided system list.
Definition: uiMultiSystemElement.h:110
BackupDescriptorMap myBackupList
Definition: uiMultiSystemElement.h:100
bool myCurrentlyEnabled
Definition: uiMultiSystemElement.h:101
virtual bool isModified() const
QAbstractButton * myAddButton
Definition: uiMultiSystemElement.h:88
DtSystemPropertyEditDialogShdPtr myCurrentDialog
Definition: uiMultiSystemElement.h:86
QAbstractButton * myReplaceSystemButton
Definition: uiMultiSystemElement.h:93
DtUiSystemElement::systemTypes mySystemType
Definition: uiMultiSystemElement.h:105
const char * source
Definition: lz4.h:442
QAbstractButton * myRevertButton
Definition: uiMultiSystemElement.h:94
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:98
std::map< DtReaderWriter *, std::map< DtReaderWriter *, DtRwVariableBindings * > > BackupDescriptorMap
Definition: uiMultiSystemElement.h:99
DtBoost::shared_ptr< DtSystemPropertyEditDialog > DtSystemPropertyEditDialogShdPtr
Definition: systemPropertyEditDialog.h:89
Definition: uiMultiSystemElement.h:25
QAbstractButton * myPropertiesButton
Definition: uiMultiSystemElement.h:90
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:70
virtual void setFromParameters(const std::vector< DtReaderWriter * > &parentRw)
Definition: uiSystemElement.h:25
virtual void updateLabelTitle()
Updates label title based on valid units.
Definition: uiMultiSystemElement.h:136
#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:180

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)