![]() |
VR-Forces 5.0.2 Developer's Guide
|
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.

Public Types | |
| typedef std::map< std::string, QPixmap > | CountryFlags |
Public Types inherited from makVrf::DtCountryCodesManager | |
| typedef std::map< std::string, std::string > | CountryCodes |
Public Member Functions | |
| DtQtCountryCodesManager (makVrv::DtDe &) | |
| DtQtCountryCodesManager (const DtCountryCodesManager &orig) | |
| virtual | ~DtQtCountryCodesManager () |
| virtual const CountryFlags & | countryFlags () const |
| virtual QStringList | countryCodesStringList () const |
| virtual void | setFlagsFileAndExtension (const std::string &file, const std::string &extension) |
| virtual std::string | country (const std::string &code) const |
| virtual QPixmap | flag (const std::string &code) |
| virtual bool | readFlagMemoryFromFlagFile (const std::string &code, char **buffer, int &length) const |
| virtual std::string | untranslatedCountry (const std::string &) const |
Public Member Functions inherited from makVrf::DtCountryCodesManager | |
| DtCountryCodesManager (makVrv::DtDe &) | |
| DtCountryCodesManager (const DtCountryCodesManager &) | |
| virtual | ~DtCountryCodesManager () |
| virtual const std::set < std::string > & | countryCodes () const |
| virtual const CountryCodes & | countryCodesByCountry () const |
| virtual const CountryCodes & | countriesByCountryCode () const |
| virtual void | addCountry (const std::string &code, const std::string &name, bool signal=true) |
| virtual std::string | countryCode (const std::string &country) const |
| virtual bool | loadCountryCodesFile (const std::string &, bool merge=false) |
| virtual bool | reload () |
| virtual bool | removeCountry (const std::string &, bool signal=true) |
Public Member Functions inherited from makVrv::DtVirtualBaseClass | |
| DtVirtualBaseClass () | |
| virtual | ~DtVirtualBaseClass () |
Static Public Member Functions | |
| static DtQtCountryCodesManager & | instance (makVrv::DtDe &de) |
Static Public Member Functions inherited from makVrf::DtCountryCodesManager | |
| static DtCountryCodesManager & | instance (makVrv::DtDe &de) |
| 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 |
Additional Inherited Members | |
Public Attributes inherited from makVrf::DtCountryCodesManager | |
| boost::signals2::signal< void(std::string, std::string)> | signal_countryAdded |
| boost::signals2::signal< void(std::string)> | signal_countryRemoved |
| boost::signals2::signal< void()> | signal_loaded |
| 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 |