kwin/kcmkwin/kwinscreenedges/screenpreviewwidget.h
Vlad Zahorodnii 1fb9f6f13a Switch to SPDX license markers
The main advantage of SPDX license identifiers over the traditional
license headers is that it's more difficult to overlook inappropriate
licenses for kwin, for example GPL 3. We also don't have to copy a
lot of boilerplate text.

In order to create this change, I ran licensedigger -r -c from the
toplevel source directory.
2020-08-07 19:57:56 +00:00

45 lines
934 B
C++

/* This file is part of the KDE libraries
SPDX-FileCopyrightText: 2009 Marco Martin <notmart@gmail.com>
SPDX-License-Identifier: LGPL-2.0-or-later
*/
#ifndef SCREENPREVIEWWIDGET_H
#define SCREENPREVIEWWIDGET_H
#include <QWidget>
class ScreenPreviewWidgetPrivate;
class ScreenPreviewWidget : public QWidget
{
Q_OBJECT
public:
ScreenPreviewWidget(QWidget *parent);
~ScreenPreviewWidget() override;
void setPreview(const QPixmap &preview);
const QPixmap preview() const;
void setRatio(const qreal ratio);
qreal ratio() const;
QRect previewRect() const;
protected:
void resizeEvent(QResizeEvent *event) override;
void paintEvent(QPaintEvent *event) override;
void dropEvent(QDropEvent *event) override;
Q_SIGNALS:
void imageDropped(const QString &);
private:
ScreenPreviewWidgetPrivate *const d;
Q_PRIVATE_SLOT(d, void updateRect(const QRectF& rect))
};
#endif