2019-12-05 15:24:12 +01:00
<!DOCTYPE html>
< html lang = "en" >
< head >
2020-03-31 15:35:51 +02:00
< meta charset = "utf-8" >
2019-12-05 15:24:12 +01:00
<!-- installedlistmodel.cpp -->
2020-01-30 15:47:04 +01:00
< title > InstalledListModel Class | ScreenPlay< / title >
2019-12-05 15:24:12 +01:00
< link rel = "stylesheet" type = "text/css" href = "../css/style.css" / > < link rel = "stylesheet" type = "text/css" href = "../css/bootstrap.min.css" / >
< / head >
< body >
2019-12-05 15:30:08 +01:00
< div class = "container-fullwidth nav" > < div class = "container navWrapper" > < a href = "../index.html" > < span class = "logo" > ScreenPlay Generated Docs < / span > < / a > < span class = "navHome" > < a href = "../index.html" > Home< / a > < / span > < / div > < / div > < div id = mainWrapper class = "wrapper container " >
2019-12-05 15:24:12 +01:00
< li > InstalledListModel< / li >
< div class = "sidebar" >
< div class = "toc" >
< h3 > < a name = "toc" > Contents< / a > < / h3 >
< ul >
< li class = "level1" > < a href = "#public-functions" > Public Functions< / a > < / li >
2020-01-30 15:47:04 +01:00
< li class = "level1" > < a href = "#reimplemented-public-functions" > Reimplemented Public Functions< / a > < / li >
2019-12-05 15:24:12 +01:00
< li class = "level1" > < a href = "#public-slots" > Public Slots< / a > < / li >
< li class = "level1" > < a href = "#signals" > Signals< / a > < / li >
< li class = "level1" > < a href = "#details" > Detailed Description< / a > < / li >
< / ul >
< / div >
< div class = "sidebar-content" id = "sidebar-content" > < / div > < / div >
< h1 class = "title" > InstalledListModel Class< / h1 >
2020-03-31 15:35:51 +02:00
< span class = "small-subtitle" > class < a href = "screenplay.html" > ScreenPlay< / a > ::InstalledListModel< / span >
2019-12-05 15:24:12 +01:00
<!-- $$$InstalledListModel - brief -->
< p > Lists all installed wallpapers, widgets etc. from a given Path. < a href = "#details" > More...< / a > < / p >
<!-- @@@InstalledListModel -->
< div class = "table" > < table class = "alignedsummary" >
< tr > < td class = "memItemLeft rightAlign topAlign" > Header:< / td > < td class = "memItemRight bottomAlign" > < span class = "preprocessor" > #include < InstalledListModel> < / span >
< / td > < / tr > < / table > < / div > < ul >
< li > < a href = "screenplay-installedlistmodel-members.html" > List of all members, including inherited members< / a > < / li >
< / ul >
< a name = "public-functions" > < / a >
< h2 id = "public-functions" > Public Functions< / h2 >
< div class = "table" > < table class = "alignedsummary" >
2020-08-11 16:20:07 +02:00
< tr > < td class = "memItemLeft rightAlign topAlign" > < / td > < td class = "memItemRight bottomAlign" > < b > < a href = "screenplay-installedlistmodel.html#InstalledListModel" > InstalledListModel< / a > < / b > (const std::shared_ptr< GlobalVariables> & < i > globalVariables< / i > , QObject *< i > parent< / i > = nullptr)< / td > < / tr >
2019-12-05 15:24:12 +01:00
< tr > < td class = "memItemLeft rightAlign topAlign" > int < / td > < td class = "memItemRight bottomAlign" > < b > < a href = "screenplay-installedlistmodel.html#count-prop" > count< / a > < / b > () const< / td > < / tr >
< / table > < / div >
2020-01-30 15:47:04 +01:00
< a name = "reimplemented-public-functions" > < / a >
< h2 id = "reimplemented-public-functions" > Reimplemented Public Functions< / h2 >
< div class = "table" > < table class = "alignedsummary" >
< tr > < td class = "memItemLeft rightAlign topAlign" > virtual QVariant < / td > < td class = "memItemRight bottomAlign" > < b > < a href = "screenplay-installedlistmodel.html#data" > data< / a > < / b > (const QModelIndex & < i > index< / i > , int < i > role< / i > = Qt::DisplayRole) const override< / td > < / tr >
< tr > < td class = "memItemLeft rightAlign topAlign" > virtual QHash< int, QByteArray> < / td > < td class = "memItemRight bottomAlign" > < b > < a href = "screenplay-installedlistmodel.html#roleNames" > roleNames< / a > < / b > () const override< / td > < / tr >
< tr > < td class = "memItemLeft rightAlign topAlign" > virtual int < / td > < td class = "memItemRight bottomAlign" > < b > < a href = "screenplay-installedlistmodel.html#rowCount" > rowCount< / a > < / b > (const QModelIndex & < i > parent< / i > = QModelIndex()) const override< / td > < / tr >
< / table > < / div >
2019-12-05 15:24:12 +01:00
< a name = "public-slots" > < / a >
< h2 id = "public-slots" > Public Slots< / h2 >
< div class = "table" > < table class = "alignedsummary" >
2020-01-30 15:47:04 +01:00
< tr > < td class = "memItemLeft rightAlign topAlign" > void < / td > < td class = "memItemRight bottomAlign" > < b > < a href = "screenplay-installedlistmodel.html#append" > append< / a > < / b > (const QJsonObject & < i > obj< / i > , const QString & < i > folderName< / i > )< / td > < / tr >
< tr > < td class = "memItemLeft rightAlign topAlign" > void < / td > < td class = "memItemRight bottomAlign" > < b > < a href = "screenplay-installedlistmodel.html#init" > init< / a > < / b > ()< / td > < / tr >
< tr > < td class = "memItemLeft rightAlign topAlign" > void < / td > < td class = "memItemRight bottomAlign" > < b > < a href = "screenplay-installedlistmodel.html#loadInstalledContent" > loadInstalledContent< / a > < / b > ()< / td > < / tr >
2019-12-05 15:24:12 +01:00
< tr > < td class = "memItemLeft rightAlign topAlign" > void < / td > < td class = "memItemRight bottomAlign" > < b > < a href = "screenplay-installedlistmodel.html#count-prop" > setCount< / a > < / b > (int < i > count< / i > )< / td > < / tr >
< / table > < / div >
< a name = "signals" > < / a >
< h2 id = "signals" > Signals< / h2 >
< div class = "table" > < table class = "alignedsummary" >
< tr > < td class = "memItemLeft rightAlign topAlign" > void < / td > < td class = "memItemRight bottomAlign" > < b > < a href = "screenplay-installedlistmodel.html#count-prop" > countChanged< / a > < / b > (int < i > count< / i > )< / td > < / tr >
< / table > < / div >
< a name = "details" > < / a >
<!-- $$$InstalledListModel - description -->
< div class = "descr" >
< h2 id = "details" > Detailed Description< / h2 >
2019-12-08 11:38:48 +01:00
< p > Currently we only support one path for the user content. Via a QFileSystemWatcher we automatically reload the list. Dynamic insert and remove is not yet implemented. Otherwhise it is a regular QAbstractListModel based list model.< / p >
2019-12-05 15:24:12 +01:00
< / div >
<!-- @@@InstalledListModel -->
2020-01-30 15:47:04 +01:00
< div class = "func" >
< h2 > Member Function Documentation< / h2 >
2020-08-11 16:20:07 +02:00
<!-- $$$InstalledListModel[overload1]$$$InstalledListModelconststd::shared_ptr<GlobalVariables>&QObject* -->
< h3 class = "fn" id = "InstalledListModel" > < a name = "InstalledListModel" > < / a > InstalledListModel::< span class = "name" > InstalledListModel< / span > (const < span class = "type" > std::shared_ptr< / span > < < span class = "type" > GlobalVariables< / span > > & < i > globalVariables< / i > , < span class = "type" > QObject< / span > *< i > parent< / i > = nullptr)< / h3 >
2020-03-31 15:35:51 +02:00
< p > Constructor.< / p >
2020-01-30 15:47:04 +01:00
<!-- @@@InstalledListModel -->
<!-- $$$append[overload1]$$$appendconstQJsonObject&constQString& -->
< h3 class = "fn" id = "append" > < a name = "append" > < / a > < code > [slot] < / code > < span class = "type" > void< / span > InstalledListModel::< span class = "name" > append< / span > (const < span class = "type" > QJsonObject< / span > & < i > obj< / i > , const < span class = "type" > QString< / span > & < i > folderName< / i > )< / h3 >
<!-- @@@append -->
<!-- $$$init[overload1]$$$init -->
< h3 class = "fn" id = "init" > < a name = "init" > < / a > < code > [slot] < / code > < span class = "type" > void< / span > InstalledListModel::< span class = "name" > init< / span > ()< / h3 >
2020-03-31 15:35:51 +02:00
< p > Init function that needs to be called after the constructor because we need the GlobalVariables to finish loading.< / p >
2020-01-30 15:47:04 +01:00
<!-- @@@init -->
<!-- $$$loadInstalledContent[overload1]$$$loadInstalledContent -->
< h3 class = "fn" id = "loadInstalledContent" > < a name = "loadInstalledContent" > < / a > < code > [slot] < / code > < span class = "type" > void< / span > InstalledListModel::< span class = "name" > loadInstalledContent< / span > ()< / h3 >
<!-- @@@loadInstalledContent -->
<!-- $$$data[overload1]$$$dataconstQModelIndex&int -->
< h3 class = "fn" id = "data" > < a name = "data" > < / a > < code > [override virtual] < / code > < span class = "type" > QVariant< / span > InstalledListModel::< span class = "name" > data< / span > (const < span class = "type" > QModelIndex< / span > & < i > index< / i > , < span class = "type" > int< / span > < i > role< / i > = Qt::DisplayRole) const< / h3 >
2020-03-31 15:35:51 +02:00
< p > Retruns the data member of the ProjectFile.< / p >
2020-01-30 15:47:04 +01:00
<!-- @@@data -->
<!-- $$$roleNames[overload1]$$$roleNames -->
< h3 class = "fn" id = "roleNames" > < a name = "roleNames" > < / a > < code > [override virtual] < / code > < span class = "type" > QHash< / span > < < span class = "type" > int< / span > , < span class = "type" > QByteArray< / span > > InstalledListModel::< span class = "name" > roleNames< / span > () const< / h3 >
2020-03-31 15:35:51 +02:00
< p > Returns the variable names for QML.< / p >
2020-01-30 15:47:04 +01:00
<!-- @@@roleNames -->
<!-- $$$rowCount[overload1]$$$rowCountconstQModelIndex& -->
< h3 class = "fn" id = "rowCount" > < a name = "rowCount" > < / a > < code > [override virtual] < / code > < span class = "type" > int< / span > InstalledListModel::< span class = "name" > rowCount< / span > (const < span class = "type" > QModelIndex< / span > & < i > parent< / i > = QModelIndex()) const< / h3 >
2020-03-31 15:35:51 +02:00
< p > Returns the length of the installed items.< / p >
2020-01-30 15:47:04 +01:00
<!-- @@@rowCount -->
< / div >
2019-12-08 11:38:48 +01:00
< div id = license class = "footer center" > < p > This documentation is licensed under a < a rel = "license" href = "http://creativecommons.org/licenses/by/4.0/" > Creative Commons Attribution 4.0 International License< / a > .< / p > < / div > < script src = "../js/mermaid.min.js" > < / script > < script > var config = { startOnLoad : true , flowchart : { useMaxWidth : true , htmlLabels : true } } ; mermaid . initialize ( config ) ; < / script > < / body >
2019-12-05 15:24:12 +01:00
< / html >