![]() |
VR-Forces Developer's Guide
|
A widget class for showing different items of supplied types to the logic tthat can be created.

Public Member Functions | |
| DtCreateObjectPalette (makVrv::DtDe &de, QWidget *parent=0, Qt::WindowFlags flags=0, bool hasDeployedCountries=true) | |
| virtual | ~DtCreateObjectPalette () |
| virtual QIcon | icon () |
| virtual makVrv::DtQIconConfigurations | qIconConfigurations () const |
| virtual QString | title () |
| virtual const std::string & | pageClassName () const |
| virtual void | activate () |
| virtual void | deactivate () |
| virtual void | setSignalSelectionOnly (bool) |
| virtual void | setFavoritesSupported (bool) |
| virtual bool | favoritesSupported () const |
| virtual DtEntityMapperKey | selectedObjectType () const |
| virtual std::vector < DtEntityMapperKey > | selectedObjects () const |
| virtual void | selectObject (const DtEntityMapperKey &) |
| virtual void | setDragCreateModeEnabled (bool) |
| virtual bool | showNonCreatableUnits () const |
| virtual void | setShowNonCreatableUnits (bool) |
| virtual bool | hideTitle () const |
| virtual void | addIgnore (const DtEntityType &) |
| virtual void | clearIgnore () |
| virtual void | setIgnore (const std::vector< DtEntityType > &) |
| virtual const std::vector < DtEntityType > & | ignoring () const |
| virtual void | setShowFavoritesIcon (bool) |
| virtual bool | showFavoritesIcon () const |
| virtual void | setHideCountries (const std::set< std::string > &) |
| virtual bool | keepAlive () const override |
| virtual void | setHasDeployedCountries (bool) |
| virtual bool | hasDeployedCountries () const |
| virtual void | setShowCountsOnObjectList (bool) |
| bool | showCountsOnObjectList () const |
| virtual void | clear () |
| virtual void | update () |
| virtual QString | currentForce () const |
| virtual int | currentForceType () const |
| virtual int | forceTypeAtIndex (int) const |
| virtual std::vector< std::string > | currentCategories () const |
| virtual std::string | currentDeployedCountry () const |
| virtual bool | initiallyVisible () const override |
| virtual void | initializeCountries () |
| virtual void | selectDeployedCountry (const std::string &) |
| virtual void | selectDeployedCountry (int) |
| virtual int | numForces () const |
| virtual int | numCategories () const |
| virtual void | addForce (const QString &, int, const QColor &, const std::string &countryCode, bool forceLayout=false) |
| virtual QString | force (int) const |
| virtual bool | hasForce (int) const |
| virtual void | setCategories (const DtTagSelectorWidget::Categories &) |
| virtual bool | hasCategory (const QString &) const |
| virtual void | selectForce (const QString &) |
| virtual void | showForce (bool) |
| virtual void | enableForce (bool) |
| virtual void | selectForce (int) |
| virtual bool | isStickyCategory (const std::string &) const |
| virtual void | setStickyCategories (const std::vector< std::string > &) |
| virtual void | selectTopLevelCategory (const std::string &s) |
| virtual DtString | topLevelCategory (int) const |
| virtual QTreeWidgetItem * | itemFor (const DtCreateObjectPaletteItem &paletteItem, int force) const |
| virtual const std::vector < std::string > & | stickyCategories () const |
| virtual void | selectCategories (const std::vector< std::string > &) |
| virtual void | clearCreateList () |
| virtual void | sortItems () |
| virtual void | sizeColumns () |
| virtual void | addItem (const DtCreateObjectPaletteItem &, int force) |
| virtual void | addPaletteItem (const DtCreateObjectPaletteItem &) |
| virtual void | removePaletteItem (const DtEntityMapperKey &key, bool matchPattern=false) |
| virtual void | setEnabled (bool) |
| void | createFavoriteIcon () |
| virtual void | clearForces () |
| virtual void | clearDeployedCountries () |
| virtual void | clearCategories () |
| virtual void | initialize () |
| virtual void | addLocalPaletteFilter (const DtPaletteFilter &) |
| virtual void | removeLocalPaletteFilter (const DtPaletteFilter &) |
| virtual QMenu * | createRightClickMenu (DtCreateObjectPaletteTreeWidgetItem *) |
| virtual void | slot_onTagsChanged (const std::vector< std::string > &) |
| virtual void | setCategoriesFromCounts (const std::map< std::string, int > &, const std::set< std::string > &, int totalItems, const std::vector< std::string > &categoriesToResetTo=std::vector< std::string >()) |
| virtual void | resetVisuals () |
| virtual void | loadCustomTags () |
| virtual void | fillInObjectCreationInformation (DtCreateObjectPaletteTreeWidgetItem *) |
| virtual void | slot_setTagFromObjectInformation (std::vector< std::string > tag) |
| virtual QTreeWidgetItem * | topLevelItemFor (const std::string &) |
| virtual void | resetCategoriesBasedOnVisibleItems () |
| virtual void | resetParentVisibility () |
Public Member Functions inherited from makVrf::DtKeepAlivePage | |
| DtKeepAlivePage (makVrv::DtDe &de, QWidget *parent=0, Qt::WindowFlags flags=0) | |
| virtual | ~DtKeepAlivePage () |
Public Member Functions inherited from makVrv::DtPage | |
| DtPage (DtDe &de, QWidget *parent=0, Qt::WindowFlags f=0) | |
| virtual | ~DtPage () |
| virtual PageAction | pageAction () |
| virtual void | setPageAction (PageAction action) |
| virtual void | setActionFlag (int flag) |
| virtual int | actionFlag () |
| virtual void | setParentDialog (QWidget *paraentDialog) |
| virtual QWidget * | parentDialog () |
| virtual bool | shouldAskBeforeAction (PageAction action) |
| virtual void | askBeforeAction () |
| virtual void | executeAfterAsk (bool revert) |
| virtual void | resumeLastAction () |
| virtual void | onCloseEvent () |
| virtual void | onSwitchEvent () |
Public Member Functions inherited from makVrf::DtCreateObjectPaletteInterface | |
| virtual | ~DtCreateObjectPaletteInterface () |
| virtual void | filterItems ()=0 |
Public Member Functions inherited from makVrf::DtGenericPaletteInterface | |
| virtual | ~DtGenericPaletteInterface () |
Static Public Member Functions | |
| static const std::string & | thePageClassName () |
Protected Slots | |
| virtual void | showInformationForItem (const QModelIndex &) |
| virtual void | onItemSelectionChanged () |
| virtual void | slot_onForceChanged () |
| virtual void | slot_onDeployedCountryChanged () |
| virtual void | slot_onItemPressed (QTreeWidgetItem *, QMouseEvent *, int) |
| virtual void | slot_onItemRightClickedOn (QTreeWidgetItem *, QMouseEvent *, int) |
| virtual void | filterItems () |
| virtual void | resetFilter () |
| virtual void | addToFavoritesRightClick () |
| virtual void | removeFromFavoritesRightClick () |
Protected Member Functions | |
| void | setupUi (QWidget *p, bool favoritesSupported) |
| void | createObjectCreationInformation () |
| virtual void | closeEvent (QCloseEvent *) |
| virtual void | showEvent (QShowEvent *) |
| virtual void | aboutToShow () override |
Protected Attributes | |
| bool | myInitialized |
| makVrv::DtSignalConnectionManager | myConnections |
| DtCreateObjectPaletteLogic * | myLogic |
| std::map< std::string, QTreeWidgetItem * > | myItems |
| std::map< std::string, QTreeWidgetItem * > | myTopLevelItems |
| bool | myFavoritesSupported |
| bool | myHasDeployedCountries |
| bool | myCloseEventSent |
| bool | myInCreationProcess |
| bool | myKeepSameInformation = false |
| bool | myShowFavoritesIcon |
| QMenu * | myRightClickMenu |
| bool | myShowCountsOnObjectList = false |
Protected Attributes inherited from makVrv::DtPage | |
| DtDe & | myDe |
| QWidget * | myParentDialog |
| PageAction | myCurrentPageAction |
| int | myActionFlag |
Additional Inherited Members | |
Public Types inherited from makVrv::DtPage | |
| enum | PageAction { None = 0x0000, Switching = 0x0001, Closing = 0x0010 } |
Public Types inherited from makVrf::DtCreateObjectPaletteInterface | |
| enum | Roles { DescriptionRole = Qt::UserRole, CategoriesRole = Qt::UserRole + 1, VisibilityRole = Qt::UserRole + 2, RankRole = Qt::UserRole + 3, TopLevelItemRole = Qt::UserRole + 4, ShortNameRole = Qt::UserRole + 5 } |
| makVrf::DtCreateObjectPalette::DtCreateObjectPalette | ( | makVrv::DtDe & | de, |
| QWidget * | parent = 0, |
||
| Qt::WindowFlags | flags = 0, |
||
| bool | hasDeployedCountries = true |
||
| ) |
CTOR.
|
virtual |
DTOR.
|
virtual |
Icon to be used in small display.
Implements makVrv::DtPage.
|
virtual |
Get the icon configurations for the page. This is used to style the page's icon based on application settings.
Implements makVrv::DtPage.
|
virtual |
Name to put next to the icon.
Implements makVrv::DtPage.
|
virtual |
Get the class name of the page.
Implements makVrf::DtCreateObjectPaletteInterface.
|
static |
Static accessor for the class name.
|
inlinevirtual |
Called when the page is displayed.
Implements makVrv::DtPage.
|
inlinevirtual |
Called when the page is hidden.
Implements makVrv::DtPage.
|
virtual |
Only signals that an item has been selected. Will not start the creation process.
|
virtual |
|
virtual |
|
virtual |
If there is a current selection return the mapper key of that selection.
Implements makVrf::DtCreateObjectPaletteInterface.
|
virtual |
If there is more than one, all selected objects (or just the one)
Implements makVrf::DtCreateObjectPaletteInterface.
|
virtual |
Selects the "All" filter and then selects the force from the force filter for the given key. Then checks to see if the entity type exists for that key, and, if it does, selects that object.
Implements makVrf::DtCreateObjectPaletteInterface.
|
virtual |
Turns on mode where entities can be dragged from the palette to start the create, rather than a click. The create signal will not be emitted when the drag is enabled. It will be up to the developer to trap dragEnter events to parse out the entity being created from the DtDragObject can decode from DtCreateObjectFromPaletteType. This will contain a DtEntityMapperKey of the item being dragged.
|
virtual |
Whether or not non creatable units should be shown in this palette, if they are set to be displayable on this palette type.
|
virtual |
|
inlinevirtual |
Reimplemented from makVrf::DtKeepAlivePage.
|
virtual |
Adds a key to ignore (into the logic) when filtering items. Will cause a re-filter.
|
virtual |
Clears all the keys to ignore (in logic). Will cause a re-filter.
|
virtual |
Sets entity types to ignore (in logic)
|
virtual |
What is being ignored.
|
virtual |
|
virtual |
|
virtual |
If has a countries list, hides the given countries.
Implements makVrf::DtCreateObjectPaletteInterface.
|
overridevirtual |
Return true if mySearch has focus.
Reimplemented from makVrf::DtKeepAlivePage.
|
virtual |
|
inlinevirtual |
Returns true if supports deployed countries.
Implements makVrf::DtCreateObjectPaletteInterface.
|
virtual |
|
inline |
|
protected |
Sets up the contents of the widget onto the supplied parent.
|
protected |
|
protectedvirtual |
|
protectedvirtual |
|
overrideprotectedvirtual |
Called when this palette is about to be shown.
Implements makVrf::DtGenericPaletteInterface.
|
virtual |
Clears contents of widget.
Implements makVrf::DtGenericPaletteInterface.
|
virtual |
Tells widget to update (redraw)
Implements makVrf::DtGenericPaletteInterface.
|
virtual |
Returns currently selected force.
Implements makVrf::DtCreateObjectPaletteInterface.
|
virtual |
Returns the current force type selected.
Implements makVrf::DtCreateObjectPaletteInterface.
Force type at index.
Implements makVrf::DtCreateObjectPaletteInterface.
|
virtual |
Returns currently selected category.
Implements makVrf::DtCreateObjectPaletteInterface.
|
virtual |
Returns currently selected deployed country code.
Implements makVrf::DtCreateObjectPaletteInterface.
|
inlineoverridevirtual |
Implements makVrf::DtGenericPaletteInterface.
|
virtual |
Initializes country list.
Implements makVrf::DtCreateObjectPaletteInterface.
|
virtual |
Selects deployed country by name.
Implements makVrf::DtCreateObjectPaletteInterface.
|
virtual |
Selects deployed country by index.
Implements makVrf::DtCreateObjectPaletteInterface.
|
virtual |
Returns number of forces.
Implements makVrf::DtCreateObjectPaletteInterface.
|
virtual |
Returns number of categories.
Implements makVrf::DtCreateObjectPaletteInterface.
|
virtual |
Adds new force and force type.
Implements makVrf::DtCreateObjectPaletteInterface.
|
virtual |
Returns the force string at the specified index.
Implements makVrf::DtCreateObjectPaletteInterface.
Returns true if the specified force exists.
Implements makVrf::DtCreateObjectPaletteInterface.
|
virtual |
Sets the new categories.
Implements makVrf::DtCreateObjectPaletteInterface.
|
virtual |
Returns true if the specified category exists.
Implements makVrf::DtCreateObjectPaletteInterface.
|
virtual |
Selects force by name.
Implements makVrf::DtCreateObjectPaletteInterface.
|
virtual |
Show/hide force.
Implements makVrf::DtCreateObjectPaletteInterface.
|
virtual |
Enabled/disable force.
|
virtual |
Selects force by index.
Implements makVrf::DtCreateObjectPaletteInterface.
|
virtual |
Returns true if this is a sticky category.
|
virtual |
Sets the sticky categories. Will rework categories if there are selected ones and then reselect categories.
|
virtual |
Selects a top level category.
Returns the category string selected at the level.
Implements makVrf::DtCreateObjectPaletteInterface.
|
virtual |
Implements makVrf::DtCreateObjectPaletteInterface.
|
virtual |
Sticky categories.
|
virtual |
Selects categories.
Implements makVrf::DtCreateObjectPaletteInterface.
|
virtual |
Clears the create list.
Implements makVrf::DtCreateObjectPaletteInterface.
|
virtual |
Sorts the items in the list for the parent items only.
Implements makVrf::DtCreateObjectPaletteInterface.
|
virtual |
Sizes the columns to contents.
Implements makVrf::DtCreateObjectPaletteInterface.
|
virtual |
If the entity model key type and force is not already in the list, add it Set newItem to true if this is an item that is a part of the model set. Used for dynamically adding objects to the palette during runtime.
Implements makVrf::DtCreateObjectPaletteInterface.
|
virtual |
Adds the new item into the logic. Be sure to re-execute filter if need be to get these items to show up in the dialog.
Implements makVrf::DtCreateObjectPaletteInterface.
|
virtual |
Removes an item from the internal list for any key that matches (or matches pattern of) the supplied key.
Implements makVrf::DtCreateObjectPaletteInterface.
|
virtual |
Enables/Disables Gui.
Implements makVrf::DtGenericPaletteInterface.
| void makVrf::DtCreateObjectPalette::createFavoriteIcon | ( | ) |
Creates the favorites icon (on and off)
|
virtual |
Clear forces combo.
Implements makVrf::DtCreateObjectPaletteInterface.
|
virtual |
Clear deployed countries combo.
Implements makVrf::DtCreateObjectPaletteInterface.
|
virtual |
Clear categories combo.
Implements makVrf::DtCreateObjectPaletteInterface.
|
virtual |
Called when first item is added.
|
virtual |
This will only apply to this instance of the palette when filtering. This class will clone the filter and take ownership of that memory, so, make sure your filter has a clone method.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Given a map of the counts of categories and how many there are for those counts, select them based on rank. The categoriesReferenced is the full set of categories.
Implements makVrf::DtCreateObjectPaletteInterface.
|
virtual |
Reset icon visuals.
Implements makVrf::DtCreateObjectPaletteInterface.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
protectedvirtualslot |
|
protectedvirtualslot |
|
protectedvirtualslot |
|
protectedvirtualslot |
|
protectedvirtualslot |
|
protectedvirtualslot |
|
protectedvirtualslot |
|
protectedvirtualslot |
|
protectedvirtualslot |
|
protectedvirtualslot |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
| QVBoxLayout* makVrf::DtCreateObjectPalette::myMainLayout |
| QWidget* makVrf::DtCreateObjectPalette::myObjectSelection |
| QGridLayout* makVrf::DtCreateObjectPalette::myGridLayout |
| DtTagSelectorWidget* makVrf::DtCreateObjectPalette::myTags |
| DtForceSelectionEntryWidget* makVrf::DtCreateObjectPalette::myForces |
| DtCreateObjectPaletteTreeWidget* makVrf::DtCreateObjectPalette::myObjects |
| QImage makVrf::DtCreateObjectPalette::myFavoriteOn |
| DtSearchWidget* makVrf::DtCreateObjectPalette::mySearchWidget |
| DtCountrySelectionEntryWidget* makVrf::DtCreateObjectPalette::myUsedByCountry |
| QAbstractButton* makVrf::DtCreateObjectPalette::myCurrentForceButtonSelected |
| QAbstractButton* makVrf::DtCreateObjectPalette::myCurrentTopLevelButtonSelected |
| QSplitter* makVrf::DtCreateObjectPalette::mySplitter |
| QWidget* makVrf::DtCreateObjectPalette::myObjectCreationInformation |
| QVBoxLayout* makVrf::DtCreateObjectPalette::myObjectInformationLayout |
| QLabel* makVrf::DtCreateObjectPalette::myGuiLabel |
| QLabel* makVrf::DtCreateObjectPalette::myObjectCreationPicture |
| QLabel* makVrf::DtCreateObjectPalette::myObjectCreationDescription |
| DtTagSelectorWidget* makVrf::DtCreateObjectPalette::myObjectTags |