VR-Forces 4.8 Class Documentation
 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;
23 
25 {
26  Q_OBJECT
27 
28 public:
29 
32 
34  virtual ~DtUiMultiSystemElement();
35 
36  virtual bool isModified() const;
37 
39 
40  virtual void setEnabled(bool);
41 
42 protected:
43  virtual void updateEnableState();
44 
45  virtual void setFromParameters(const std::vector<DtReaderWriter*>& parentRw);
46  virtual void processUiEvent(const DtUiElementEvent&);
47 
48  virtual void createControls(QWidget*);
49 
50  virtual void elementChanged();
51 
53  virtual QString uniqueDisplayName(const QString& baseName, const DtRwString* system = 0);
54 
55  virtual DtSystemSelectionDialog* createSystemSelectionDialog(QWidget* p);
56 
57  virtual void dialogDone(bool);
58 
60  virtual DtRwVariableBindings* backupFor(const DtRwVariableBindings*, DtReaderWriter* source, int systemIndex) const;
61 
62  virtual void updateLabelTitle();
63  virtual void decorateElement();
64 
66  virtual DtFilename getSystemFilename() const;
67 
68 protected slots:
69  virtual void chooseSystemToAdd();
70  virtual void addSystem(const DtSystemDefinitionInfo& systemDefInfo);
71  virtual void removeSystem();
72  virtual void onSelectionChanged();
73  virtual void openPropertyEditWindow();
74  virtual void dialogClosed();
75  virtual void onRemoveMissingSystems();
76  virtual void doneWithAdd(bool);
77 
78 public:
80  QListWidget* myList;
81  QAbstractButton* myAddButton;
82  QAbstractButton* myRemoveButton;
83  QAbstractButton* myPropertiesButton;
84  QAbstractButton* myLaunchOpdEditor;
85  QAbstractButton* myWarningButton;
86 
87 protected:
88  typedef std::map<DtReaderWriter*, std::vector<DtRwVariableBindings*> > SystemDescriptorMap;
90  typedef std::map<DtReaderWriter*, std::map<DtReaderWriter*, DtRwVariableBindings*> > BackupDescriptorMap;
94  std::vector<DtString> myMissingPlatforms;
95 };
96 
98 
100 {
101  Q_OBJECT
102 public:
103  DtSystemSelectionDialog(QWidget* parent, Qt::WindowFlags f = 0);
104  virtual ~DtSystemSelectionDialog();
105 
106  virtual void setAvailableSystems(const DtSystemDefinitionInfoList& availableSystems);
107 
108 protected:
109  virtual void closeEvent(QCloseEvent*);
110  virtual void reject();
111  virtual void accept();
112 
113 protected slots:
114  virtual void selectionChanged(QListWidgetItem* current, QListWidgetItem* previous);
115  virtual void itemDoubleClicked(QListWidgetItem* item);
116 
117 signals:
118  void addSystem(const DtSystemDefinitionInfo&);
119  void done(bool);
120 
121 protected:
122  Ui::DtSystemSelectionDialogUi myUiImpl;
123 };
124 
125 
std::map< DtReaderWriter *, std::vector< DtRwVariableBindings * > > SystemDescriptorMap
Definition: uiMultiSystemElement.h:88
std::list< DtSystemDefinitionInfo > DtSystemDefinitionInfoList
Definition: componentSystemDatabase.h:34
QAbstractButton * myWarningButton
Definition: uiMultiSystemElement.h:85
Ui::DtSystemSelectionDialogUi myUiImpl
Definition: uiMultiSystemElement.h:122
virtual void processUiEvent(const DtUiElementEvent &)
Process ui event. Default does nothing.
Definition: uiElement.h:220
std::vector< DtString > myMissingPlatforms
Definition: uiMultiSystemElement.h:94
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:84
boost::function< DtUiElement *(makVrv::DtDe &)> CreatorFunction
Definition: uiElement.h:174
virtual void elementChanged()
virtual DtFilename getSystemFilename() const
Gets the system filename to edit.
bool myDialogDisplayed
Definition: uiMultiSystemElement.h:93
virtual void decorateElement()
Sets element decoration depending on the isModified state of the element.
QListWidget * myList
Definition: uiMultiSystemElement.h:80
Q_DECLARE_METATYPE(DtArticulatedPartEditDialogShdPtr)
ReaderWriter object that maintains a list of reader-writer variable bindings.
Definition: rwVariableBindings.h:27
Structure that holds additional information about a DtComponentSystemDefinition that is loaded by the...
Definition: componentSystemDatabase.h:28
QAbstractButton * myRemoveButton
Definition: uiMultiSystemElement.h:82
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:99
BackupDescriptorMap myBackupList
Definition: uiMultiSystemElement.h:91
bool myCurrentlyEnabled
Definition: uiMultiSystemElement.h:92
virtual bool isModified() const
QAbstractButton * myAddButton
Definition: uiMultiSystemElement.h:81
DtSystemPropertyEditDialogShdPtr myCurrentDialog
Definition: uiMultiSystemElement.h:79
const char * source
Definition: lz4.h:436
virtual void setEnabled(bool)
If this item is not enabled it cannot be modified.
virtual void openPropertyEditWindow()
Descriptor for a DtComponentSystem.
Definition: componentSystemDescriptor.h:23
SystemDescriptorMap mySystemDescriptors
Definition: uiMultiSystemElement.h:89
std::map< DtReaderWriter *, std::map< DtReaderWriter *, DtRwVariableBindings * > > BackupDescriptorMap
Definition: uiMultiSystemElement.h:90
DtBoost::shared_ptr< DtSystemPropertyEditDialog > DtSystemPropertyEditDialogShdPtr
Definition: systemPropertyEditDialog.h:84
Definition: uiMultiSystemElement.h:24
QAbstractButton * myPropertiesButton
Definition: uiMultiSystemElement.h:83
The DtUiElement class is the base for which all UI elements are defined.
Definition: uiElement.h:92
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
virtual void setFromParameters(const std::vector< DtReaderWriter * > &parentRw)
Definition: uiSystemElement.h:25
virtual void updateLabelTitle()
Updates label title based on valid units.
#define DT_DLL_simulationObjectEditorimpl
This file is used to determine how to build.
Definition: simulationObjectEditorImplDefines.h:32
Base class of the ui element class chain.
Definition: uiElement.h:169

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)