Kirigami2

avatar.h
1 // SPDX-FileCopyrightText: 2020 Carson Black <[email protected]>
2 //
3 // SPDX-License-Identifier: LGPL-2.0-or-later
4 
5 #pragma once
6 
7 #include <QColor>
8 #include <QObject>
9 #include <QVariant>
10 
11 class NameUtils : public QObject
12 {
13  Q_OBJECT
14 
15 public:
16  Q_INVOKABLE QString initialsFromString(const QString &name);
17  Q_INVOKABLE QColor colorsFromString(const QString &name);
18  Q_INVOKABLE bool isStringUnsuitableForInitials(const QString &name);
19 };
20 
21 class AvatarGroup : public QObject
22 {
23  Q_OBJECT
24 
25 public:
26  Q_PROPERTY(QVariant main MEMBER mainAction NOTIFY mainActionChanged)
27  QVariant mainAction;
28  Q_SIGNAL void mainActionChanged();
29 
30  Q_PROPERTY(QVariant secondary MEMBER secondaryAction NOTIFY secondaryActionChanged)
31  QVariant secondaryAction;
32  Q_SIGNAL void secondaryActionChanged();
33 };
Q_OBJECTQ_OBJECT
Q_PROPERTY(...)
Q_SIGNALQ_SIGNAL
Q_INVOKABLEQ_INVOKABLE
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Jan 29 2023 04:11:03 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.