KDEGames

kgamegraphicsviewrenderer.cpp
1/*
2 SPDX-FileCopyrightText: 2010-2012 Stefan Majewsky <majewsky@gmx.net>
3
4 SPDX-License-Identifier: LGPL-2.0-only
5*/
6
7#include "kgamegraphicsviewrenderer.h"
8
9class KGameGraphicsViewRendererPrivate
10{
11public:
12 QGraphicsView *m_defaultPrimaryView = nullptr;
13};
14
15KGameGraphicsViewRenderer::KGameGraphicsViewRenderer(KGameThemeProvider *provider, unsigned cacheSize)
16 : KGameRenderer(provider, cacheSize)
17 , d_ptr(new KGameGraphicsViewRendererPrivate())
18{
19}
20
21KGameGraphicsViewRenderer::KGameGraphicsViewRenderer(KGameTheme *theme, unsigned cacheSize)
22 : KGameRenderer(theme, cacheSize)
23 , d_ptr(new KGameGraphicsViewRendererPrivate())
24{
25}
26
27KGameGraphicsViewRenderer::~KGameGraphicsViewRenderer() = default;
28
29QGraphicsView *KGameGraphicsViewRenderer::defaultPrimaryView() const
30{
31 Q_D(const KGameGraphicsViewRenderer);
32
33 return d->m_defaultPrimaryView;
34}
35
36void KGameGraphicsViewRenderer::setDefaultPrimaryView(QGraphicsView *view)
37{
38 Q_D(KGameGraphicsViewRenderer);
39
40 d->m_defaultPrimaryView = view;
41}
42
43#include "moc_kgamegraphicsviewrenderer.cpp"
Cache-enabled rendering of SVG themes.
A theme provider manages KGameTheme instances, and maintains a selection of the currentTheme().
A theme describes the visual appearance of a game.
Definition kgametheme.h:60
Q_D(Todo)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:09:35 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.