VR-Forces 4.6 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Slots | Protected Member Functions | Protected Attributes
makVrf::DtEntityCreatePalette Class Reference

A widget class for showing different items of supplied types to the logic tthat can be created. More...

Inheritance diagram for makVrf::DtEntityCreatePalette:
Inheritance graph
[legend]

Public Member Functions

 DtEntityCreatePalette (makVrv::DtDe &de, QWidget *parent=0, Qt::WindowFlags flags=0, bool hasDeployedCountries=true)
 CTOR.
 DtEntityCreatePalette (makVrv::DtDe &de, bool favoritesSupported=true, QWidget *parent=0, Qt::WindowFlags flags=0, bool hasDeployedCountries=true, bool allowCombineMode=false)
virtual ~DtEntityCreatePalette ()
 DTOR.
virtual QIcon icon ()
 Icon to be used in small display.
virtual QString title ()
 Name to put next to the icon.
virtual const std::string & pageClassName () const
 Get the class name of the page.
virtual void activate ()
 Called when the page is displayed.
virtual void deactivate ()
 Called when the page is hidden.
virtual void setSignalSelectionOnly (bool)
 Only signals that an item has been selected. Will not start the creation process.
virtual void setFavoritesSupported (bool)
virtual bool favoritesSupported () const
virtual void setCombinePalettes (bool combine)
 Allows combining modelSetEntries from different palettes onto on.
virtual bool combinePalettes () const
virtual DtEntityMapperKey selectedObjectType () const
 If there is a current selection return the mapper key of that selection.
virtual std::vector
< DtEntityMapperKey
selectedObjects () const
 If there is more than one, all selected objects (or just the one)
virtual void selectObject (const DtEntityMapperKey &)
 Selects the "All" filter and then selects the force from the force filter for the given key.
virtual void setDragCreateModeEnabled (bool)
 Turns on mode where entities can be dragged from the palette to start the create, rather than a click.
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.
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.
virtual void clearIgnore ()
 Clears all the keys to ignore (in logic). Will cause a re-filter.
virtual void setIgnore (const std::vector< DtEntityType > &)
 Sets entity types to ignore (in logic)
virtual const std::vector
< DtEntityType > & 
ignoring () const
 What is being ignored.
virtual void setShowFavoritesIcon (bool)
virtual bool showFavoritesIcon () const
virtual void layoutForces ()
 Force a layout of the forces button bar.
virtual void clear ()
 Clears contents of widget.
virtual void update ()
 Tells widget to update (redraw)
virtual QString currentForce () const
 Returns currently selected force.
virtual int currentForceType () const
 Returns the current force type selected.
virtual int currentForceIndex () const
 Returns the index of the currently selected force in the combo box.
virtual int currentDeployedCountryIndex () const
 Returns the index of the currently selected deployed country in the combo box.
virtual int forceTypeAtIndex (int) const
 Force type at index.
virtual std::vector< std::string > currentCategories () const
 Returns currently selected category.
virtual void setAccessibleCategories (const std::set< std::string > &)
 All categories available for this palette.
virtual QString currentDeployedCountry () const
 Returns currently selected deployed country.
virtual bool hasDeployedCountry (const QString &) const
 Returns true if the specified deployed country exists.
virtual void insertDeployedCountry (const QString &, int)
 Adds new deployed country at the specified index.
virtual bool initiallyVisible () const
virtual void insertDeployedCountryBefore (const QString &, const QString &)
 Adds new deployed country before the specified item.
virtual void insertDeployedCountryAfter (const QString &, const QString &)
 Adds new deployed country after the specified item.
virtual void addDeployedCountry (const QString &)
 Adds new deployed country.
virtual void selectDeployedCountry (const QString &)
 Selects deployed country by name.
virtual void selectDeployedCountry (int)
 Selects deployed country by index.
virtual int numForces () const
 Returns number of forces.
virtual int numCategories () const
 Returns number of categories.
virtual int numDeployedCountries () const
 Returns number of deployed countries.
virtual void addForce (const QString &, int, const QColor &, bool forceLayout=false)
 Adds new force and force type.
virtual QString force (int) const
 Returns the force string at the specified index.
virtual bool hasForce (int) const
 Returns true if the specified force exists.
virtual void setCategories (const DtTagSelectorWidget::Categories &)
 Sets the new categories.
virtual bool hasCategory (const QString &) const
 Returns true if the specified category exists.
virtual void selectForce (const QString &)
 Selects force by name.
virtual void showForce (bool)
 Show/hide force.
virtual void enableForce (bool)
 Enabled/disable force.
virtual void selectForce (int)
 Selects force by index.
virtual bool isStickyCategory (const std::string &) const
 Returns true if this is a sticky category.
virtual void setStickyCategories (const std::vector< std::string > &)
 Sets the sticky categories. Will rework categories if there are selected ones and then reselect categories.
virtual void selectTopLevelCategory (const std::string &s)
 Selects a top level category.
virtual const std::vector
< std::string > & 
stickyCategories () const
 Sticky categories.
virtual const std::vector
< std::string > & 
nonStickyCategories () const
 Non-sticky selected categories.
virtual void selectCategories (const std::vector< std::string > &)
 Selects categories.
virtual void clearCreateList ()
 Clears the create list.
virtual void setSortingEnabled (bool)
 Sets whether or not to allow list soring.
virtual void sizeColumns ()
 Sizes the columns to contents.
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.
virtual void addPaletteItem (const DtEntityPaletteItem &)
 Adds the new item into the logic.
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.
virtual void setEnabled (bool)
 Enables/Disables Gui.
void createFavoriteIcon ()
 Creates the favorites icon (on and off)
virtual void clearForces ()
 Clear forces combo.
virtual void clearDeployedCountries ()
 Clear deployed countries combo.
virtual void clearCategories ()
 Clear categories combo.
virtual void initialize ()
 Called when first item is added.
virtual void addLocalPaletteFilter (const DtPaletteFilter &)
 This will only apply to this instance of the palette when filtering.
virtual void removeLocalPaletteFilter (const DtPaletteFilter &)
virtual QMenucreateRightClickMenu (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.
- Public Member Functions inherited from makVrv::DtPage
 DtPage (DtDe &de, QWidget *parent=0, Qt::WindowFlags f=0)
 CTOR for page.
virtual ~DtPage ()
 DTOR for page.
virtual PageAction pageAction ()
 return the current action on the page
virtual void setPageAction (PageAction action)
 set the curret action on the page
virtual void setActionFlag (int flag)
 set the action flag of the page
virtual int actionFlag ()
 return the action flag of the page
virtual void setParentDialog (QWidget *paraentDialog)
 set the parent dialog that owns this page
virtual QWidget * parentDialog ()
 return the parent dialog that own this page
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
virtual void askBeforeAction ()
 Called when the action flag is set and before the action is beind executed, default do nothing.
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.
virtual void resumeLastAction ()
 resume the last action of the page
virtual void onCloseEvent ()
 will be called when user hit the close button of this page, default do nothing.
virtual void onSwitchEvent ()
 will be called when user try switch to another page, default do nothing.
- Public Member Functions inherited from makVrf::DtEntityCreatePaletteInterface
virtual ~DtEntityCreatePaletteInterface ()
 Virtual DTOR.
virtual void filterItems ()=0
 Filters items.

Static Public Member Functions

static const std::string & thePageClassName ()
 Static accessor for the class name.

Public Attributes

QVBoxLayout * myMainLayout
QGridLayout * myGridLayout
QLabelmyForceLabel
QLabelmyDeployedCountriesLabel
QComboBoxmyDeployedCountries
DtTagSelectorWidgetmyTags
QComboBoxmyForces
DtEntityPaletteTreeWidgetmyEntities
QImage myFavoriteOn
QImage myFavoriteOff
QLabelmySearchLabel
QLineEditmySearch
QPushButtonmyResetButton
QAbstractButton * myCurrentForceButtonSelected
QAbstractButton * myCurrentTopLevelButtonSelected
DtToolButtonWrapperWidgetmyForceContainer
bool myAllowCombineMode
- Public Attributes inherited from makVrf::DtEntityCreatePaletteInterface
boost::signal< void()> signal_closeEvent
boost::signal< void()> signal_paletteCleared
boost::signal< void()> signal_forceChanged
boost::signal< void(std::vector
< std::string >)> 
signal_categoriesChanged
boost::signal< void(std::string)> signal_deployedCountryChanged
boost::signal< void(const
DtEntityMapperKey &)> 
signal_createObject
boost::signal< void(const
DtEntityMapperKey &)> 
signal_executedFilter
boost::signal< void()> signal_itemsAdded
boost::signal< void(std::string,
const DtEntityMapperKey &)> 
signal_itemSelected
boost::signal< void(DtEntityCreatePaletteInterface *)> signal_updated
boost::signal< void()> signal_modelSetChanged

Protected Slots

virtual void onItemSelectionChanged ()
virtual void slot_onForceChanged ()
virtual void slot_onForceChangedByButton ()
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.
virtual bool hasDeployedCountries () const
 Returns true if supports deployed countries.
virtual void closeEvent (QCloseEvent *)
virtual void showEvent (QShowEvent *)
virtual bool eventFilter (QObject *o, QEvent *e)

Protected Attributes

bool myInitialized
DtEntityCreatePaletteLogicmyLogic
std::map< std::string,
QTreeWidgetItem * > 
myItems
bool myFavoritesSupported
bool myHasDeployedCountries
bool myCloseEventSent
bool myInCreationProcess
bool myShowFavoritesIcon
QMenumyRightClickMenu
std::set< std::string > myAccessibleCategories
- Protected Attributes inherited from makVrv::DtPage
DtDemyDe
QWidget * myParentDialog
PageAction myCurrentPageAction
int myActionFlag

Additional Inherited Members

- Public Types inherited from makVrv::DtPage
enum  PageAction { None = 0x0000, Switching = 0x0001, Closing = 0x0010 }

Detailed Description

A widget class for showing different items of supplied types to the logic tthat can be created.

Constructor & Destructor Documentation

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 makVrf::DtEntityCreatePalette::~DtEntityCreatePalette ( )
virtual

DTOR.

Member Function Documentation

virtual QIcon makVrf::DtEntityCreatePalette::icon ( )
virtual

Icon to be used in small display.

Implements makVrv::DtPage.

Reimplemented in makVrf::DtTacticalGraphicCreatePalette.

virtual QString makVrf::DtEntityCreatePalette::title ( )
virtual

Name to put next to the icon.

Implements makVrv::DtPage.

Reimplemented in makVrf::DtTacticalGraphicCreatePalette.

virtual const std::string& makVrf::DtEntityCreatePalette::pageClassName ( ) const
virtual

Get the class name of the page.

Implements makVrf::DtEntityCreatePaletteInterface.

Reimplemented in makVrf::DtTacticalGraphicCreatePalette.

static const std::string& makVrf::DtEntityCreatePalette::thePageClassName ( )
static

Static accessor for the class name.

Reimplemented in makVrf::DtTacticalGraphicCreatePalette.

virtual void makVrf::DtEntityCreatePalette::activate ( )
inlinevirtual

Called when the page is displayed.

Implements makVrv::DtPage.

virtual void makVrf::DtEntityCreatePalette::deactivate ( )
inlinevirtual

Called when the page is hidden.

Implements makVrv::DtPage.

virtual void makVrf::DtEntityCreatePalette::setSignalSelectionOnly ( bool  )
virtual

Only signals that an item has been selected. Will not start the creation process.

virtual void makVrf::DtEntityCreatePalette::setFavoritesSupported ( bool  )
virtual
virtual bool makVrf::DtEntityCreatePalette::favoritesSupported ( ) const
virtual
virtual void makVrf::DtEntityCreatePalette::setCombinePalettes ( bool  combine)
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 bool makVrf::DtEntityCreatePalette::combinePalettes ( ) const
virtual
virtual DtEntityMapperKey makVrf::DtEntityCreatePalette::selectedObjectType ( ) const
virtual

If there is a current selection return the mapper key of that selection.

Implements makVrf::DtEntityCreatePaletteInterface.

virtual std::vector<DtEntityMapperKey> makVrf::DtEntityCreatePalette::selectedObjects ( ) const
virtual

If there is more than one, all selected objects (or just the one)

Implements makVrf::DtEntityCreatePaletteInterface.

virtual void makVrf::DtEntityCreatePalette::selectObject ( const DtEntityMapperKey )
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 void makVrf::DtEntityCreatePalette::setDragCreateModeEnabled ( bool  )
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 bool makVrf::DtEntityCreatePalette::showNonCreatableUnits ( ) const
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 void makVrf::DtEntityCreatePalette::setShowNonCreatableUnits ( bool  )
virtual
virtual void makVrf::DtEntityCreatePalette::addIgnore ( const DtEntityType &  )
virtual

Adds a key to ignore (into the logic) when filtering items. Will cause a re-filter.

virtual void makVrf::DtEntityCreatePalette::clearIgnore ( )
virtual

Clears all the keys to ignore (in logic). Will cause a re-filter.

virtual void makVrf::DtEntityCreatePalette::setIgnore ( const std::vector< DtEntityType > &  )
virtual

Sets entity types to ignore (in logic)

virtual const std::vector<DtEntityType>& makVrf::DtEntityCreatePalette::ignoring ( ) const
virtual

What is being ignored.

virtual void makVrf::DtEntityCreatePalette::setShowFavoritesIcon ( bool  )
virtual
virtual bool makVrf::DtEntityCreatePalette::showFavoritesIcon ( ) const
virtual
virtual void makVrf::DtEntityCreatePalette::layoutForces ( )
virtual

Force a layout of the forces button bar.

Implements makVrf::DtEntityCreatePaletteInterface.

void makVrf::DtEntityCreatePalette::setupUi ( QWidget *  p,
bool  favoritesSupported 
)
protected

Sets up the contents of the widget onto the supplied parent.

virtual bool makVrf::DtEntityCreatePalette::hasDeployedCountries ( ) const
inlineprotectedvirtual

Returns true if supports deployed countries.

Implements makVrf::DtEntityCreatePaletteInterface.

Reimplemented in makVrf::DtTacticalGraphicCreatePalette.

virtual void makVrf::DtEntityCreatePalette::closeEvent ( QCloseEvent *  )
protectedvirtual
virtual void makVrf::DtEntityCreatePalette::showEvent ( QShowEvent *  )
protectedvirtual
virtual bool makVrf::DtEntityCreatePalette::eventFilter ( QObject o,
QEvent *  e 
)
protectedvirtual
virtual void makVrf::DtEntityCreatePalette::clear ( )
virtual

Clears contents of widget.

Implements makVrf::DtEntityCreatePaletteInterface.

virtual void makVrf::DtEntityCreatePalette::update ( )
virtual

Tells widget to update (redraw)

Implements makVrf::DtEntityCreatePaletteInterface.

virtual QString makVrf::DtEntityCreatePalette::currentForce ( ) const
virtual

Returns currently selected force.

Implements makVrf::DtEntityCreatePaletteInterface.

virtual int makVrf::DtEntityCreatePalette::currentForceType ( ) const
virtual

Returns the current force type selected.

Implements makVrf::DtEntityCreatePaletteInterface.

virtual int makVrf::DtEntityCreatePalette::currentForceIndex ( ) const
virtual

Returns the index of the currently selected force in the combo box.

Implements makVrf::DtEntityCreatePaletteInterface.

virtual int makVrf::DtEntityCreatePalette::currentDeployedCountryIndex ( ) const
virtual

Returns the index of the currently selected deployed country in the combo box.

Implements makVrf::DtEntityCreatePaletteInterface.

virtual int makVrf::DtEntityCreatePalette::forceTypeAtIndex ( int  ) const
virtual

Force type at index.

Implements makVrf::DtEntityCreatePaletteInterface.

virtual std::vector<std::string> makVrf::DtEntityCreatePalette::currentCategories ( ) const
virtual

Returns currently selected category.

Implements makVrf::DtEntityCreatePaletteInterface.

virtual void makVrf::DtEntityCreatePalette::setAccessibleCategories ( const std::set< std::string > &  )
virtual

All categories available for this palette.

Implements makVrf::DtEntityCreatePaletteInterface.

virtual QString makVrf::DtEntityCreatePalette::currentDeployedCountry ( ) const
virtual

Returns currently selected deployed country.

Implements makVrf::DtEntityCreatePaletteInterface.

virtual bool makVrf::DtEntityCreatePalette::hasDeployedCountry ( const QString &  ) const
virtual

Returns true if the specified deployed country exists.

Implements makVrf::DtEntityCreatePaletteInterface.

virtual void makVrf::DtEntityCreatePalette::insertDeployedCountry ( const QString &  ,
int   
)
virtual

Adds new deployed country at the specified index.

Implements makVrf::DtEntityCreatePaletteInterface.

virtual bool makVrf::DtEntityCreatePalette::initiallyVisible ( ) const
inlinevirtual
virtual void makVrf::DtEntityCreatePalette::insertDeployedCountryBefore ( const QString &  ,
const QString &   
)
virtual

Adds new deployed country before the specified item.

Implements makVrf::DtEntityCreatePaletteInterface.

virtual void makVrf::DtEntityCreatePalette::insertDeployedCountryAfter ( const QString &  ,
const QString &   
)
virtual

Adds new deployed country after the specified item.

Implements makVrf::DtEntityCreatePaletteInterface.

virtual void makVrf::DtEntityCreatePalette::addDeployedCountry ( const QString &  )
virtual

Adds new deployed country.

Implements makVrf::DtEntityCreatePaletteInterface.

virtual void makVrf::DtEntityCreatePalette::selectDeployedCountry ( const QString &  )
virtual

Selects deployed country by name.

Implements makVrf::DtEntityCreatePaletteInterface.

virtual void makVrf::DtEntityCreatePalette::selectDeployedCountry ( int  )
virtual

Selects deployed country by index.

Implements makVrf::DtEntityCreatePaletteInterface.

virtual int makVrf::DtEntityCreatePalette::numForces ( ) const
virtual

Returns number of forces.

Implements makVrf::DtEntityCreatePaletteInterface.

virtual int makVrf::DtEntityCreatePalette::numCategories ( ) const
virtual

Returns number of categories.

Implements makVrf::DtEntityCreatePaletteInterface.

virtual int makVrf::DtEntityCreatePalette::numDeployedCountries ( ) const
virtual

Returns number of deployed countries.

Implements makVrf::DtEntityCreatePaletteInterface.

virtual void makVrf::DtEntityCreatePalette::addForce ( const QString &  ,
int  ,
const QColor &  ,
bool  forceLayout = false 
)
virtual

Adds new force and force type.

Implements makVrf::DtEntityCreatePaletteInterface.

virtual QString makVrf::DtEntityCreatePalette::force ( int  ) const
virtual

Returns the force string at the specified index.

Implements makVrf::DtEntityCreatePaletteInterface.

virtual bool makVrf::DtEntityCreatePalette::hasForce ( int  ) const
virtual

Returns true if the specified force exists.

Implements makVrf::DtEntityCreatePaletteInterface.

virtual void makVrf::DtEntityCreatePalette::setCategories ( const DtTagSelectorWidget::Categories )
virtual

Sets the new categories.

Implements makVrf::DtEntityCreatePaletteInterface.

virtual bool makVrf::DtEntityCreatePalette::hasCategory ( const QString &  ) const
virtual

Returns true if the specified category exists.

Implements makVrf::DtEntityCreatePaletteInterface.

virtual void makVrf::DtEntityCreatePalette::selectForce ( const QString &  )
virtual

Selects force by name.

Implements makVrf::DtEntityCreatePaletteInterface.

virtual void makVrf::DtEntityCreatePalette::showForce ( bool  )
virtual

Show/hide force.

Implements makVrf::DtEntityCreatePaletteInterface.

virtual void makVrf::DtEntityCreatePalette::enableForce ( bool  )
virtual

Enabled/disable force.

virtual void makVrf::DtEntityCreatePalette::selectForce ( int  )
virtual

Selects force by index.

Implements makVrf::DtEntityCreatePaletteInterface.

virtual bool makVrf::DtEntityCreatePalette::isStickyCategory ( const std::string &  ) const
virtual

Returns true if this is a sticky category.

virtual void makVrf::DtEntityCreatePalette::setStickyCategories ( const std::vector< std::string > &  )
virtual

Sets the sticky categories. Will rework categories if there are selected ones and then reselect categories.

virtual void makVrf::DtEntityCreatePalette::selectTopLevelCategory ( const std::string &  s)
virtual

Selects a top level category.

virtual const std::vector<std::string>& makVrf::DtEntityCreatePalette::stickyCategories ( ) const
virtual

Sticky categories.

virtual const std::vector<std::string>& makVrf::DtEntityCreatePalette::nonStickyCategories ( ) const
virtual

Non-sticky selected categories.

virtual void makVrf::DtEntityCreatePalette::selectCategories ( const std::vector< std::string > &  )
virtual

Selects categories.

Implements makVrf::DtEntityCreatePaletteInterface.

virtual void makVrf::DtEntityCreatePalette::clearCreateList ( )
virtual

Clears the create list.

Implements makVrf::DtEntityCreatePaletteInterface.

virtual void makVrf::DtEntityCreatePalette::setSortingEnabled ( bool  )
virtual

Sets whether or not to allow list soring.

Implements makVrf::DtEntityCreatePaletteInterface.

virtual void makVrf::DtEntityCreatePalette::sizeColumns ( )
virtual

Sizes the columns to contents.

Implements makVrf::DtEntityCreatePaletteInterface.

virtual void makVrf::DtEntityCreatePalette::addItem ( const DtEntityPaletteItem ,
int  force 
)
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 void makVrf::DtEntityCreatePalette::addPaletteItem ( const DtEntityPaletteItem )
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 void makVrf::DtEntityCreatePalette::removePaletteItem ( const DtEntityMapperKey key,
bool  matchPattern = false 
)
virtual

Removes an item from the internal list for any key that matches (or matches pattern of) the supplied key.

Implements makVrf::DtEntityCreatePaletteInterface.

virtual void makVrf::DtEntityCreatePalette::setEnabled ( bool  )
virtual

Enables/Disables Gui.

Implements makVrf::DtEntityCreatePaletteInterface.

void makVrf::DtEntityCreatePalette::createFavoriteIcon ( )

Creates the favorites icon (on and off)

virtual void makVrf::DtEntityCreatePalette::clearForces ( )
virtual

Clear forces combo.

Implements makVrf::DtEntityCreatePaletteInterface.

virtual void makVrf::DtEntityCreatePalette::clearDeployedCountries ( )
virtual

Clear deployed countries combo.

Implements makVrf::DtEntityCreatePaletteInterface.

virtual void makVrf::DtEntityCreatePalette::clearCategories ( )
virtual

Clear categories combo.

Implements makVrf::DtEntityCreatePaletteInterface.

virtual void makVrf::DtEntityCreatePalette::initialize ( )
virtual

Called when first item is added.

virtual void makVrf::DtEntityCreatePalette::addLocalPaletteFilter ( const DtPaletteFilter )
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 void makVrf::DtEntityCreatePalette::removeLocalPaletteFilter ( const DtPaletteFilter )
virtual
virtual QMenu* makVrf::DtEntityCreatePalette::createRightClickMenu ( DtEntityCreatePaletteItem )
virtual
virtual void makVrf::DtEntityCreatePalette::slot_onTagsChanged ( const std::vector< std::string > &  )
virtual
virtual void makVrf::DtEntityCreatePalette::setCategoriesFromCounts ( const std::map< std::string, int > &  counts,
const std::set< std::string > &  categoriesReferenced,
int  totalItems 
)
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 void makVrf::DtEntityCreatePalette::onItemSelectionChanged ( )
protectedvirtualslot
virtual void makVrf::DtEntityCreatePalette::slot_onForceChanged ( )
protectedvirtualslot
virtual void makVrf::DtEntityCreatePalette::slot_onForceChangedByButton ( )
protectedvirtualslot
virtual void makVrf::DtEntityCreatePalette::slot_onDeployedCountryChanged ( )
protectedvirtualslot
virtual void makVrf::DtEntityCreatePalette::slot_onItemPressed ( QTreeWidgetItem ,
QMouseEvent *  ,
int   
)
protectedvirtualslot
virtual void makVrf::DtEntityCreatePalette::slot_onItemRightClickedOn ( QTreeWidgetItem ,
QMouseEvent *  ,
int   
)
protectedvirtualslot
virtual void makVrf::DtEntityCreatePalette::filterItems ( )
protectedvirtualslot
virtual void makVrf::DtEntityCreatePalette::resetFilter ( )
protectedvirtualslot
virtual void makVrf::DtEntityCreatePalette::addToFavoritesRightClick ( )
protectedvirtualslot
virtual void makVrf::DtEntityCreatePalette::removeFromFavoritesRightClick ( )
protectedvirtualslot

Member Data Documentation

bool makVrf::DtEntityCreatePalette::myInitialized
protected
DtEntityCreatePaletteLogic* makVrf::DtEntityCreatePalette::myLogic
protected
std::map<std::string, QTreeWidgetItem*> makVrf::DtEntityCreatePalette::myItems
protected
bool makVrf::DtEntityCreatePalette::myFavoritesSupported
protected
bool makVrf::DtEntityCreatePalette::myHasDeployedCountries
protected
bool makVrf::DtEntityCreatePalette::myCloseEventSent
protected
bool makVrf::DtEntityCreatePalette::myInCreationProcess
protected
bool makVrf::DtEntityCreatePalette::myShowFavoritesIcon
protected
QMenu* makVrf::DtEntityCreatePalette::myRightClickMenu
protected
std::set<std::string> makVrf::DtEntityCreatePalette::myAccessibleCategories
protected
QVBoxLayout* makVrf::DtEntityCreatePalette::myMainLayout
QGridLayout* makVrf::DtEntityCreatePalette::myGridLayout
QLabel* makVrf::DtEntityCreatePalette::myForceLabel
QLabel* makVrf::DtEntityCreatePalette::myDeployedCountriesLabel
QComboBox* makVrf::DtEntityCreatePalette::myDeployedCountries
DtTagSelectorWidget* makVrf::DtEntityCreatePalette::myTags
QComboBox* 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
QAbstractButton* makVrf::DtEntityCreatePalette::myCurrentForceButtonSelected
QAbstractButton* makVrf::DtEntityCreatePalette::myCurrentTopLevelButtonSelected
DtToolButtonWrapperWidget* makVrf::DtEntityCreatePalette::myForceContainer
bool makVrf::DtEntityCreatePalette::myAllowCombineMode

The documentation for this class was generated from the following file:

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)