2022-05-10 10:06:48 +00:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
#ifndef PREVIEWWINDOW_H
|
|
|
|
#define PREVIEWWINDOW_H
|
|
|
|
|
2012-07-11 13:12:26 +00:00
|
|
|
#include <QDialog>
|
2018-02-16 17:02:45 +00:00
|
|
|
#include <QRasterWindow>
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
QT_BEGIN_NAMESPACE
|
2016-11-16 11:34:00 +00:00
|
|
|
class QPlainTextEdit;
|
2011-04-27 10:05:43 +00:00
|
|
|
QT_END_NAMESPACE
|
|
|
|
|
2018-02-16 17:02:45 +00:00
|
|
|
class PreviewWindow : public QRasterWindow
|
|
|
|
{
|
|
|
|
void paintEvent(QPaintEvent *event);
|
|
|
|
};
|
|
|
|
|
2017-06-22 13:43:31 +00:00
|
|
|
class PreviewWidget : public QWidget
|
2011-04-27 10:05:43 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2020-10-07 11:05:48 +00:00
|
|
|
PreviewWidget(QWidget *parent = nullptr);
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
void setWindowFlags(Qt::WindowFlags flags);
|
|
|
|
|
2016-11-16 11:34:00 +00:00
|
|
|
public slots:
|
|
|
|
void updateInfo();
|
|
|
|
|
|
|
|
protected:
|
2017-02-17 14:33:46 +00:00
|
|
|
bool event(QEvent *) override;
|
2016-11-16 11:34:00 +00:00
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
private:
|
2016-11-16 11:34:00 +00:00
|
|
|
QPlainTextEdit *textEdit;
|
2011-04-27 10:05:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class PreviewDialog : public QDialog
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2020-10-07 11:05:48 +00:00
|
|
|
PreviewDialog(QWidget *parent = nullptr);
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
void setWindowFlags(Qt::WindowFlags flags);
|
|
|
|
|
2016-11-16 11:34:00 +00:00
|
|
|
public slots:
|
|
|
|
void updateInfo();
|
|
|
|
|
|
|
|
protected:
|
2017-02-17 14:33:46 +00:00
|
|
|
bool event(QEvent *) override;
|
2016-11-16 11:34:00 +00:00
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
private:
|
2016-11-16 11:34:00 +00:00
|
|
|
QPlainTextEdit *textEdit;
|
2011-04-27 10:05:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|