File indexing completed on 2024-02-25 03:49:09

0001 /*
0002     SPDX-FileCopyrightText: 2016 Artem Fedoskin <afedoskin3@gmail.com>
0003     SPDX-License-Identifier: GPL-2.0-or-later
0004 */
0005 
0006 #pragma once
0007 
0008 #include <QSGOpacityNode>
0009 
0010 /**
0011  * @class SkyOpacityNode
0012  *
0013  * @short A wrapper for QSGOpacityNode that provides hide() and show() functions. If node is invisible
0014  * (opacity is 0) it won't be rendered.
0015  *
0016  * @author Artem Fedoskin
0017  * @version 1.0
0018  */
0019 
0020 class SkyOpacityNode : public QSGOpacityNode
0021 {
0022   public:
0023     SkyOpacityNode();
0024 
0025     /** @short makes this node visible */
0026     virtual void show();
0027 
0028     /** @short hides this node */
0029     virtual void hide();
0030 
0031     /** @return true if node is visible */
0032     bool visible();
0033 };