FMH
Classes | |
class | Downloader |
class | FileLoader |
Typedefs | |
typedef QHash< MODEL_KEY, QString > | MODEL |
typedef QVector< MODEL > | MODEL_LIST |
Enumerations | |
enum | MODEL_KEY : int { ICON , LABEL , PATH , URL , TYPE , GROUP , OWNER , SUFFIX , NAME , DATE , SIZE , MODIFIED , MIME , TAG , PERMISSIONS , THUMBNAIL , THUMBNAIL_1 , THUMBNAIL_2 , THUMBNAIL_3 , HIDDEN , ICONSIZE , DETAILVIEW , SHOWTHUMBNAIL , SHOWTERMINAL , COUNT , SORTBY , USER , PASSWORD , SERVER , FOLDERSFIRST , VIEWTYPE , ADDDATE , FAV , FAVORITE , COLOR , RATE , FORMAT , PLACE , LOCATION , ALBUM , ARTIST , TRACK , DURATION , ARTWORK , PLAYLIST , LYRICS , WIKI , MOOD , SOURCETYPE , GENRE , NOTE , COMMENT , CONTEXT , SOURCE , TITLE , ID , PARENT_ID , RELEASEDATE , LICENSE , DESCRIPTION , BOOKMARK , ACCOUNT , ACCOUNTTYPE , VERSION , DOMAIN_M , CATEGORY , CONTENT , PIN , IMG , PREVIEW , LINK , STAMP , BOOK , N , PHOTO , GENDER , ADR , ADR_2 , ADR_3 , EMAIL , EMAIL_2 , EMAIL_3 , LANG , NICKNAME , ORG , PROFILE , TZ , TEL , TEL_2 , TEL_3 , IM , CITY , STATE , COUNTRY , PACKAGE_ARCH , PACKAGE_TYPE , GPG_FINGERPRINT , GPG_SIGNATURE , PACKAGE_NAME , PRICE , REPOSITORY , TAGS , WAY , PIC , SMALL_PIC , CHANGED , COMMENTS , CREATED , DETAIL_PAGE , DETAILS , TOTAL_DOWNLOADS , GHNS_EXCLUDED , LANGUAGE , PERSON_ID , SCORE , SUMMARY , TYPE_ID , TYPE_NAME , XDG_TYPE , SYMLINK , IS_SYMLINK , IS_DIR , IS_FILE , IS_REMOTE , EXECUTABLE , READABLE , WRITABLE , LAST_READ , VALUE , KEY , MAC , LOT , APP , URI , DEVICE , LASTSYNC , UDI , LATITUDE , LONGITUDE , MESSAGE , AUTHOR , BRANCH , UPDATABLE } |
Functions | |
bool | fileExists (const QUrl &path) |
const FMH::MODEL | filterModel (const MODEL &model, const QVector< MODEL_KEY > &keys) |
bool | isAndroid () |
bool | isIOS () |
bool | isLinux () |
bool | isMac () |
bool | isWindows () |
const QString | mapValue (const QVariantMap &map, const MODEL_KEY &key) |
const QVector< int > | modelRoles (const MODEL &model) |
const QStringList | modelToList (const MODEL_LIST &list, const MODEL_KEY &key) |
const QVariantMap | toMap (const MODEL &model) |
const QVariantList | toMapList (const MODEL_LIST &list) |
const FMH::MODEL | toModel (const QVariantMap &map) |
const FMH::MODEL_LIST | toModelList (const QVariantList &list) |
Variables | |
static const QHash< MODEL_KEY, QString > | MODEL_NAME |
static const QHash< QString, MODEL_KEY > | MODEL_NAME_KEY |
Detailed Description
A set of helpers for managing the key-value model data type.
And other functionality helpers.
Typedef Documentation
◆ MODEL
typedef QHash<MODEL_KEY, QString> FMH::MODEL |
◆ MODEL_LIST
typedef QVector<MODEL> FMH::MODEL_LIST |
An alias for a container of multiple FMH::MODEL key-value pairs.
Enumeration Type Documentation
◆ MODEL_KEY
enum FMH::MODEL_KEY : int |
Function Documentation
◆ fileExists()
bool MAUIKIT_EXPORT FMH::fileExists | ( | const QUrl & | path | ) |
◆ filterModel()
const MODEL MAUIKIT_EXPORT FMH::filterModel | ( | const MODEL & | model, |
const QVector< MODEL_KEY > & | keys ) |
Creates a new MODEL from another by filtering in the given array of MODEL_KEY.
- Parameters
-
model the source model used to filter keys the keys of the values to be filtered-in
- Returns
- a new FMH::MODEL with the values filtered from the original model source
◆ isAndroid()
bool MAUIKIT_EXPORT FMH::isAndroid | ( | ) |
◆ isIOS()
bool MAUIKIT_EXPORT FMH::isIOS | ( | ) |
◆ isLinux()
bool MAUIKIT_EXPORT FMH::isLinux | ( | ) |
◆ isMac()
bool MAUIKIT_EXPORT FMH::isMac | ( | ) |
◆ isWindows()
bool MAUIKIT_EXPORT FMH::isWindows | ( | ) |
◆ mapValue()
Extracts a value associated with that given FMH::MODEL_KEY key in a map.
- Parameters
-
map the map with the data key the key to look for in the map
- Returns
- if found, the string value is returned, otherwise an empty string.
◆ modelRoles()
Given a FMH::MODEL, this function will extract all the FMH::MODEL_KEY values used as the keys/roles.
- Parameters
-
model the given key-value pair model
- Returns
- A list of keys/roles in the given model
◆ modelToList()
const QStringList MAUIKIT_EXPORT FMH::modelToList | ( | const MODEL_LIST & | list, |
const MODEL_KEY & | key ) |
Extracts from a MODEL_LIST the values from a given MODEL::KEY into a QStringList.
- Parameters
-
list the source list of model pairs key the keys to use to extract the values
- Returns
- a list of the values extracted
◆ toMap()
const QVariantMap MAUIKIT_EXPORT FMH::toMap | ( | const MODEL & | model | ) |
◆ toMapList()
const QVariantList MAUIKIT_EXPORT FMH::toMapList | ( | const MODEL_LIST & | list | ) |
◆ toModel()
const MODEL MAUIKIT_EXPORT FMH::toModel | ( | const QVariantMap & | map | ) |
Converts a QVariantMap to a FMH::MODEl.
- Note
- For this to be successful, the original map keys should be mappable in the FMH::MODEL_NAME.
- Parameters
-
map the map to be converted
- Returns
- the resulting FMH::MODEL if all the keys in the original map were successfully mapped.
◆ toModelList()
const MODEL_LIST MAUIKIT_EXPORT FMH::toModelList | ( | const QVariantList & | list | ) |
Creates a FMH::MODEL_LIST from a QVariantList.
- Parameters
-
list
- Note
- For this to be successful, the original map keys - in the list - should be mappable in the FMH::MODEL_NAME.
- Returns
- the resulting FMH::MODEL_LIST
Variable Documentation
◆ MODEL_NAME
The mapping of the FMH::MODEL_KEY enum values to its string representation.
For example, FMH::MODEL_KEY::LABEL
is mapped to"label"
.
- Note
- All the string representations of the FMH::MODEL_KEY are always lower cased, and with no special character division.
◆ MODEL_NAME_KEY
The mapping of a string text into a FMH::MODEL_KEY.
For example, "label"
is mapped to FMH::MODEL_KEY::LABEL
.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 6 2024 12:06:04 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.