![]() |
VR-Forces 4.8 Class Documentation
|
This class extends the country codes manager to return an icon for the 2 letter country code (referencing the icon flag zip file) and also translated country code as part of the country name return. More...

Public Types | |
| typedef std::map< std::string, QPixmap > | CountryFlags |
| Map is 2 letter country code followed by engish name. More... | |
Public Types inherited from makVrf::DtCountryCodesManager | |
| typedef std::map< std::string, std::string > | CountryCodes |
| Map is 2 letter country code followed by engish name. More... | |
Public Member Functions | |
| DtQtCountryCodesManager (makVrv::DtDe &) | |
| DtQtCountryCodesManager (const DtCountryCodesManager &orig) | |
| virtual | ~DtQtCountryCodesManager () |
| virtual const CountryFlags & | countryFlags () const |
| Returns the current list of country codes. More... | |
| virtual QStringList | countryCodesStringList () const |
| virtual void | setFlagsFileAndExtension (const std::string &file, const std::string &extension) |
| Sets the .zip file that has the flags by <two letter="" code>="">. More... | |
| virtual std::string | country (const std::string &code) const |
| Returns the country name for the country code. More... | |
| virtual QPixmap | flag (const std::string &code) |
| Returns the pixmap of the country flag. Will create if does not exist. More... | |
| virtual bool | readFlagMemoryFromFlagFile (const std::string &code, char **buffer, int &length) const |
Given the current flag file and extension, look for a . More... | |
| virtual std::string | untranslatedCountry (const std::string &) const |
| Returns the raw (untranslated) country name string by code. More... | |
Public Member Functions inherited from makVrf::DtCountryCodesManager | |
| DtCountryCodesManager (makVrv::DtDe &) | |
| DtCountryCodesManager (const DtCountryCodesManager &) | |
| virtual | ~DtCountryCodesManager () |
| virtual const std::set < std::string > & | countryCodes () const |
| Returns the current list of country codes. More... | |
| virtual const CountryCodes & | countryCodesByCountry () const |
| Returns the current list of countries mapped to country codes. More... | |
| virtual const CountryCodes & | countriesByCountryCode () const |
| Returns the current list of country codes mapped to country. More... | |
| virtual void | addCountry (const std::string &code, const std::string &name, bool signal=true) |
| Adds a new country code and country. More... | |
| virtual std::string | countryCode (const std::string &country) const |
| Returns the country code for the country name (english) More... | |
| virtual bool | loadCountryCodesFile (const std::string &, bool merge=false) |
| Loads the country code file. Will merge if the optional flag is true, else will replace all. More... | |
| virtual bool | reload () |
| Clears out and reloads based on last loaded file. More... | |
| virtual bool | removeCountry (const std::string &, bool signal=true) |
| Removes a country by code. More... | |
Public Member Functions inherited from makVrv::DtVirtualBaseClass | |
| DtVirtualBaseClass () | |
| Do nothing constructor. More... | |
| virtual | ~DtVirtualBaseClass () |
| Virtual do nothing destructor. More... | |
Static Public Member Functions | |
| static DtQtCountryCodesManager & | instance (makVrv::DtDe &de) |
| Returns instance of the messager. More... | |
Static Public Member Functions inherited from makVrf::DtCountryCodesManager | |
| static DtCountryCodesManager & | instance (makVrv::DtDe &de) |
| Returns instance of the messager. More... | |
| static void | registerInstance (makVrv::DtDe &, DtCountryCodesManager *) |
Protected Attributes | |
| CountryFlags | myCountryFlags |
| DtFilename | myFlagsFile |
| DtString | myFlagsExtension |
Protected Attributes inherited from makVrf::DtCountryCodesManager | |
| makVrv::DtDe & | myDe |
| std::set< std::string > | myCountryCodes |
| CountryCodes | myCountriesByCountryCode |
| CountryCodes | myCountryCodesByCountry |
| DtFilename | myLastLoadedFile |
| Reverse map (for convenience) More... | |
Additional Inherited Members | |
Public Attributes inherited from makVrf::DtCountryCodesManager | |
| boost::signals2::signal< void(std::string, std::string)> | signal_countryAdded |
| Signals Signal when country added (code, name) More... | |
| boost::signals2::signal< void(std::string)> | signal_countryRemoved |
| Signal sent when country removed. More... | |
| boost::signals2::signal< void()> | signal_loaded |
| Signal when loaded. More... | |
This class extends the country codes manager to return an icon for the 2 letter country code (referencing the icon flag zip file) and also translated country code as part of the country name return.
The return will be in the form of toUtf8 from the QString, so, to put back into QString call fromUtf8
| typedef std::map<std::string, QPixmap> makVrf::DtQtCountryCodesManager::CountryFlags |
Map is 2 letter country code followed by engish name.
| makVrf::DtQtCountryCodesManager::DtQtCountryCodesManager | ( | makVrv::DtDe & | ) |
| makVrf::DtQtCountryCodesManager::DtQtCountryCodesManager | ( | const DtCountryCodesManager & | orig | ) |
|
virtual |
|
static |
Returns instance of the messager.
If there is a DtCountryCodesManager this will replace that. It will copy existing country information from the current manager
|
inlinevirtual |
Returns the current list of country codes.
|
virtual |
|
virtual |
Sets the .zip file that has the flags by <two letter="" code>="">.
<extension>. The default extension is .png and the default file is in settings\flags-mini.zip Adds a new country code and country
|
virtual |
Returns the country name for the country code.
Reimplemented from makVrf::DtCountryCodesManager.
|
virtual |
Returns the pixmap of the country flag. Will create if does not exist.
|
virtual |
Given the current flag file and extension, look for a .
<extension> file in the .zip flag flag and return the buffer in the supplied buffer. You must delete the buffer (delete[] buffer) on return
|
virtual |
Returns the raw (untranslated) country name string by code.
|
protected |
|
protected |
|
protected |