Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++
1.2 KB
Raw Blame
/*
 *  SPDX-FileCopyrightText: 2015 Jouni Pentikäinen <[email protected]>
 *  SPDX-FileCopyrightText: 2020 Emmet O 'Neill <[email protected]>
 *  SPDX-FileCopyrightText: 2020 Eoin O 'Neill <[email protected]>
 *
 *  SPDX-License-Identifier: GPL-2.0-or-later
 */

#ifndef KIS_KEYFRAME_H
#define KIS_KEYFRAME_H

#include <qglobal.h>
#include <qmetatype.h>
#include <QScopedPointer>

#include "kritaimage_export.h"
#include "kis_types.h"

class KisKeyframeChannel;

/** @brief Krita's base keyframe class.
 * Mainly contained by KisKeyframeChannels.
 * A core part of Krita's animation bankend.
 */
class KRITAIMAGE_EXPORT KisKeyframe : public QObject {
    Q_OBJECT
public:
    KisKeyframe();
    virtual ~KisKeyframe();

    int colorLabel() const;
    void setColorLabel(int colorIndex);

    /** Creates a copy of this keyframe.
     * @param  newChannel  (Optional) The channel that will hold this duplicate.
     * This is used when some action must be taken to insert a frame into a new channel,
     * for example, the registration of a KisRasterKeyframe with the new channel's paint device. */
    virtual KisKeyframeSP duplicate(class KisKeyframeChannel* newChannel = nullptr) = 0;

private:
    struct Private;
    QScopedPointer<Private> m_d;
};

#endif