| 1 |
// Copyright (C) 2016 The Qt Company Ltd. |
| 2 |
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause |
| 3 |
|
| 4 |
#ifndef WINDOW_H |
| 5 |
#define WINDOW_H |
| 6 |
|
| 7 |
#include "renderarea.h" |
| 8 |
|
| 9 |
#include <QList> |
| 10 |
#include <QPainterPath> |
| 11 |
#include <QWidget> |
| 12 |
|
| 13 |
QT_BEGIN_NAMESPACE |
| 14 |
class QComboBox; |
| 15 |
QT_END_NAMESPACE |
| 16 |
|
| 17 |
//! [0] |
| 18 |
class Window : public QWidget |
| 19 |
{ |
| 20 |
Q_OBJECT |
| 21 |
|
| 22 |
public: |
| 23 |
Window(); |
| 24 |
|
| 25 |
public slots: |
| 26 |
void operationChanged(); |
| 27 |
void shapeSelected(int index); |
| 28 |
//! [0] |
| 29 |
|
| 30 |
//! [1] |
| 31 |
private: |
| 32 |
void setupShapes(); |
| 33 |
|
| 34 |
enum { NumTransformedAreas = 3 }; |
| 35 |
RenderArea *originalRenderArea; |
| 36 |
RenderArea *transformedRenderAreas[NumTransformedAreas]; |
| 37 |
QComboBox *shapeComboBox; |
| 38 |
QComboBox *operationComboBoxes[NumTransformedAreas]; |
| 39 |
QList<QPainterPath> shapes; |
| 40 |
}; |
| 41 |
//! [1] |
| 42 |
|
| 43 |
#endif |