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++
915 B
Raw Blame
/*
 * KDE. Krita Project.
 *
 * SPDX-FileCopyrightText: 2022 Deif Lou <[email protected]>
 *
 * SPDX-License-Identifier: GPL-2.0-or-later
 */

#ifndef KISLASSOENCLOSINGPRODUCER
#define KISLASSOENCLOSINGPRODUCER

#include <kis_pixel_selection.h>
#include <KisToolOutlineBase.h>

#include "KisDynamicDelegatedTool.h"

class KisLassoEnclosingProducer : public KisDynamicDelegateTool<KisToolOutlineBase>
{
    Q_OBJECT

public:
    KisLassoEnclosingProducer(KoCanvasBase *canvas);
    ~KisLassoEnclosingProducer() override;
    
    bool hasUserInteractionRunning() const;
    
protected:
    void finishOutline(const QVector<QPointF> &points) override;
    void beginShape() override;
    void endShape() override;

Q_SIGNALS:
    void enclosingMaskProduced(KisPixelSelectionSP enclosingMask);

private:
    bool m_hasUserInteractionRunning {false};

protected Q_SLOTS:
    void resetCursorStyle() override;
};

#endif