KTextAddons

textautogeneratemessagewaitingansweranimation.h
1/*
2 SPDX-FileCopyrightText: 2025 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6#pragma once
7#include "textautogeneratetext_private_export.h"
8
9#include <QDebug>
10#include <QObject>
11#include <QPersistentModelIndex>
13namespace TextAutogenerateText
14{
15class TEXTAUTOGENERATETEXT_TESTS_EXPORT TextAutogenerateMessageWaitingAnswerAnimation : public QObject
16{
17 Q_OBJECT
18public:
19 struct ScaleAndOpacity {
20 qreal scale = 0.0;
21 qreal opacity = 0.0;
22 };
23
24 explicit TextAutogenerateMessageWaitingAnswerAnimation(QObject *parent = nullptr);
25 ~TextAutogenerateMessageWaitingAnswerAnimation() override;
26
27 [[nodiscard]] QPersistentModelIndex modelIndex() const;
28 void setModelIndex(const QPersistentModelIndex &newModelIndex);
29
30 void start();
31
32 [[nodiscard]] ScaleAndOpacity value(int i) const;
33
34 [[nodiscard]] int count() const;
35 [[nodiscard]] QList<ScaleAndOpacity> scaleOpacities() const;
36
37 void stopAndDelete();
38Q_SIGNALS:
39 void valueChanged();
40
41private:
42 TEXTAUTOGENERATETEXT_NO_EXPORT void createAnimations();
43 [[nodiscard]] TEXTAUTOGENERATETEXT_NO_EXPORT QSequentialAnimationGroup *createAnimation(int index, int duration);
44 QList<ScaleAndOpacity> mScaleOpacities;
45 QPersistentModelIndex mModelIndex;
46 QSequentialAnimationGroup *mSequencials = nullptr;
47};
48}
49Q_DECLARE_TYPEINFO(TextAutogenerateText::TextAutogenerateMessageWaitingAnswerAnimation::ScaleAndOpacity, Q_RELOCATABLE_TYPE);
50TEXTAUTOGENERATETEXT_EXPORT QDebug operator<<(QDebug d, const TextAutogenerateText::TextAutogenerateMessageWaitingAnswerAnimation::ScaleAndOpacity &t);
Q_SCRIPTABLE Q_NOREPLY void start()
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri May 2 2025 12:06:03 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.