![]() |
VR-Forces 4.8 Class Documentation
|
A widget class for showing different items of supplied types to the logic tthat can be created. More...

Public Member Functions | |
| DtEntityCreatePalette (makVrv::DtDe &de, QWidget *parent=0, Qt::WindowFlags flags=0, bool hasDeployedCountries=true) | |
| CTOR. More... | |
| DtEntityCreatePalette (makVrv::DtDe &de, bool favoritesSupported=true, QWidget *parent=0, Qt::WindowFlags flags=0, bool hasDeployedCountries=true, bool allowCombineMode=false) | |
| virtual | ~DtEntityCreatePalette () |
| DTOR. More... | |
| virtual QIcon | icon () |
| Icon to be used in small display. More... | |
| virtual QString | title () |
| Name to put next to the icon. More... | |
| virtual const std::string & | pageClassName () const |
| Get the class name of the page. More... | |
| virtual void | activate () |
| Called when the page is displayed. More... | |
| virtual void | deactivate () |
| Called when the page is hidden. More... | |
| virtual void | setSignalSelectionOnly (bool) |
| Only signals that an item has been selected. Will not start the creation process. More... | |
| virtual void | setFavoritesSupported (bool) |
| virtual bool | favoritesSupported () const |
| virtual void | setCombinePalettes (bool combine) |
| Allows combining modelSetEntries from different palettes onto on. More... | |
| virtual bool | combinePalettes () const |
| virtual DtEntityMapperKey | selectedObjectType () const |
| If there is a current selection return the mapper key of that selection. More... | |
| virtual std::vector < DtEntityMapperKey > | selectedObjects () const |
| If there is more than one, all selected objects (or just the one) More... | |
| virtual void | selectObject (const DtEntityMapperKey &) |
| Selects the "All" filter and then selects the force from the force filter for the given key. More... | |
| virtual void | setDragCreateModeEnabled (bool) |
| Turns on mode where entities can be dragged from the palette to start the create, rather than a click. More... | |
| virtual bool | showNonCreatableUnits () const |
| Whether or not non creatable units should be shown in this palette, if they are set to be displayable on this palette type. More... | |
| virtual void | setShowNonCreatableUnits (bool) |
| virtual void | addIgnore (const DtEntityType &) |
| Adds a key to ignore (into the logic) when filtering items. Will cause a re-filter. More... | |
| virtual void | clearIgnore () |
| Clears all the keys to ignore (in logic). Will cause a re-filter. More... | |
| virtual void | setIgnore (const std::vector< DtEntityType > &) |
| Sets entity types to ignore (in logic) More... | |
| virtual const std::vector < DtEntityType > & | ignoring () const |
| What is being ignored. More... | |
| virtual void | setShowFavoritesIcon (bool) |
| virtual bool | showFavoritesIcon () const |
| virtual void | setHideCountries (const std::set< std::string > &) |
| If has a countries list, hides the given countries. More... | |
| virtual void | clear () |
| Clears contents of widget. More... | |
| virtual void | update () |
| Tells widget to update (redraw) More... | |
| virtual QString | currentForce () const |
| Returns currently selected force. More... | |
| virtual int | currentForceType () const |
| Returns the current force type selected. More... | |
| virtual int | forceTypeAtIndex (int) const |
| Force type at index. More... | |
| virtual std::vector< std::string > | currentCategories () const |
| Returns currently selected category. More... | |
| virtual void | setAccessibleCategories (const std::set< std::string > &) |
| All categories available for this palette. More... | |
| virtual std::string | currentDeployedCountry () const |
| Returns currently selected deployed country code. More... | |
| virtual bool | initiallyVisible () const |
| virtual void | initializeCountries () |
| Initializes country list. More... | |
| virtual void | selectDeployedCountry (const std::string &) |
| Selects deployed country by name. More... | |
| virtual void | selectDeployedCountry (int) |
| Selects deployed country by index. More... | |
| virtual int | numForces () const |
| Returns number of forces. More... | |
| virtual int | numCategories () const |
| Returns number of categories. More... | |
| virtual void | addForce (const QString &, int, const QColor &, const std::string &countryCode, bool forceLayout=false) |
| Adds new force and force type. More... | |
| virtual QString | force (int) const |
| Returns the force string at the specified index. More... | |
| virtual bool | hasForce (int) const |
| Returns true if the specified force exists. More... | |
| virtual void | setCategories (const DtTagSelectorWidget::Categories &) |
| Sets the new categories. More... | |
| virtual bool | hasCategory (const QString &) const |
| Returns true if the specified category exists. More... | |
| virtual void | selectForce (const QString &) |
| Selects force by name. More... | |
| virtual void | showForce (bool) |
| Show/hide force. More... | |
| virtual void | enableForce (bool) |
| Enabled/disable force. More... | |
| virtual void | selectForce (int) |
| Selects force by index. More... | |
| virtual bool | isStickyCategory (const std::string &) const |
| Returns true if this is a sticky category. More... | |
| virtual void | setStickyCategories (const std::vector< std::string > &) |
| Sets the sticky categories. Will rework categories if there are selected ones and then reselect categories. More... | |
| virtual void | selectTopLevelCategory (const std::string &s) |
| Selects a top level category. More... | |
| virtual const std::vector < std::string > & | stickyCategories () const |
| Sticky categories. More... | |
| virtual const std::vector < std::string > & | nonStickyCategories () const |
| Non-sticky selected categories. More... | |
| virtual void | selectCategories (const std::vector< std::string > &) |
| Selects categories. More... | |
| virtual void | clearCreateList () |
| Clears the create list. More... | |
| virtual void | setSortingEnabled (bool) |
| Sets whether or not to allow list soring. More... | |
| virtual void | sizeColumns () |
| Sizes the columns to contents. More... | |
| virtual void | addItem (const DtEntityPaletteItem &, int force) |
| 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. More... | |
| virtual void | addPaletteItem (const DtEntityPaletteItem &) |
| Adds the new item into the logic. More... | |
| virtual void | removePaletteItem (const DtEntityMapperKey &key, bool matchPattern=false) |
| Removes an item from the internal list for any key that matches (or matches pattern of) the supplied key. More... | |
| virtual void | setEnabled (bool) |
| Enables/Disables Gui. More... | |
| void | createFavoriteIcon () |
| Creates the favorites icon (on and off) More... | |
| virtual void | clearForces () |
| Clear forces combo. More... | |
| virtual void | clearDeployedCountries () |
| Clear deployed countries combo. More... | |
| virtual void | clearCategories () |
| Clear categories combo. More... | |
| virtual void | initialize () |
| Called when first item is added. More... | |
| virtual void | addLocalPaletteFilter (const DtPaletteFilter &) |
| This will only apply to this instance of the palette when filtering. More... | |
| virtual void | removeLocalPaletteFilter (const DtPaletteFilter &) |
| virtual QMenu * | createRightClickMenu (DtEntityCreatePaletteItem *) |
| 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) |
| Given a map of the counts of categories and how many there are for those counts, select them based on rank. More... | |
| virtual void | resetVisuals () |
| Reset icon visuals. More... | |
Public Member Functions inherited from makVrv::DtPage | |
| DtPage (DtDe &de, QWidget *parent=0, Qt::WindowFlags f=0) | |
| CTOR for page. More... | |
| virtual | ~DtPage () |
| DTOR for page. More... | |
| virtual PageAction | pageAction () |
| return the current action on the page More... | |
| virtual void | setPageAction (PageAction action) |
| set the curret action on the page More... | |
| virtual void | setActionFlag (int flag) |
| set the action flag of the page More... | |
| virtual int | actionFlag () |
| return the action flag of the page More... | |
| virtual void | setParentDialog (QWidget *paraentDialog) |
| set the parent dialog that owns this page More... | |
| virtual QWidget * | parentDialog () |
| return the parent dialog that own this page More... | |
| virtual bool | shouldAskBeforeAction (PageAction action) |
| test the action flag with the action, return true if we should ask before executing the action /param action the current page action More... | |
| virtual void | askBeforeAction () |
| Called when the action flag is set and before the action is beind executed, default do nothing. More... | |
| virtual void | executeAfterAsk (bool revert) |
| Called after askBeforeAction(), whether user wants to revert the action or resume the action /param revert if true, the user wants to revert the action, otherwise resume it. More... | |
| virtual void | resumeLastAction () |
| resume the last action of the page More... | |
| virtual void | onCloseEvent () |
| will be called when user hit the close button of this page, default do nothing. More... | |
| virtual void | onSwitchEvent () |
| will be called when user try switch to another page, default do nothing. More... | |
Public Member Functions inherited from makVrf::DtEntityCreatePaletteInterface | |
| virtual | ~DtEntityCreatePaletteInterface () |
| Virtual DTOR. More... | |
| virtual void | filterItems ()=0 |
| Filters items. More... | |
Static Public Member Functions | |
| static const std::string & | thePageClassName () |
| Static accessor for the class name. More... | |
Protected Slots | |
| 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) |
| Sets up the contents of the widget onto the supplied parent. More... | |
| virtual bool | hasDeployedCountries () const |
| Returns true if supports deployed countries. More... | |
| virtual void | closeEvent (QCloseEvent *) |
| virtual void | showEvent (QShowEvent *) |
| virtual bool | eventFilter (QObject *o, QEvent *e) |
Protected Attributes | |
| bool | myInitialized |
| makVrv::DtSignalConnectionManager | myConnections |
| DtEntityCreatePaletteLogic * | myLogic |
| std::map< std::string, QTreeWidgetItem * > | myItems |
| bool | myFavoritesSupported |
| bool | myHasDeployedCountries |
| bool | myCloseEventSent |
| bool | myInCreationProcess |
| bool | myShowFavoritesIcon |
| QMenu * | myRightClickMenu |
| std::set< std::string > | myAccessibleCategories |
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 } |
A widget class for showing different items of supplied types to the logic tthat can be created.
| makVrf::DtEntityCreatePalette::DtEntityCreatePalette | ( | makVrv::DtDe & | de, |
| QWidget * | parent = 0, |
||
| Qt::WindowFlags | flags = 0, |
||
| bool | hasDeployedCountries = true |
||
| ) |
CTOR.
| makVrf::DtEntityCreatePalette::DtEntityCreatePalette | ( | makVrv::DtDe & | de, |
| bool | favoritesSupported = true, |
||
| QWidget * | parent = 0, |
||
| Qt::WindowFlags | flags = 0, |
||
| bool | hasDeployedCountries = true, |
||
| bool | allowCombineMode = false |
||
| ) |
|
virtual |
DTOR.
|
virtual |
Icon to be used in small display.
Implements makVrv::DtPage.
Reimplemented in makVrf::DtTacticalGraphicCreatePalette.
|
virtual |
Name to put next to the icon.
Implements makVrv::DtPage.
Reimplemented in makVrf::DtTacticalGraphicCreatePalette.
|
virtual |
Get the class name of the page.
Implements makVrf::DtEntityCreatePaletteInterface.
Reimplemented in makVrf::DtTacticalGraphicCreatePalette.
|
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 |
Allows combining modelSetEntries from different palettes onto on.
Default is false i.e. if you have EntityCreatePalette, only model set entries with EntityCreatePalette will show up, but you set this to true, I can have an entry show up from the TacticalGraphicPalette as well normal usuage is a standalone dialog that will add some additional filters
|
virtual |
Implements makVrf::DtEntityCreatePaletteInterface.
|
virtual |
If there is a current selection return the mapper key of that selection.
Implements makVrf::DtEntityCreatePaletteInterface.
|
virtual |
If there is more than one, all selected objects (or just the one)
Implements makVrf::DtEntityCreatePaletteInterface.
|
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::DtEntityCreatePaletteInterface.
|
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 |
|
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::DtEntityCreatePaletteInterface.
|
protected |
Sets up the contents of the widget onto the supplied parent.
|
inlineprotectedvirtual |
Returns true if supports deployed countries.
Implements makVrf::DtEntityCreatePaletteInterface.
Reimplemented in makVrf::DtTacticalGraphicCreatePalette.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
virtual |
Clears contents of widget.
Implements makVrf::DtEntityCreatePaletteInterface.
|
virtual |
Tells widget to update (redraw)
Implements makVrf::DtEntityCreatePaletteInterface.
|
virtual |
Returns currently selected force.
Implements makVrf::DtEntityCreatePaletteInterface.
|
virtual |
Returns the current force type selected.
Implements makVrf::DtEntityCreatePaletteInterface.
Force type at index.
Implements makVrf::DtEntityCreatePaletteInterface.
|
virtual |
Returns currently selected category.
Implements makVrf::DtEntityCreatePaletteInterface.
|
virtual |
All categories available for this palette.
Implements makVrf::DtEntityCreatePaletteInterface.
|
virtual |
Returns currently selected deployed country code.
Implements makVrf::DtEntityCreatePaletteInterface.
|
inlinevirtual |
|
virtual |
Initializes country list.
Implements makVrf::DtEntityCreatePaletteInterface.
|
virtual |
Selects deployed country by name.
Implements makVrf::DtEntityCreatePaletteInterface.
|
virtual |
Selects deployed country by index.
Implements makVrf::DtEntityCreatePaletteInterface.
|
virtual |
Returns number of forces.
Implements makVrf::DtEntityCreatePaletteInterface.
|
virtual |
Returns number of categories.
Implements makVrf::DtEntityCreatePaletteInterface.
|
virtual |
Adds new force and force type.
Implements makVrf::DtEntityCreatePaletteInterface.
|
virtual |
Returns the force string at the specified index.
Implements makVrf::DtEntityCreatePaletteInterface.
Returns true if the specified force exists.
Implements makVrf::DtEntityCreatePaletteInterface.
|
virtual |
Sets the new categories.
Implements makVrf::DtEntityCreatePaletteInterface.
|
virtual |
Returns true if the specified category exists.
Implements makVrf::DtEntityCreatePaletteInterface.
|
virtual |
Selects force by name.
Implements makVrf::DtEntityCreatePaletteInterface.
|
virtual |
Show/hide force.
Implements makVrf::DtEntityCreatePaletteInterface.
|
virtual |
Enabled/disable force.
|
virtual |
Selects force by index.
Implements makVrf::DtEntityCreatePaletteInterface.
|
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.
|
virtual |
Sticky categories.
|
virtual |
Non-sticky selected categories.
|
virtual |
Selects categories.
Implements makVrf::DtEntityCreatePaletteInterface.
|
virtual |
Clears the create list.
Implements makVrf::DtEntityCreatePaletteInterface.
|
virtual |
Sets whether or not to allow list soring.
Implements makVrf::DtEntityCreatePaletteInterface.
|
virtual |
Sizes the columns to contents.
Implements makVrf::DtEntityCreatePaletteInterface.
|
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::DtEntityCreatePaletteInterface.
|
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::DtEntityCreatePaletteInterface.
|
virtual |
Removes an item from the internal list for any key that matches (or matches pattern of) the supplied key.
Implements makVrf::DtEntityCreatePaletteInterface.
|
virtual |
Enables/Disables Gui.
Implements makVrf::DtEntityCreatePaletteInterface.
| void makVrf::DtEntityCreatePalette::createFavoriteIcon | ( | ) |
Creates the favorites icon (on and off)
|
virtual |
Clear forces combo.
Implements makVrf::DtEntityCreatePaletteInterface.
|
virtual |
Clear deployed countries combo.
Implements makVrf::DtEntityCreatePaletteInterface.
|
virtual |
Clear categories combo.
Implements makVrf::DtEntityCreatePaletteInterface.
|
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::DtEntityCreatePaletteInterface.
|
virtual |
Reset icon visuals.
Implements makVrf::DtEntityCreatePaletteInterface.
|
protectedvirtualslot |
|
protectedvirtualslot |
|
protectedvirtualslot |
|
protectedvirtualslot |
|
protectedvirtualslot |
|
protectedvirtualslot |
|
protectedvirtualslot |
|
protectedvirtualslot |
|
protectedvirtualslot |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
| QVBoxLayout* makVrf::DtEntityCreatePalette::myMainLayout |
| QGridLayout* makVrf::DtEntityCreatePalette::myGridLayout |
| DtTagSelectorWidget* makVrf::DtEntityCreatePalette::myTags |
| DtForceSelectionEntryWidget* makVrf::DtEntityCreatePalette::myForces |
| DtEntityPaletteTreeWidget* makVrf::DtEntityCreatePalette::myEntities |
| QImage makVrf::DtEntityCreatePalette::myFavoriteOn |
| QImage makVrf::DtEntityCreatePalette::myFavoriteOff |
| QLabel* makVrf::DtEntityCreatePalette::mySearchLabel |
| QLineEdit* makVrf::DtEntityCreatePalette::mySearch |
| QPushButton* makVrf::DtEntityCreatePalette::myResetButton |
| DtCountrySelectionEntryWidget* makVrf::DtEntityCreatePalette::myUsedByCountry |
| QAbstractButton* makVrf::DtEntityCreatePalette::myCurrentForceButtonSelected |
| QAbstractButton* makVrf::DtEntityCreatePalette::myCurrentTopLevelButtonSelected |
| bool makVrf::DtEntityCreatePalette::myAllowCombineMode |