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.3 KB
Raw Blame
/*
 * SPDX-FileCopyrightText: 2005 Thomas Zander <[email protected]>
 * SPDX-FileCopyrightText: 2005 C. Boemann <[email protected]>
 *
 *  SPDX-License-Identifier: GPL-2.0-or-later
 */
#ifndef KIS_IMAGE_FROM_CLIPBOARD_WIDGET_H
#define KIS_IMAGE_FROM_CLIPBOARD_WIDGET_H

#include "kis_custom_image_widget.h"

/**
 * The 'New image from clipboard' widget in the Krita startup widget.
 * This class is an extension of the KisCustomImageWidget("Custom document" widget"
 */
class KisImageFromClipboardWidget : public KisCustomImageWidget
{
    Q_OBJECT
public:
    /**
     * Constructor. Please note that this class is being used/created by KisDoc.
     * @param parent the parent widget
     * @param imageName the document that wants to be altered
     * @param dialogType is a prefix that will be used for fetching image layout settings
     */
    KisImageFromClipboardWidget(QWidget *parent, const QString & imageName, const QLatin1String &dialogType);
    ~KisImageFromClipboardWidget() override;

protected:

    void showEvent(QShowEvent *event) override;
    bool shouldSaveImageDimensions() const override;

private Q_SLOTS:
    void createClipboardPreview();
    void createImage() override;
    void clipboardDataChanged();
    void enableImageCreation(const QImage &);
};

#endif