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
<!-- projectsettingslistmodel.cpp -->
2020-01-30 15:47:04 +01:00
< title > ProjectSettingsListModel 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 >
2020-11-22 12:24:43 +01:00
< div class = "container-fullwidth nav sticky-top" > < 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 > ProjectSettingsListModel< / li >
< div class = "sidebar" >
< div class = "toc" >
< h3 > < a name = "toc" > Contents< / a > < / h3 >
< ul >
2019-12-08 11:38:48 +01:00
< li class = "level1" > < a href = "#public-functions" > Public Functions< / a > < / li >
2020-11-22 12:24:43 +01:00
< li class = "level1" > < a href = "#reimplemented-public-functions" > Reimplemented Public Functions< / a > < / li >
< li class = "level1" > < a href = "#public-slots" > Public Slots< / a > < / li >
2019-12-05 15:24:12 +01:00
< li class = "level1" > < a href = "#details" > Detailed Description< / a > < / li >
< / ul >
< / div >
< div class = "sidebar-content" id = "sidebar-content" > < / div > < / div >
< h1 class = "title" > ProjectSettingsListModel Class< / h1 >
2021-05-13 13:05:05 +02:00
< span class = "small-subtitle" > class < a href = "screenplay-module.html" > ScreenPlay< / a > ::ProjectSettingsListModel< / span >
2019-12-05 15:24:12 +01:00
<!-- $$$ProjectSettingsListModel - brief -->
2019-12-08 11:38:48 +01:00
< p > ProjectSettingsListModel used for the dynamic loading of the properties json object inside a project.json. < a href = "#details" > More...< / a > < / p >
2019-12-05 15:24:12 +01:00
<!-- @@@ProjectSettingsListModel -->
< div class = "table" > < table class = "alignedsummary" >
< tr > < td class = "memItemLeft rightAlign topAlign" > Header:< / td > < td class = "memItemRight bottomAlign" > < span class = "preprocessor" > #include < ProjectSettingsListModel> < / span >
< / td > < / tr > < / table > < / div > < ul >
2019-12-08 11:38:48 +01:00
< li > < a href = "screenplay-projectsettingslistmodel-members.html" > List of all members, including inherited members< / a > < / li >
2019-12-05 15:24:12 +01:00
< / ul >
2019-12-08 11:38:48 +01:00
< a name = "public-functions" > < / a >
< h2 id = "public-functions" > Public Functions< / h2 >
< div class = "table" > < table class = "alignedsummary" >
2020-11-22 12:24:43 +01:00
< tr > < td class = "memItemLeft rightAlign topAlign" > void < / td > < td class = "memItemRight bottomAlign" > < b > < a href = "screenplay-projectsettingslistmodel.html#append" > append< / a > < / b > (const ScreenPlay::SettingsItem & & < i > item< / i > )< / td > < / tr >
2020-08-11 16:20:07 +02:00
< tr > < td class = "memItemLeft rightAlign topAlign" > QJsonObject < / td > < td class = "memItemRight bottomAlign" > < b > < a href = "screenplay-projectsettingslistmodel.html#getActiveSettingsJson" > getActiveSettingsJson< / a > < / b > ()< / td > < / tr >
2019-12-08 11:38:48 +01:00
< / table > < / div >
2020-11-22 12:24:43 +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-projectsettingslistmodel.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-projectsettingslistmodel.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-projectsettingslistmodel.html#rowCount" > rowCount< / a > < / b > (const QModelIndex & < i > parent< / i > = QModelIndex()) const override< / td > < / tr >
< / table > < / div >
< a name = "public-slots" > < / a >
< h2 id = "public-slots" > Public Slots< / h2 >
< div class = "table" > < table class = "alignedsummary" >
< tr > < td class = "memItemLeft rightAlign topAlign" > void < / td > < td class = "memItemRight bottomAlign" > < b > < a href = "screenplay-projectsettingslistmodel.html#setValueAtIndex" > setValueAtIndex< / a > < / b > (const int < i > row< / i > , const QString & < i > key< / i > , const QJsonObject & < i > value< / i > )< / td > < / tr >
< / table > < / div >
2019-12-05 15:24:12 +01:00
< a name = "details" > < / a >
<!-- $$$ProjectSettingsListModel - description -->
< div class = "descr" >
< h2 id = "details" > Detailed Description< / h2 >
2019-12-08 11:38:48 +01:00
< p > The loaded properties are allowed to have one level of nesting to simulate headlines:< / p >
< pre class = "cpp" > < span class = "string" > " properties" < / span > : {
< span class = "string" > " Attractor" < / span > : {
< span class = "string" > " attStrength" < / span > : {
< span class = "string" > " from" < / span > : < span class = "number" > 0< / span > < span class = "operator" > ,< / span >
< span class = "string" > " stepSize" < / span > : < span class = "number" > 100< / span > < span class = "operator" > ,< / span >
< span class = "string" > " to" < / span > : < span class = "number" > 100000< / span > < span class = "operator" > ,< / span >
< span class = "string" > " type" < / span > : < span class = "string" > " slider" < / span > < span class = "operator" > ,< / span >
< span class = "string" > " value" < / span > : < span class = "number" > 8000000< / span >
}
}< span class = "operator" > ,< / span >
< span class = "string" > " Emitter" < / span > : {
< span class = "string" > " emitRate" < / span > : {
< span class = "string" > " from" < / span > : < span class = "number" > 0< / span > < span class = "operator" > ,< / span >
< span class = "string" > " stepSize" < / span > : < span class = "number" > 1< / span > < span class = "operator" > ,< / span >
< span class = "string" > " to" < / span > : < span class = "number" > 2500< / span > < span class = "operator" > ,< / span >
< span class = "string" > " type" < / span > : < span class = "string" > " slider" < / span > < span class = "operator" > ,< / span >
< span class = "string" > " value" < / span > : < span class = "number" > 25< / span >
}
}
}< / pre >
< p > In this example the Attractor and Emitter would be a headline. In the UI we then displays it for the user to modify. Otherwhise it is a regular QAbstractListModel based list model.< / p >
2019-12-05 15:24:12 +01:00
< / div >
<!-- @@@ProjectSettingsListModel -->
2019-12-08 11:38:48 +01:00
< div class = "func" >
< h2 > Member Function Documentation< / h2 >
2020-11-22 12:24:43 +01:00
<!-- $$$setValueAtIndex[overload1]$$$setValueAtIndexconstintconstQString&constQJsonObject& -->
< h3 class = "fn" id = "setValueAtIndex" > < a name = "setValueAtIndex" > < / a > < code > [slot] < / code > < span class = "type" > void< / span > ProjectSettingsListModel::< span class = "name" > setValueAtIndex< / span > (const < span class = "type" > int< / span > < i > row< / i > , const < span class = "type" > QString< / span > & < i > key< / i > , const < span class = "type" > QJsonObject< / span > & < i > value< / i > )< / h3 >
< p > .< / p >
<!-- @@@setValueAtIndex -->
<!-- $$$append[overload1]$$$appendconstScreenPlay::SettingsItem&& -->
< h3 class = "fn" id = "append" > < a name = "append" > < / a > < span class = "type" > void< / span > ProjectSettingsListModel::< span class = "name" > append< / span > (const < span class = "type" > ScreenPlay::SettingsItem< / span > & & < i > item< / i > )< / h3 >
2020-12-26 21:14:42 +01:00
< p > appends an SettingsItem.< / p >
2020-11-22 12:24:43 +01:00
<!-- @@@append -->
<!-- $$$data[overload1]$$$dataconstQModelIndex&int -->
< h3 class = "fn" id = "data" > < a name = "data" > < / a > < code > [override virtual] < / code > < span class = "type" > QVariant< / span > ProjectSettingsListModel::< 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 >
< p > .< / p >
<!-- @@@data -->
2020-08-11 16:20:07 +02:00
<!-- $$$getActiveSettingsJson[overload1]$$$getActiveSettingsJson -->
< h3 class = "fn" id = "getActiveSettingsJson" > < a name = "getActiveSettingsJson" > < / a > < span class = "type" > QJsonObject< / span > ProjectSettingsListModel::< span class = "name" > getActiveSettingsJson< / span > ()< / h3 >
2020-12-26 21:14:42 +01:00
< p > ProjectSettingsListModel::getActiveSettingsJson< / p >
2020-08-11 16:20:07 +02:00
<!-- @@@getActiveSettingsJson -->
2020-11-22 12:24:43 +01:00
<!-- $$$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 > > ProjectSettingsListModel::< span class = "name" > roleNames< / span > () const< / h3 >
< p > .< / p >
<!-- @@@roleNames -->
<!-- $$$rowCount[overload1]$$$rowCountconstQModelIndex& -->
< h3 class = "fn" id = "rowCount" > < a name = "rowCount" > < / a > < code > [override virtual] < / code > < span class = "type" > int< / span > ProjectSettingsListModel::< span class = "name" > rowCount< / span > (const < span class = "type" > QModelIndex< / span > & < i > parent< / i > = QModelIndex()) const< / h3 >
< p > .< / p >
<!-- @@@rowCount -->
2019-12-08 11:38:48 +01:00
< / div >
2020-11-22 12:24:43 +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/bootstrap.bundle.min.js" > < / script > < 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 >