VR-Forces 5.0.1 Developer's Guide
 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 | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes
makVrf::DtEntityCreatePaletteLogic Class Reference
Inheritance diagram for makVrf::DtEntityCreatePaletteLogic:
Inheritance graph
[legend]

Public Member Functions

virtual ~DtEntityCreatePaletteLogic ()
 
virtual void createAndAddItem (const std::string &name, const DtEntityMapperKey &key, const std::set< std::string > &categories, const std::vector< int > &forces, const std::string &description="", int itemsToCreate=0)
 
virtual void removeItem (const DtEntityMapperKey &key, bool matchesPattern=false)
 
virtual void disconnectCreationSignal (bool disconnect)
 
virtual void setFavorite (const DtEntityMapperKey &, bool)
 
virtual void setCombinePalettes (bool combine)
 
virtual bool combinePalettes () const
 
virtual void addLocalPaletteFilter (const DtPaletteFilter &)
 
virtual void removeLocalPaletteFilter (const DtPaletteFilter &)
 
bool showNonCreatableUnits () const
 
virtual void setShowNonCreatableUnits (bool)
 
virtual void addIgnore (const DtEntityType &)
 
virtual void clearIgnore ()
 
virtual const std::vector
< DtEntityType > & 
ignoring () const
 
virtual void setIgnore (const std::vector< DtEntityType > &)
 
virtual void slot_defaultIconListChanged ()
 

Static Public Member Functions

static DtEntityCreatePaletteLogiccreate (makVrv::DtDe &de, DtEntityCreatePaletteInterface *iFace)
 
static void addGlobalPaletteFilter (const DtPaletteFilter &)
 
static void removeGlobalPaletteFilter (const DtPaletteFilter &)
 

Protected Types

typedef std::map< std::string,
std::set
< DtEntityPaletteItemHandle > > 
CategoriesMap
 

Protected Member Functions

 DtEntityCreatePaletteLogic (makVrv::DtDe &de, DtEntityCreatePaletteInterface *iFace)
 
virtual void slot_postInitialize (makVrv::DtDe &de)
 
virtual void slot_modelSetChanged ()
 
virtual void slot_categoriesChanged (std::vector< std::string > newCategories)
 
virtual void slot_deployedCountryChanged (std::string newCategory)
 
virtual void slot_executeFilter ()
 
virtual void slot_selectedBackEndChanged (const DtSimulationAddress &old, const DtSimulationAddress &newaddr)
 
virtual void slot_backendUpdated (const DtVrfBackendState &, int)
 
virtual void slot_createObject (const DtEntityMapperKey &)
 
virtual bool modelIsCreatable (DtModelSetEntry *) const
 
virtual bool ignoreType (const DtEntityType &) const
 
virtual bool forceCanBeCreatedByUser (int) const
 
virtual bool shouldAddCreationItem (const DtEntityPaletteItem &, const std::set< std::string > &categories, const std::string &deployedCountry, int force) const
 
virtual void enablePalette (int terrainPatchOffset=0)
 
virtual void slot_terrainPatchToBeDeleted ()
 
virtual void slot_terrainPatchAdded ()
 
virtual void slot_sessionStatusChanged ()
 
virtual void slot_forceChanged ()
 
virtual bool includeModelOnPage (DtModelSetEntry *model) const
 

Protected Attributes

makVrv::DtDemyDe
 
DtEntityCreatePaletteInterfacemyInterface
 
CategoriesMap myCategoriesMap
 
std::vector
< DtEntityPaletteItemHandle
myItems
 
makVrv::DtMenuPath myOrderedPath
 
bool myAllowOverlays
 
std::vector< DtPaletteFilter * > myLocalPaletteFilters
 
std::map< int, std::string > myPotentialForces
 
makVrv::DtSignalConnectionManager myConnectionManager
 
std::vector< DtEntityType > myRemoveItems
 
bool myShowNonCreatableUnits
 
bool myAllowCombineMode
 
std::vector< DtEntityType > myToIgnore
 

Static Protected Attributes

static std::vector
< DtPaletteFilter * > 
theGlobalPaletteFilters
 

Member Typedef Documentation

typedef std::map<std::string, std::set<DtEntityPaletteItemHandle> > makVrf::DtEntityCreatePaletteLogic::CategoriesMap
protected

Constructor & Destructor Documentation

virtual makVrf::DtEntityCreatePaletteLogic::~DtEntityCreatePaletteLogic ( )
virtual

virtual DTOR

makVrf::DtEntityCreatePaletteLogic::DtEntityCreatePaletteLogic ( makVrv::DtDe de,
DtEntityCreatePaletteInterface iFace 
)
protected

Constructor (protected - use ::create() )

Member Function Documentation

static DtEntityCreatePaletteLogic* makVrf::DtEntityCreatePaletteLogic::create ( makVrv::DtDe de,
DtEntityCreatePaletteInterface iFace 
)
static

Create and initialize the logic.

virtual void makVrf::DtEntityCreatePaletteLogic::createAndAddItem ( const std::string &  name,
const DtEntityMapperKey key,
const std::set< std::string > &  categories,
const std::vector< int > &  forces,
const std::string &  description = "",
int  itemsToCreate = 0 
)
virtual
virtual void makVrf::DtEntityCreatePaletteLogic::removeItem ( const DtEntityMapperKey key,
bool  matchesPattern = false 
)
virtual

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

virtual void makVrf::DtEntityCreatePaletteLogic::disconnectCreationSignal ( bool  disconnect)
virtual
virtual void makVrf::DtEntityCreatePaletteLogic::setFavorite ( const DtEntityMapperKey ,
bool   
)
virtual

Sets item to be a favorite or not.

virtual void makVrf::DtEntityCreatePaletteLogic::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.

virtual bool makVrf::DtEntityCreatePaletteLogic::combinePalettes ( ) const
virtual
static void makVrf::DtEntityCreatePaletteLogic::addGlobalPaletteFilter ( const DtPaletteFilter )
static

Adds a filter to use to filter out items that should be added to palette. This class will clone the filter and take ownership of that memory, so, make sure your filter has a clone method.

static void makVrf::DtEntityCreatePaletteLogic::removeGlobalPaletteFilter ( const DtPaletteFilter )
static
virtual void makVrf::DtEntityCreatePaletteLogic::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::DtEntityCreatePaletteLogic::removeLocalPaletteFilter ( const DtPaletteFilter )
virtual
bool makVrf::DtEntityCreatePaletteLogic::showNonCreatableUnits ( ) const
inline

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::DtEntityCreatePaletteLogic::setShowNonCreatableUnits ( bool  )
virtual
virtual void makVrf::DtEntityCreatePaletteLogic::addIgnore ( const DtEntityType &  )
virtual

Adds a key to ignore when filtering items. Will cause a re-filter.

virtual void makVrf::DtEntityCreatePaletteLogic::clearIgnore ( )
virtual

Clears all the keys to ignore. Will cause a re-filter.

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

The entity types being ignored.

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

Set the entity types to ignore.

virtual void makVrf::DtEntityCreatePaletteLogic::slot_defaultIconListChanged ( )
virtual
virtual void makVrf::DtEntityCreatePaletteLogic::slot_postInitialize ( makVrv::DtDe de)
protectedvirtual
virtual void makVrf::DtEntityCreatePaletteLogic::slot_modelSetChanged ( )
protectedvirtual
virtual void makVrf::DtEntityCreatePaletteLogic::slot_categoriesChanged ( std::vector< std::string >  newCategories)
protectedvirtual
virtual void makVrf::DtEntityCreatePaletteLogic::slot_deployedCountryChanged ( std::string  newCategory)
protectedvirtual
virtual void makVrf::DtEntityCreatePaletteLogic::slot_executeFilter ( )
protectedvirtual
virtual void makVrf::DtEntityCreatePaletteLogic::slot_selectedBackEndChanged ( const DtSimulationAddress &  old,
const DtSimulationAddress &  newaddr 
)
protectedvirtual
virtual void makVrf::DtEntityCreatePaletteLogic::slot_backendUpdated ( const DtVrfBackendState ,
int   
)
protectedvirtual
virtual void makVrf::DtEntityCreatePaletteLogic::slot_createObject ( const DtEntityMapperKey )
protectedvirtual
virtual bool makVrf::DtEntityCreatePaletteLogic::modelIsCreatable ( DtModelSetEntry ) const
protectedvirtual

Returns true if this model is creatable.

virtual bool makVrf::DtEntityCreatePaletteLogic::ignoreType ( const DtEntityType &  ) const
protectedvirtual

Whether or not to ignore this type.

virtual bool makVrf::DtEntityCreatePaletteLogic::forceCanBeCreatedByUser ( int  ) const
protectedvirtual
virtual bool makVrf::DtEntityCreatePaletteLogic::shouldAddCreationItem ( const DtEntityPaletteItem ,
const std::set< std::string > &  categories,
const std::string &  deployedCountry,
int  force 
) const
protectedvirtual
virtual void makVrf::DtEntityCreatePaletteLogic::enablePalette ( int  terrainPatchOffset = 0)
protectedvirtual
virtual void makVrf::DtEntityCreatePaletteLogic::slot_terrainPatchToBeDeleted ( )
protectedvirtual
virtual void makVrf::DtEntityCreatePaletteLogic::slot_terrainPatchAdded ( )
protectedvirtual
virtual void makVrf::DtEntityCreatePaletteLogic::slot_sessionStatusChanged ( )
protectedvirtual
virtual void makVrf::DtEntityCreatePaletteLogic::slot_forceChanged ( )
protectedvirtual

If the force has changed and we are in creation mode change the force of the thing being created (as well as execute the filter)

virtual bool makVrf::DtEntityCreatePaletteLogic::includeModelOnPage ( DtModelSetEntry model) const
protectedvirtual

Member Data Documentation

makVrv::DtDe& makVrf::DtEntityCreatePaletteLogic::myDe
protected
DtEntityCreatePaletteInterface* makVrf::DtEntityCreatePaletteLogic::myInterface
protected
CategoriesMap makVrf::DtEntityCreatePaletteLogic::myCategoriesMap
protected
std::vector<DtEntityPaletteItemHandle> makVrf::DtEntityCreatePaletteLogic::myItems
protected
makVrv::DtMenuPath makVrf::DtEntityCreatePaletteLogic::myOrderedPath
protected
bool makVrf::DtEntityCreatePaletteLogic::myAllowOverlays
protected
std::vector<DtPaletteFilter*> makVrf::DtEntityCreatePaletteLogic::theGlobalPaletteFilters
staticprotected
std::vector<DtPaletteFilter*> makVrf::DtEntityCreatePaletteLogic::myLocalPaletteFilters
protected
std::map<int, std::string> makVrf::DtEntityCreatePaletteLogic::myPotentialForces
protected
makVrv::DtSignalConnectionManager makVrf::DtEntityCreatePaletteLogic::myConnectionManager
protected
std::vector<DtEntityType> makVrf::DtEntityCreatePaletteLogic::myRemoveItems
protected
bool makVrf::DtEntityCreatePaletteLogic::myShowNonCreatableUnits
protected
bool makVrf::DtEntityCreatePaletteLogic::myAllowCombineMode
protected
std::vector<DtEntityType> makVrf::DtEntityCreatePaletteLogic::myToIgnore
protected

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

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)