![]() |
VR-Forces 5.0.3 Developer's Guide
|
This class manages the dialog box that appears when the user modifies a DI-Guy entity in the Simulation Object Editor. From this box, the user can change the entity's character type, its default appearance, the default hand item, and the default head. These will determine the entity's initial visuals when it's placed in the Sim world.
The user can also choose to randomize the default settings. For example, randomizing the default appearance will open another dialog box that allows the user to check or uncheck which of the available appearances will be chosen among at placement time. The set of available appearances, of course, is determined by the current character type.
Note that the contents of the lower dropdowns (e.g. head) depend on the selections made in the upper ones (e.g. type).

Public Slots | |
| virtual void | setDiGuyCharString (int) |
| virtual void | setDiGuyCharToolTip (int) |
| virtual void | newCharacterTypeSelected (int typeIndex) |
| virtual void | newAppearanceSelected (const QString &appearance) |
| virtual void | updateRandomAppearancesMap (QListWidget *list) |
| virtual void | newHandItemSelected (const QString &) |
| virtual void | updateRandomHandItemsMap (QListWidget *) |
| virtual void | newHeadSelected (const QString &) |
| virtual void | updateRandomHeadsMap (QListWidget *) |
| virtual void | setDiGuyAnimationString (int) |
| virtual void | setDiGuyAnimationToolTip (int) |
| virtual void | updateDefaultAnimation (int) |
| virtual void | createRandomAppearancesDialog () |
| virtual void | closedRandomAppearancesDialog () |
| virtual void | createRandomHandItemsDialog () |
| virtual void | closedRandomHandItemsDialog () |
| virtual void | createRandomHeadsDialog () |
| virtual void | closedRandomHeadsDialog () |
| virtual void | createAppearanceFilterDialog () |
| virtual void | filterBoxPopulated (const diguyCharacterTypeMapFieldValues &fieldValues) |
| virtual void | filterItemSelected (diguyCharacterTypeMapField field, QString &value) |
| virtual void | reRandomizeCharacter () |
| virtual DtString | firstUsableFrom (const QHash< QString, bool > &) const |
| virtual void | resetCharacterTypes () |
Signals | |
| void | characterChanged () |
| void | appearanceChanged () |
| void | handItemChanged () |
| void | headChanged () |
| void | defaultAnimationChanged () |
| void | randomAppearanceListChanged () |
| void | randomHandItemListChanged () |
| void | randomHeadListChanged () |
| void | appearancesReset () |
| void | handItemsReset () |
| void | headsReset () |
| void | animationsReset () |
| void | generateAll () |
| void | changeDiGuyData (const DtDiGuyInformation &) |
Public Member Functions | |
| DtDiGuyConfigurationWidget (makVrv::DtDe &de, QWidget *parent=0, const Qt::WindowFlags &flags=0) | |
| virtual | ~DtDiGuyConfigurationWidget () |
| virtual bool | init () |
| virtual void | setUpCharacterTypes () |
| virtual void | setAppearancesFromCharacter (const QString &characterType) |
| virtual void | setUpRandomAppearancesMap (DtRwNLengthStringVector *randomList, bool checkToSelect=true) |
| virtual void | setHandItemsFromCharacter (const QString &characterType) |
| virtual void | setUpRandomHandItemsMap (DtRwNLengthStringVector *randomList, bool checkToSelect=true) |
| virtual void | setHeadsFromCharacterTypeAndAppearance (const QString &characterType, const QString &appearance) |
| virtual void | setUpRandomHeadsMap (DtRwNLengthStringVector *randomList, bool checkToSelect=true) |
| virtual void | setUpAnimationsFromCharacter (const QString &character) |
| virtual void | setUseRandomAppearances (bool random) |
| virtual bool | useRandomAppearances () |
| virtual void | setUseRandomHandItems (bool random) |
| virtual bool | useRandomHandItems () |
| virtual void | setUseRandomHeads (bool random) |
| virtual bool | useRandomHeads () |
| virtual void | setCurrentCharacter (const QString &characterType) |
| virtual DtString | getCurrentCharacter () |
| virtual void | setCurrentAppearance (const QString &appearance, bool forceUpdate=false, bool emitChange=true) |
| virtual QString | getCurrentAppearance () |
| virtual DtString | randomAppearance () const |
| virtual void | setCurrentHandItem (const QString &handItem, bool forceUpdate=false, bool emitChange=true) |
| virtual QString | getCurrentHandItem () |
| virtual DtString | randomHandItem () const |
| virtual void | setCurrentHead (const QString &head, bool forceUpdate=false, bool emitChange=true) |
| virtual QString | getCurrentHead () |
| virtual DtString | randomHead () const |
| virtual void | setCurrentAnimation (const QString &action) |
| virtual DtString | getCurrentAnimation () |
| virtual AlternateNamesList & | getTaskableAnimationList () |
| virtual bool | randomAppearancesChanged () |
| virtual void | setRandomAppearancesChanged (bool b) |
| virtual void | getRandomAppearances (DtRwNLengthStringVector *randomList, bool getAll=false) |
| virtual bool | randomHandItemsChanged () |
| virtual void | setRandomHandItemsChanged (bool b) |
| virtual void | getRandomHandItems (DtRwNLengthStringVector *randomList, bool getAll=false) |
| virtual bool | randomHeadsChanged () |
| virtual void | setRandomHeadsChanged (bool b) |
| virtual void | getRandomHeads (DtRwNLengthStringVector *randomList, bool getAll=false) |
| virtual bool | blockSignals (bool block) |
| virtual void | preserveCurrentRandomValues (bool preserve) |
Public Attributes | |
| Ui::DIGuyConfigurationWidgetUi | myUiImpl |
Protected Member Functions | |
| virtual int | findIndexFromString (const QString &name, const AlternateNamesList *list) |
| virtual DtString | getCurrentOrRandomValue (QComboBox *box, QHash< QString, bool > *map, bool *retWasRandom=NULL) |
| virtual DtString | getAllowedRandomValue (const QHash< QString, bool > *map) const |
| virtual bool | isAllowedRandomValue (const QString &value, const QHash< QString, bool > *map) |
| virtual void | mergeInOldMap (QHash< QString, bool > *currentMap, const QHash< QString, bool > *oldMap) |
Static Protected Attributes | |
| static QString | sQStringRandom |
Private Member Functions | |
| DtDiGuyConfigurationWidget (const DtDiGuyConfigurationWidget &orig) | |
| DtDiGuyConfigurationWidget & | operator= (const DtDiGuyConfigurationWidget &orig) |
| DtDiGuyConfigurationWidget::DtDiGuyConfigurationWidget | ( | makVrv::DtDe & | de, |
| QWidget * | parent = 0, |
||
| const Qt::WindowFlags & | flags = 0 |
||
| ) |
default constructor
|
virtual |
destructor
|
private |
copy constructor - not implemented
|
virtual |
Initializers.
|
virtual |
Populate "character types" combo box.
|
virtual |
Given a character type, set all the appearances that show up in the appearance dropdown and in the random appearances dialog.
|
virtual |
Mark all appearances that appear in the list as available for random selection, if they are already present in the random appearances map.
|
virtual |
Given a character type, set all the hand items that show up in the hand item dropdown and in the random hand items dialog.
|
virtual |
All the entries in randomList, if found in hand item map, are flagged as checked.
|
virtual |
Same idea as setAppearancesFromCharacter(). Both character type and an appearance are needed to determine the set of heads available.
|
virtual |
All the entries in randomList, if found in head map, are flagged as checked.
|
virtual |
Same idea as setAppearancesFromCharacter()
|
virtual |
Makes the use of random appearances allowed (or not). Does not change the list of appearances available for randomization.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Changes current character type. Updates selection in dropdown and contents of dependent dropdowns.
|
virtual |
|
virtual |
Changes current character appearance. Updates selection in dropdown and contents of dependent dropdowns. Will default to "random" if appearance can't be found. If appearance is "random", will try to select a specific appearance from those allowed in random appearances map. If forceUpdate not set, function will do nothing if named appearance already chosen.
|
virtual |
Returns name of current appearance.
|
virtual |
Returns an allowable (checked) random appearance.
|
virtual |
Changes current hand item. Updates selection in dropdown. Will default to "default" if item can't be found. If forceUpdate not set, function will do nothing if named item already chosen.
|
virtual |
Returns name of current hand item.
|
virtual |
Returns an allowable (checked) random hand item.
|
virtual |
Changes current head. Updates selection in dropdown. Will default to "default" if head can't be found. If forceUpdate not set, function will do nothing if named head already chosen.
|
virtual |
Returns name of current head. Might be "random".
|
virtual |
Returns an allowable (checked) random head.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Specifies if user has changed the list of appearances to be used in random appearances mode.
|
virtual |
|
virtual |
Returns a list of appearances checked as usable for randomization. If getAll is true, then return all available appearances.
|
virtual |
Specifies if user has changed the list of hand items to be used in random hand items mode.
|
virtual |
|
virtual |
|
virtual |
Specifies if user has changed the list of heads to be used in random heads mode.
|
virtual |
|
virtual |
Prevent/allow any of the Qt combo boxes from/to send(ing) signals.
|
virtual |
|
protectedvirtual |
Helpers.
Finds the index in the list that contains the string name.
|
protectedvirtual |
Returns whatever value is selected, if not "random". Otherwise, pick some allowable (checked) value from the map and use that.
|
protectedvirtual |
Given a map with some checked and unchecked values in it, return a checked one at random. If no values are checked, then choose among the unchecked.
|
protectedvirtual |
|
protectedvirtual |
If the old map contains checked items and these items are present in the current map, make sure they are checked there, too.
|
signal |
|
signal |
when character type changes
|
signal |
when appearance changes
|
signal |
when hand item changes
|
signal |
when head changes
|
signal |
|
signal |
when there is a change to this list, including which items are checked
|
signal |
|
signal |
|
signal |
when the list of appearances is repopulated
|
signal |
|
signal |
|
signal |
|
signal |
|
virtualslot |
Causes a label to display currently selected entity type.
|
virtualslot |
|
virtualslot |
Called whenever the user changes the character type typeIndex is index of a character type.
|
virtualslot |
Called whenever the user changes the selected appearance.
|
virtualslot |
Called whenever the user modifies the list of available appearances for randomization.
|
virtualslot |
Same idea as appearance stuff.
|
virtualslot |
|
virtualslot |
Same idea as appearance stuff, but with addition of appearance index.
|
virtualslot |
|
virtualslot |
|
virtualslot |
|
virtualslot |
|
virtualslot |
Creates the dialog box for selecting which appearances will be candidates for random selection.
|
virtualslot |
Called when the above is closed.
|
virtualslot |
|
virtualslot |
Called when the above is closed.
|
virtualslot |
|
virtualslot |
|
virtualslot |
Creates the dialog box for type map filtering (see comments there)
|
virtualslot |
Triggered when a combo box receives new items.
|
virtualslot |
Triggered when the user makes a new selection in a combo box.
|
virtualslot |
if any aspects of character are random, regenerate new visuals
|
virtualslot |
Returns the first useable item in some appearance map (body, head, hand item, whatever)
|
virtualslot |
|
private |
assignment operator - not implemented
| Ui::DIGuyConfigurationWidgetUi DtDiGuyConfigurationWidget::myUiImpl |
The code generated from the underlying .ui file.
|
staticprotected |
|
protected |
These will always have specific values or be empty (""). They won't be "random".
|
protected |
|
protected |
|
protected |
|
protected |
These can be "random". They indicate the last selections made in the dropdowns.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
The keys are appearances. The value indicates whether the appearance is checked or not.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Used to match DI-Guy names to user-friendly names.
|
protected |
|
protected |
|
protected |
Replaces the "Default Animation" Qt combo box (found in .ui file)
|
protected |
Replaces the "Character Type" Qt combo box (found in .ui file)
|
protected |
|
protected |
Current type map field filters specified in each combo.
|
protected |
Holds pointer to dialog while it exists, otherwise NULL.
|
protected |
Holds pointer to dialog while it exists, otherwise NULL.
|
protected |
Holds pointer to dialog while it exists, otherwise NULL.
|
protected |
|
protected |