File indexing completed on 2024-07-21 12:00:25

0001 /*
0002     SPDX-FileCopyrightText: 2016 Artem Fedoskin <afedoskin3@gmail.com>
0003     SPDX-License-Identifier: GPL-2.0-or-later
0004 */
0005 
0006 #include "skyopacitynode.h"
0007 
0008 SkyOpacityNode::SkyOpacityNode()
0009 {
0010 }
0011 
0012 void SkyOpacityNode::show()
0013 {
0014     if (opacity() == 0)
0015     {
0016         setOpacity(1);
0017         markDirty(QSGNode::DirtyOpacity);
0018     }
0019 }
0020 
0021 void SkyOpacityNode::hide()
0022 {
0023     if (opacity() != 0)
0024     {
0025         setOpacity(0);
0026         markDirty(QSGNode::DirtyOpacity);
0027     }
0028 }
0029 
0030 bool SkyOpacityNode::visible()
0031 {
0032     if (opacity() != 0)
0033     {
0034         return true;
0035     }
0036     return false;
0037 }