File indexing completed on 2024-03-24 03:47:02

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 "skyitem.h"
0009 
0010 class SkyObject;
0011 
0012 /**
0013  * @class CometsItem
0014  * This class handles comets in SkyMapLite
0015  *
0016  * @author Artem Fedoskin
0017  * @version 1.0
0018  */
0019 class CometsItem : public SkyItem
0020 {
0021   public:
0022     /**
0023      * @short Constructor
0024      * @param cometsList const reference to list of comets
0025      * @param rootNode parent RootNode that instantiates this object
0026      */
0027     explicit CometsItem(const QList<SkyObject *> &cometsList, RootNode *rootNode = nullptr);
0028 
0029     /**
0030      * @short recreates the node tree (deletes old nodes and appends new ones according to
0031      * m_cometsList)
0032      */
0033     void recreateList();
0034 
0035     /**
0036      * @short Determines the visibility of the object and its label and hides/updates them accordingly
0037      */
0038     virtual void update() override;
0039 
0040   private:
0041     const QList<SkyObject *> &m_cometsList;
0042 };