[plasmalnf] minor documentation
- Code documentation - Add another broken example theme, as test for winnowing
This commit is contained in:
parent
748ccf94e9
commit
11fc3e0507
@ -22,9 +22,13 @@
|
|||||||
#include <QList>
|
#include <QList>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
class QDebug;
|
/** @brief describes a single plasma LnF theme.
|
||||||
|
*
|
||||||
|
* A theme description has an id, which is really the name of the desktop
|
||||||
|
* file (e.g. org.kde.breeze.desktop), a name which is human-readable and
|
||||||
|
* translated, and an optional image Page, which points to a local screenshot
|
||||||
|
* of that theme.
|
||||||
|
*/
|
||||||
struct ThemeInfo
|
struct ThemeInfo
|
||||||
{
|
{
|
||||||
QString id;
|
QString id;
|
||||||
@ -46,6 +50,7 @@ struct ThemeInfo
|
|||||||
class ThemeInfoList : public QList< ThemeInfo >
|
class ThemeInfoList : public QList< ThemeInfo >
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/** @brief Looks for a given @p id in the list of themes, returns nullptr if not found. */
|
||||||
ThemeInfo* findById( const QString& id )
|
ThemeInfo* findById( const QString& id )
|
||||||
{
|
{
|
||||||
for ( ThemeInfo& i : *this )
|
for ( ThemeInfo& i : *this )
|
||||||
@ -56,6 +61,7 @@ public:
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @brief Looks for a given @p id in the list of themes, returns nullptr if not found. */
|
||||||
const ThemeInfo* findById( const QString& id ) const
|
const ThemeInfo* findById( const QString& id ) const
|
||||||
{
|
{
|
||||||
for ( const ThemeInfo& i : *this )
|
for ( const ThemeInfo& i : *this )
|
||||||
@ -66,6 +72,7 @@ public:
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @brief Checks if a given @p id is in the list of themes. */
|
||||||
bool contains( const QString& id ) const
|
bool contains( const QString& id ) const
|
||||||
{
|
{
|
||||||
return findById( id ) != nullptr;
|
return findById( id ) != nullptr;
|
||||||
|
@ -19,6 +19,7 @@ lnftool: "/usr/bin/lookandfeeltool"
|
|||||||
# which will be used to show a screenshot.
|
# which will be used to show a screenshot.
|
||||||
#
|
#
|
||||||
themes:
|
themes:
|
||||||
|
- org.kde.fuzzy-pig.desktop
|
||||||
- theme: org.kde.breeze.desktop
|
- theme: org.kde.breeze.desktop
|
||||||
image: "breeze.png"
|
image: "breeze.png"
|
||||||
- theme: org.kde.breezedark.desktop
|
- theme: org.kde.breezedark.desktop
|
||||||
|
Loading…
Reference in New Issue
Block a user