1fb9f6f13a
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.
45 lines
934 B
C++
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
|