File indexing completed on 2024-04-21 04:02:02

0001 /*
0002     KBlackBox - A simple game inspired by an emacs module
0003 
0004     SPDX-FileCopyrightText: 1999-2000 Robert Cimrman <cimrman3@students.zcu.cz>
0005     SPDX-FileCopyrightText: 2007 Nicolas Roffet <nicolas-kde@roffet.com>
0006 
0007     SPDX-License-Identifier: GPL-2.0-or-later
0008 */
0009 
0010 
0011 
0012 #include "kbbgraphicsiteminteractioninfo.h"
0013 #include "kbbscalablegraphicwidget.h"
0014 #include "kbbthememanager.h"
0015 
0016 
0017 
0018 //
0019 // Constructor / Destructor
0020 //
0021 
0022 KBBGraphicsItemInteractionInfo::KBBGraphicsItemInteractionInfo( KBBScalableGraphicWidget* widget, KBBThemeManager* themeManager, KBBScalableGraphicWidget::itemType type, const qreal x, const qreal y, const int rotation) : KBBGraphicsItem(KBBScalableGraphicWidget::interactionInfoNothing, widget->scene(), themeManager)
0023 {
0024     m_themeManager = themeManager;
0025     setPos(x, y);
0026     setTransform(QTransform().rotate(rotation), true);
0027     setType(type);
0028 }
0029 
0030 
0031 
0032 //
0033 // Public
0034 //
0035 
0036 void KBBGraphicsItemInteractionInfo::setType(KBBScalableGraphicWidget::itemType type)
0037 {
0038     setElementId(m_themeManager->elementId(type));
0039 }