qt6windows7/tests/benchmarks/widgets/graphicsview/qgraphicsview/benchapps/chipTest/view.h

49 lines
1020 B
C
Raw Normal View History

2023-10-30 06:33:08 +08: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
#ifndef VIEW_H
#define VIEW_H
#include <QFrame>
QT_FORWARD_DECLARE_CLASS(QGraphicsView)
QT_FORWARD_DECLARE_CLASS(QLabel)
QT_FORWARD_DECLARE_CLASS(QSlider)
QT_FORWARD_DECLARE_CLASS(QToolButton)
class View : public QFrame
{
Q_OBJECT
public:
View(const QString &name, QWidget *parent = nullptr);
QGraphicsView *view() const;
private slots:
void resetView();
void setResetButtonEnabled();
void setupMatrix();
void toggleOpenGL();
void toggleAntialiasing();
void print();
void zoomIn();
void zoomOut();
void rotateLeft();
void rotateRight();
void timerEvent(QTimerEvent *);
private:
QGraphicsView *graphicsView;
QLabel *label;
QToolButton *openGlButton;
QToolButton *antialiasButton;
QToolButton *printButton;
QToolButton *resetButton;
QSlider *zoomSlider;
QSlider *rotateSlider;
};
#endif