summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/widgets/backgrounditem.h
blob: ba961e2792c233fd12e9634eede54b0451553626 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only

#ifndef __BACKGROUNDITEM_H__
#define __BACKGROUNDITEM_H__

#include <QPixmap>

#include "gvbwidget.h"

class QGraphicsWidget;

class BackgroundItem : public GvbWidget
{
    Q_OBJECT

public:
    BackgroundItem(const QString &filename, QGraphicsWidget *parent=0);
    ~BackgroundItem();

    void paint(QPainter *painter,
                const QStyleOptionGraphicsItem *option,
                QWidget *widget = 0);
    void resizeEvent(QGraphicsSceneResizeEvent *event);

public slots:
    void themeChange();

private:
    QPixmap m_background;
    QString m_fileName;
};

#endif /* __BACKGROUNDITEM_H__ */