mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-11-22 10:42:29 +01:00
113 lines
9.4 KiB
HTML
113 lines
9.4 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<!-- monitorlistmodel.cpp -->
|
|
<title>MonitorListModel Class | ScreenPlay</title>
|
|
<link rel="stylesheet" type="text/css" href="../css/style.css"/> <link rel="stylesheet" type="text/css" href="../css/bootstrap.min.css"/>
|
|
</head>
|
|
<body>
|
|
<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 ">
|
|
<li>MonitorListModel</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>
|
|
<li class="level1"><a href="#reimplemented-public-functions">Reimplemented Public Functions</a></li>
|
|
<li class="level1"><a href="#public-slots">Public Slots</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">MonitorListModel Class</h1>
|
|
<span class="small-subtitle">class <a href="screenplay.html">ScreenPlay</a>::MonitorListModel</span>
|
|
<!-- $$$MonitorListModel-brief -->
|
|
<p>MonitorListModel. <a href="#details">More...</a></p>
|
|
<!-- @@@MonitorListModel -->
|
|
<div class="table"><table class="alignedsummary">
|
|
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include <MonitorListModel></span>
|
|
</td></tr></table></div><ul>
|
|
<li><a href="screenplay-monitorlistmodel-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">
|
|
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="screenplay-monitorlistmodel.html#MonitorListModel">MonitorListModel</a></b>(QObject *<i>parent</i> = nullptr)</td></tr>
|
|
<tr><td class="memItemLeft rightAlign topAlign"> std::optional<QString> </td><td class="memItemRight bottomAlign"><b><a href="screenplay-monitorlistmodel.html#getAppIDByMonitorIndex">getAppIDByMonitorIndex</a></b>(const int <i>index</i>) const</td></tr>
|
|
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-monitorlistmodel.html#setWallpaperActiveMonitor">setWallpaperActiveMonitor</a></b>(const std::shared_ptr<ScreenPlayWallpaper> &<i>wallpaper</i>, const QVector<int> <i>monitors</i>)</td></tr>
|
|
</table></div>
|
|
<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-monitorlistmodel.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-monitorlistmodel.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-monitorlistmodel.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-monitorlistmodel.html#clearActiveWallpaper">clearActiveWallpaper</a></b>()</td></tr>
|
|
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-monitorlistmodel.html#closeWallpaper">closeWallpaper</a></b>(const QString &<i>appID</i>)</td></tr>
|
|
<tr><td class="memItemLeft rightAlign topAlign"> QRect </td><td class="memItemRight bottomAlign"><b><a href="screenplay-monitorlistmodel.html#getAbsoluteDesktopSize">getAbsoluteDesktopSize</a></b>() const</td></tr>
|
|
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-monitorlistmodel.html#reset">reset</a></b>()</td></tr>
|
|
</table></div>
|
|
<a name="details"></a>
|
|
<!-- $$$MonitorListModel-description -->
|
|
<div class="descr">
|
|
<h2 id="details">Detailed Description</h2>
|
|
<p>Loads all available monitors and saves them in a QAbstractListModel inherited list model. This list model gets updated if:</p>
|
|
<ul>
|
|
<li>A user adds or removes a monitor</li>
|
|
<li>A user adds or removes a wallpaper</li>
|
|
<li>On startup based on profiles.json</li>
|
|
</ul>
|
|
<p>This listmodel is also needed for calculating the monitor preview in the UI.</p>
|
|
</div>
|
|
<!-- @@@MonitorListModel -->
|
|
<div class="func">
|
|
<h2>Member Function Documentation</h2>
|
|
<!-- $$$MonitorListModel[overload1]$$$MonitorListModelQObject* -->
|
|
<h3 class="fn" id="MonitorListModel"><a name="MonitorListModel"></a>MonitorListModel::<span class="name">MonitorListModel</span>(<span class="type">QObject</span> *<i>parent</i> = nullptr)</h3>
|
|
<p>Constructor.</p>
|
|
<!-- @@@MonitorListModel -->
|
|
<!-- $$$clearActiveWallpaper[overload1]$$$clearActiveWallpaper -->
|
|
<h3 class="fn" id="clearActiveWallpaper"><a name="clearActiveWallpaper"></a><code>[slot] </code><span class="type">void</span> MonitorListModel::<span class="name">clearActiveWallpaper</span>()</h3>
|
|
<p>Clears the listmodel.</p>
|
|
<!-- @@@clearActiveWallpaper -->
|
|
<!-- $$$closeWallpaper[overload1]$$$closeWallpaperconstQString& -->
|
|
<h3 class="fn" id="closeWallpaper"><a name="closeWallpaper"></a><code>[slot] </code><span class="type">void</span> MonitorListModel::<span class="name">closeWallpaper</span>(const <span class="type">QString</span> &<i>appID</i>)</h3>
|
|
<p>Removes the preview image and appID inside an monitor item.</p>
|
|
<!-- @@@closeWallpaper -->
|
|
<!-- $$$getAbsoluteDesktopSize[overload1]$$$getAbsoluteDesktopSize -->
|
|
<h3 class="fn" id="getAbsoluteDesktopSize"><a name="getAbsoluteDesktopSize"></a><code>[slot] </code><span class="type">QRect</span> MonitorListModel::<span class="name">getAbsoluteDesktopSize</span>() const</h3>
|
|
<p>MonitorListModel::getAbsoluteDesktopSize <b class="redFont"><code>\return</code></b></p>
|
|
<!-- @@@getAbsoluteDesktopSize -->
|
|
<!-- $$$reset[overload1]$$$reset -->
|
|
<h3 class="fn" id="reset"><a name="reset"></a><code>[slot] </code><span class="type">void</span> MonitorListModel::<span class="name">reset</span>()</h3>
|
|
<p>Removes all items and loads them vida loadMonitors() again.</p>
|
|
<!-- @@@reset -->
|
|
<!-- $$$data[overload1]$$$dataconstQModelIndex&int -->
|
|
<h3 class="fn" id="data"><a name="data"></a><code>[override virtual] </code><span class="type">QVariant</span> MonitorListModel::<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>Retruns the data member of the Monitor.</p>
|
|
<!-- @@@data -->
|
|
<!-- $$$getAppIDByMonitorIndex[overload1]$$$getAppIDByMonitorIndexconstint -->
|
|
<h3 class="fn" id="getAppIDByMonitorIndex"><a name="getAppIDByMonitorIndex"></a><span class="type">std::optional</span><<span class="type">QString</span>> MonitorListModel::<span class="name">getAppIDByMonitorIndex</span>(const <span class="type">int</span> <i>index</i>) const</h3>
|
|
<p>If successful this function returns an AppID. Otherwhise std::nullopt.</p>
|
|
<!-- @@@getAppIDByMonitorIndex -->
|
|
<!-- $$$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>> MonitorListModel::<span class="name">roleNames</span>() const</h3>
|
|
<p>Returns the variable names for QML.</p>
|
|
<!-- @@@roleNames -->
|
|
<!-- $$$rowCount[overload1]$$$rowCountconstQModelIndex& -->
|
|
<h3 class="fn" id="rowCount"><a name="rowCount"></a><code>[override virtual] </code><span class="type">int</span> MonitorListModel::<span class="name">rowCount</span>(const <span class="type">QModelIndex</span> &<i>parent</i> = QModelIndex()) const</h3>
|
|
<p>Returns the amount of active monitors.</p>
|
|
<!-- @@@rowCount -->
|
|
<!-- $$$setWallpaperActiveMonitor[overload1]$$$setWallpaperActiveMonitorconststd::shared_ptr<ScreenPlayWallpaper>&constQVector<int> -->
|
|
<h3 class="fn" id="setWallpaperActiveMonitor"><a name="setWallpaperActiveMonitor"></a><span class="type">void</span> MonitorListModel::<span class="name">setWallpaperActiveMonitor</span>(const <span class="type">std::shared_ptr</span><<span class="type"><a href="screenplay-screenplaywallpaper.html">ScreenPlayWallpaper</a></span>> &<i>wallpaper</i>, const <span class="type">QVector</span><<span class="type">int</span>> <i>monitors</i>)</h3>
|
|
<p>Sets the previewImage and appID for a list item.</p>
|
|
<!-- @@@setWallpaperActiveMonitor -->
|
|
</div>
|
|
<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>
|
|
</html>
|